<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Windev Forum - WinDev Solutions</title>
        <description>You\\\re invited to publish solutions to any WinDev problems here. Simple or tricky, whatever.</description>
        <link>https://www.wxforum.info/list.php?27161</link>
        <lastBuildDate>Tue, 14 Apr 2026 14:45:25 +0200</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,799185,799185#msg-799185</guid>
            <title>Printing/sending invoices with correct line sequence (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,799185,799185#msg-799185</link>
            <description><![CDATA[ I generate invoice as PDFs or files of various types, eg XML, CSV. I had trouble retaining the original line sequence as per the source transaction.<br />
<br />
Typically I scan a data source of invoice headers, and within the scan I filter another data source for all the invoice lines for that invoice, then scan those lines to generate the output:<br />
<br />
FOR EACH &lt;invoice header data source&gt;<br />
 - Using HFilter, filter the invoice lines data source for that invoice (ordered by invoice and linenumber)<br />
 -  FOR EACH &lt;invoice lines data source&gt;<br />
 -   -  Print the invoice report or create the output file<br />
<br />
I tried 3 different ways to filter the invoice lines data:<br />
<br />
1. FOR...EACH &lt;invoice lines data source&gt; - did not return the correct set of data, even though a display of the data source in the debugger showed the correct set of lines.<br />
<br />
2. WHILE HOut(&lt;invoice lines data source&gt;) - correct invoice set but the lines were in random order<br />
<br />
3. FOR EACH &lt;invoice lines data source&gt; where &quot;saleid = &#039;&quot; + &lt;invoice number data source&gt;.saleid + &quot;&#039;&quot; ON LineNumber<br />
<br />
#3 worked correctly. The &quot;where clause&quot; created the correct subset of data, and &quot;ON linenumber&quot; retained the correct line sequence.<br />
<br />
See [<a href="https://doc.windev.com/en-US/?1510013"  rel="nofollow">doc.windev.com</a>].<br />
<br />
This may be well known but not to me. Shared for anyone who can benefit!]]></description>
            <dc:creator>Mike James</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 19 Mar 2026 23:52:08 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,797368,797368#msg-797368</guid>
            <title>Available Windev Dongles for Sale (V21 and V26) (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,797368,797368#msg-797368</link>
            <description><![CDATA[ Dear Windev Coders,<br />
<br />
I am selling my Windev dongle version 21 and version 26.<br />
Name your price.<br />
<br />
for interested you can message me directly..<br />
<br />
Ciao!]]></description>
            <dc:creator>mitchlove</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 23 Nov 2023 18:13:47 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,797038,797038#msg-797038</guid>
            <title>lost password *.fic file HFSQL (2 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,797038,797038#msg-797038</link>
            <description><![CDATA[ Hello everyone and Thank you in advance for the Help<br />
i forget my password for *.FIC files HFSQL server and i also lost the analyse  file for programming a new password for those FIC files, is there a way to retrieve the data ?  how i can resolve this problem ? X(]]></description>
            <dc:creator>amiolodev</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 22 Mar 2023 18:48:08 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,797029,797029#msg-797029</guid>
            <title>api webservice REST  cals (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,797029,797029#msg-797029</link>
            <description><![CDATA[ Hi I have been looking at webservices in windev and  I was wondereing if they do support : &quot;Asynchronous&quot; webserice  calls ?<br />
<br />
Any body  any Idea . I can not foind it on the help <br />
<br />
<br />
regards<br />
<br />
Renko Allard]]></description>
            <dc:creator>Allard</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Mon, 20 Mar 2023 22:50:48 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,794633,794633#msg-794633</guid>
            <title>WinDev LPR (DOS) Function (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,794633,794633#msg-794633</link>
            <description><![CDATA[ Hello<br />
<br />
My solution will not work:<br />
For a exotic Labelprinter I have to send Binary data direct to the printer.<br />
I do this creating a File with the data. <br />
Then I create a DOS Batch file as follow:<br />
Cmd is string = &quot;c:\windows\system32\LPR.exe  -S &quot; + Computername + &quot; -P &quot; + Printername + &quot; &quot; + Filename + &quot; -ol&quot;<br />
an write it to my disk: fSaveText(&quot;C:\Temp\Batch.bat&quot;, Cmd)<br />
<br />
This Batch can I start manualy without any problems, it works.<br />
But unfortunately I am not able to start the batch by WinDev<br />
I tryed &#039;exerun&#039;, &#039;DDEstart&#039;  (DDEStart(&quot;C:\Temp\Batch.bat&quot;))<br />
whatever i try, it does&#039;nt work<br />
<br />
Anybody can help me ?<br />
<br />
Thanks in advance <br />
Erich]]></description>
            <dc:creator>erich45</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 30 Mar 2021 16:39:47 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,794412,794412#msg-794412</guid>
            <title>How to Run a MS SQL Store Procedure and get the Value from it to a Variable (3 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,794412,794412#msg-794412</link>
            <description><![CDATA[ Hello everyone and Thank you in advance for the Help<br />
<br />
I have this stored procedure inside a Microsoft Sequel Database which gets me the Date and Time of the Server.<br />
<br />
Name of the Procedure: <b>Get_The_Date_And_Time</b><br />
<br />
<b>Structure of the Procedute</b><br />
<br />
<b><span style="color:#3300FF">CREATE PROCEDURE dbo.Get_The_Date_And_Time<br />
AS<br />
BEGIN<br />
  /* Procedure body */<br />
  DECLARE @Date_And_Time as date SELECT Date_And_Time = GETDATE();<br />
END</span></b><br />
<br />
<b>The result of the Procedure if executed is the following:<br />
Under the Column Name &quot;Get_The_Date_And_Time&quot; The result is the Following</b><br />
<br />
<b>2/8/2021 8:10:19 PM  &lt;-------- This is the Date and Time of the Server when the stored procedure is Executed</b><br />
<br />
<b>My question is:</b> <span style="color:#FF0000"><b>How can I run this store procedure from within WinDev or WebDev and put the result in a Variable, for Example varServerDate</b>.</span><br />
<br />
<b>I have tried different things HExecuteProcedure() This does not work with ODBC Connection<br />
I Have tried with HExecuteSQLQuery Get errors<br />
I have tried SQLExec got errors too</b><br />
<br />
Nothing works<br />
<br />
<b>I would really appreciate it you can give me a hand on this and perhaps a code Example can be provided since I have no clue where to start.<br />
<br />
Thank you so Much<br />
<br />
Best regards,<br />
Carlos</b>]]></description>
            <dc:creator>MPD_For_Life</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 22 Aug 2023 12:29:41 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,792820,792820#msg-792820</guid>
            <title>HFSQL Export Tool for PostgreSQL, MySQL and MariaDB (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,792820,792820#msg-792820</link>
            <description><![CDATA[ <a href="https://www.windev.at/downloads/HFSQLExport_Setup_32_1.0.1.0.exe"  rel="nofollow">HFSQLExport</a><br />
<br />
HFSQL analysis and data exports a SQL script for MySQL, MariaDB and PostgreSQL.<br />
<br />
Direct export for PostgreSQL is not ready, but can be done (needs time)<br />
<br />
If anyone wants to extend this little tool, sources are available at request.<br />
<br />
<img src="https://www.windev.at/downloads/HFSQLExport.png" class="bbcode" border="0" />]]></description>
            <dc:creator>apredl</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 23 Nov 2022 16:46:03 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,688338,688338#msg-688338</guid>
            <title>Replacement for IsNumeric() (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,688338,688338#msg-688338</link>
            <description><![CDATA[ A few weeks ago I discovered that<br />
<br />
IsNumeric(&quot;02NST2&quot;) <br />
<br />
returns True. Well, I don&#039;t agree with this result.<br />
<br />
So I needed a workaround. And this is what I ended up with:<br />
<br />
MatchRegularExpression(&quot;02NST2&quot;,&quot;[0-9]+&quot;) -&gt; False<br />
<br />
HTH<br />
Sebastian]]></description>
            <dc:creator>Sebastian Arnold</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 09 Aug 2016 13:30:44 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,118845,118845#msg-118845</guid>
            <title>C# example using WD 16 .NET assembly (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,118845,118845#msg-118845</link>
            <description><![CDATA[ I have stopped my attempt to use C# for finger scanners for now but I can give anyone interested my test project and C# solution if it is of interest. Just send me an email or post your email here and I will get the code to you.<br />
<br />
I encourage all that use .NET to add to this sample or add their own suggestions.<br />
<br />
Jeff Graham<br />
Cascade Consulting<br />
<br />
Related threads:<br />
[<a href="http://forum.mysnip.de/read.php?27131,118451,118451#msg-118451"  rel="nofollow">forum.mysnip.de</a>]<br />
[<a href="http://forum.mysnip.de/read.php?27131,115437,115445#msg-115445"  rel="nofollow">forum.mysnip.de</a>]<br />
[<a href="http://forum.mysnip.de/read.php?27131,114797,115335#msg-115335"  rel="nofollow">forum.mysnip.de</a>]<br />
[<a href="http://forum.mysnip.de/read.php?27131,118464,118464#msg-118464"  rel="nofollow">forum.mysnip.de</a>]<br />
[<a href="http://forum.mysnip.de/read.php?28849,118453"  rel="nofollow">forum.mysnip.de</a>]<br />
<br />
<b>Code for WD .NET assembly class</b><br />
<pre class="bbcode">
// .NET assebly for accessing HF Fingerprints and Accounts from C#

//--- LOG ----------------------------------------------------------------------------------------------------------------------------------
//2011-09-06	JWG		clHFAccess		- New class
//2011-11-08    JWG     Note that properties do not seem to show in C# even if marked PUBLIC =&gt; must have Get.. and Set.. methods
//--- END LOG ------------------------------------------------------------------------------------------------------------------------------

clHFAccess is class 
	PRIVATE
		m_cnxHFConn is Connection
		m_bufFingerprints is Buffer
		m_sTestString is string = &quot;Default value!&quot;	
		gm_sDataPath is string = &quot;&lt;none&gt;&quot;
	PUBLIC
		gm_bIsConnected is boolean = False
		gm_iNbrRecords is int = 0
	END


PROCEDURE PUBLIC p_sDataPath()
RESULT gm_sDataPath

PROCEDURE PUBLIC p_sDataPath(sValue is string)
HCloseConnection(m_cnxHFConn)
gm_bIsConnected = False
IF fDirectoryExist(sValue) THEN 
	m_cnxHFConn..Source = sValue
	IF HOpenConnection(m_cnxHFConn) THEN 
		IF HChangeConnection(Fingerprints,m_cnxHFConn) THEN // Only file used by this .NET dll
			gm_bIsConnected = True
			gm_iNbrRecords = HNbRec(Fingerprints)    
			gm_bIsConnected = False
			gm_sDataPath = sValue
		END
	END
END
PROCEDURE PUBLIC p_sTestString()
RESULT m_sTestString

PROCEDURE PUBLIC p_sTestString(par_Value is string)
m_sTestString = par_Value

PROCEDURE Constructor()
// Set public property to indicate HF is connected
//gm_sDataPath = fDataDir()  // This does not work as fDataDir unique to WinDev
gm_sDataPath = fCurrentDir()
m_cnxHFConn..Provider=hAccessHF7
m_cnxHFConn..Password = &quot;&quot;
m_cnxHFConn..Source=fDataDir()  //+&quot;\Fingerprints.fic&quot; 
IF HOpenConnection(m_cnxHFConn) THEN 
	IF HChangeConnection(Fingerprints,m_cnxHFConn) THEN // Only file used by this .NET dll
		gm_bIsConnected = True
		gm_iNbrRecords = HNbRec(Fingerprints)    
		gm_bIsConnected = False
	END
END
RESULT gm_bIsConnected
PROCEDURE Destructor()
// NOTE - This code causes AccessViolationException
//if gm_bIsConnected then
//	HCloseConnection(m_cnxHFConn)
//END

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] GetNextFingerprint (&lt;ID&gt; is int, &lt;iAccountsID&gt; is int, &lt;iDistrictStudentNbr&gt; is int, &lt;aFeatures&gt;)
//
// Parameters:
//	ID (int): Fingerprints ID
//	iAccountsID (int): AccMeals account identifier
//	iDistrictStudentNbr (int): Unique identifier of student
//	aFeatures: Template data
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
//PROCEDURE GetNextFingerprint(LOCAL ID is int, LOCAL iAccountsID is int, LOCAL iDistrictStudentNbr is int, LOCAL aFeatures is array of byte ) 
PROCEDURE GetNextFingerprint(ID is int, iAccountsID is int, iDistrictStudentNbr is int, aFeatures) // is array of byte )
bResult is boolean = HReadNext(Fingerprints,ID,hLockNo)
IF bResult THEN
	ID = Fingerprints.ID
	iAccountsID = Fingerprints.AccountsID
	iDistrictStudentNbr = Fingerprints.DistrictStudentNbr
	IF Fingerprints.Features..Null = False THEN  
		 //		aFeatures = Fingerprints.Features
		Deserialize(aFeatures,Fingerprints.Features,psdBinary)
	END
END
RESULT bResult
//result gm_bIsConnected

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] GetTestString ()
//
// Parameters:
//	None
// Return Value:
// 	string: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE GetTestString()
RESULT m_sTestString

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//SetTestString (&lt;sValue&gt; is string)
//
// Parameters:
//	sValue (string): &lt;specify the role of value&gt;
// Return Value:
// 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE SetTestString(LOCAL sValue is string)
m_sTestString = sValue


//PROCEDURE GetFirstFingerprint(local ID is int, LOCAL iAccountsID is int, LOCAL iDistrictStudentNbr is int, LOCAL aFeatures is array of byte )
PROCEDURE GetFirstFingerprint(ID is int, iAccountsID is int, iDistrictStudentNbr is int, aFeatures) // is array of byte )
bResult is boolean = HReadFirst(Fingerprints)
IF bResult THEN
	ID = Fingerprints.ID
	iAccountsID = Fingerprints.AccountsID
	iDistrictStudentNbr = Fingerprints.DistrictStudentNbr
	IF Fingerprints.Features..Null = False THEN 
//		aFeatures = Fingerprints.Features
		Deserialize(aFeatures,Fingerprints.Features,psdBinary)
	END
END
RESULT bResult
// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] WriteData (&lt;iAccountsID&gt; is int, &lt;iDistrictStudentNbr&gt; is int, &lt;sFingerID&gt; is string, &lt;aTemplate&gt; is array)
//
// Parameters:
//	iAccountsID (int): &lt;specify the role of siAccountsID&gt;
//	iDistrictStudentNbr (int): &lt;specify the role of siDistrictStudentNbr&gt;
//	sFingerID (string): &lt;specify the role of sFingerID&gt;
//	aTemplate (array): &lt;specify the role of bufFeatures&gt;
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
//PROCEDURE WriteData(iAccountsID is int, iDistrictStudentNbr is int, sFingerID is string, aFeatures is array of byte  )  // This causes &quot;ref &lt;parm&gt;&quot; calls

PROCEDURE WriteData(LOCAL iAccountsID is int, LOCAL iDistrictStudentNbr is int, LOCAL sFingerID is string, LOCAL aTemplate is array of 1-byte unsigned int )

bSuccess is boolean = False
HReset(Fingerprints)
Fingerprints.AccountsID = iAccountsID
Fingerprints.DistrictStudentNbr = iDistrictStudentNbr
Fingerprints.FingerID = sFingerID
//Serialize(aFeatures,Fingerprints.Features,psdBinary)
//Fingerprints.Features = aTemplate  // just puts address in binary field
bufTemplate is Buffer
Serialize(aTemplate,bufTemplate,psdBinary)
Fingerprints.Features = bufTemplate

IF HAdd(Fingerprints) THEN
	bSuccess = True
END
gm_iNbrRecords = HNbRec(Fingerprints)    // Update class info
RESULT bSuccess
// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] TestA (&lt;p1&gt; is int, &lt;p2&gt; is array)
//
// Parameters:
//	p1 (int): &lt;specify the role of p1&gt;
//	p2 (array): &lt;specify the role of p2&gt;
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE TestA(p1 is int,p2 is array of byte)
temp is array of byte = [1,2,3]
p1 += 1
p2 = temp
RESULT True
// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] TestB (&lt;p1&gt; is int, &lt;p2&gt;)
//
// Parameters:
//	p1 (int): &lt;specify the role of p1&gt;
//	p2: &lt;specify the role of p2&gt;
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE TestB(p1 is int, p2)
temp is array of byte = [2,3,4,5]
p1 += 1
p2 = temp
RESULT True


// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] TestC (&lt;p1&gt; is int [, &lt;p2&gt; is array])
//
// Parameters:
//	p1 (int): &lt;specify the role of p1&gt;
//	p2 (array - default value=0): &lt;specify the role of p2&gt;
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE TestC(p1 is int,p2 is array of 1-byte unsigned int = Null)
temp is array of byte = [10,11,12]
p1 += 1
IF MyParameters..NbReceived = 2 THEN
	p2 = temp
	RESULT True
ELSE
	RESULT False
END

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] TestD (&lt;p1&gt; is int, &lt;p2&gt; is COMObject)
//
// Parameters:
//	p1 (int): &lt;specify the role of p1&gt;
//	p2 (COMObject): &lt;specify the role of p2&gt;
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
//	p1 (int): &lt;specify the role of p1&gt;
//	p2 (array - default value=0): &lt;specify the role of p2&gt;
PROCEDURE TestD(p1 is int, p2 is COMObject)
temp is array of byte = [13,14,15]
p1 += 1
IF MyParameters..NbReceived = 2 THEN
	p2 = temp
	RESULT True
ELSE
	RESULT False
END

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] GetDataPath ()
//
// Parameters:
//	None
// Return Value:
// 	string: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE GetDataPath()
RESULT p_sDataPath

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//SetDataPath (&lt;sValue&gt; is string)
//
// Parameters:
//	sValue (string): &lt;specify the role of sValue&gt;
// Return Value:
// 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE SetDataPath(LOCAL sValue is string)
p_sDataPath = sValue

// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] CloseDB ()
//
// Parameters:
//	None
// Return Value:
// 	boolean: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE CloseDB()
IF HCloseConnection(m_cnxHFConn) THEN
	gm_bIsConnected = False
END
RESULT gm_bIsConnected</pre>
<br />
<b>C# code</b><br />
<pre class="bbcode">
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Neurotec.Biometrics;
using Neurotec.Licensing;
using WL;


namespace Test_CS
{
    public partial class FormTest : Form
    {
        public FormTest()
        {
            InitializeComponent();
        }
        private string pathTestData = @&quot;D:\BioMetrics\Test_Data&quot;;

        private void buttonOLE_Click(object sender, EventArgs e)
        {
            /*
            Connection to a HyperFileSQL Classic database without specifying the analysis:
                Provider=PCSOFT.HFSQL;Initial Catalog=c:\My HyperFileSQL Database
            Connection to a HyperFileSQL Classic database byspecifying the analysis:
                Provider=PCSOFT.HFSQL;Data Source=c:\My HyperFileSQL Database\MyAnalysis.wdd;Initial Catalog=c:\My HyperFileSQL Database
            Connection to a HyperFileSQL Client/Server database:
                Provider=PCSOFT.HFSQL;Data Source=serverdb.mycompany.fr:4910;User ID=admin;Password=secret;Initial Catalog=MyDatabase
            Connection to a HyperFileSQL Client/Server database with password-protected files that use the Russian character set:
                Provider=PCSOFT.HFSQL;Data Source=serverdb.mycompany.fr;User ID=user;Initial Catalog=MyRussianDatabase;Extended Properties=&quot;Password=*:secret1;Password=File2:secret2;Language=KOI8-R&quot;
            Note: In this example, all the database files are protected by the &quot;secret1&quot; password except for the &quot;File2&quot; file that is protected by the &quot;secret2&quot; password.
            */

            textOLE.Text = &quot;&quot;;
            try
            {
                System.Data.OleDb.OleDbConnection myOleDb = new System.Data.OleDb.OleDbConnection
                    (@&quot;Provider=PCSOFT.HFSQL;Data Source=D:\BioMetrics\\VF_CS_Test\\VF_CS_Test.wdd;Initial Catalog=&quot;+pathTestData+&quot;;&quot;); //D:\\BioMetrics\\WD_Net\\Exe;&quot;);
                    //(&quot;Provider=PCSOFT.HFSQL;Data Source=D:\\BioMetrics\\VF_CS_Test\\VF_CS_Test.wdd;Initial Catalog=D:\\BioMetrics\\VF_CS_Test\\exe:&quot;);
                    // (Provider=PCSOFT.HFSQL;Data Source=c:\My HyperFileSQL Database\MyAnalysis.wdd;Initial Catalog=c:\My HyperFileSQL Database); 
                    //(&quot;Provider=PCSOFT.HFSQL;Data Source=c:\\My HyperFileSQL Database\\MyAnalysis.wdd;Initial Catalog=c:\\My HyperFileSQL Database&quot;);
                myOleDb.Open();
                // Specify the Query
                OleDbCommand MyQuery = new OleDbCommand(&quot;SELECT ID,AccountsID,DistrictStudentNbr,FingerID,Features FROM FingerPrints&quot;,myOleDb);
                // Run the Query
                //OleDbDataReader MyData = MyQuery.ExecuteReader();
                // Read first
                OleDbDataReader MyDataReader = MyQuery.ExecuteReader();
                //MyDataReader.Read();
                // Display
                //textOLE.AppendText(MyDataReader.ToString());
                for (int i = 1; i &lt; 15; i++)
                {
                    if (MyDataReader.Read())
                    {
                        var ID = MyDataReader.GetValue(0);
                        var accountID = MyDataReader.GetValue(1);
                        var districtStudentNbr = MyDataReader.GetValue(2);
                        var fingerID = MyDataReader.GetValue(3);
                        var features = MyDataReader.GetValue(4);
                        // Display
                        textOLE.AppendText(string.Format(&quot;ID={0},AccountID={1},FingerID={2},FeaturesType={3}\n &quot;,ID.ToString(),accountID.ToString(),fingerID,features.GetType()));
                    }
                    else
                    {
                        textOLE.AppendText(&quot;EOF&quot;);
                        break;
                    }
                }
                // Close
                MyDataReader.Close();
                myOleDb.Close();
        
            }
            catch(Exception ex)
            {
                textOLE.AppendText(&quot;Error in connect: \n&quot; + ex.Message);
            }
        }
 
        private void buttonMDB_Click(object sender, EventArgs e)
        {
            textMDB.Text = &quot;&quot;;
            try
            {
                System.Data.OleDb.OleDbConnection myMDB = new System.Data.OleDb.OleDbConnection
                    (&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;+pathTestData+@&quot;\FPID.mdb;&quot;); //  D:\\BioMetrics\\VF_CS_Test\\Exe\\FPID.mdb;&quot;);
                myMDB.Open();
                // Specify the Query
                OleDbCommand MyQuery = new OleDbCommand(&quot;SELECT AccountsID FROM FingerPrints&quot;,myMDB);
                OleDbCommand myCommand = myMDB.CreateCommand();
                myCommand.CommandText = &quot;FingerPrints&quot;;
                // Run the Query
                OleDbDataReader MyDataReader = MyQuery.ExecuteReader();

                for (int i = 1; i &lt; 15; i++)
                {
                    MyDataReader.Read();
                    var accountID = MyDataReader.GetValue(0);
                    // Display
                    textMDB.AppendText(accountID.ToString() + &quot;; &quot;);
                }
                // Close
                MyDataReader.Close();
                myMDB.Close();

            }
            catch (Exception ex)
            {
                textMDB.AppendText(&quot;Error in MDB: \n&quot; + ex.Message);
            }

        }

        private void buttonConvert_Click(object sender, EventArgs e)
        {

            textConvert.Text = &quot;Start of test.\n&quot;;
            try
            {
                WL.clHFAccess hfAccess = new clHFAccess();
                hfAccess.SetDataPath(@&quot;D:\Biometrics\Test_Data&quot;); 
                int _AccountsID = 0;
                int _DistrictStudentNbr = 0;
                string _FingerID;
                //byte[] _FingerPrint;
                byte[] vf42_template;
                byte[] vf63_template;
                // Data access by using a DataSet
                FPIDTestDataSetTableAdapters.Fingerprints1TableAdapter taFP1 = new FPIDTestDataSetTableAdapters.Fingerprints1TableAdapter();
                taFP1.Connection.ConnectionString = @&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\BioMetrics\Test_Data\FPID.mdb&quot;;
                FPIDTestDataSet dsFP1s = new FPIDTestDataSet(); 
                taFP1.Fill(dsFP1s.Fingerprints1);  
                textConvert.AppendText(string.Format(&quot;WD Fingerprints: {2} Data path = {0}\nAccess MDB path = {1}\n&quot;,hfAccess.GetDataPath(),taFP1.Connection.DataSource,hfAccess.gm_iNbrRecords)); 
                int iCount = 0;
                foreach (FPIDTestDataSet.Fingerprints1Row fingerprint in dsFP1s.Fingerprints1.Rows)
                {
                    iCount++;
                    //if (iCount &gt; 15) break;
                    // Convert old template to new format:
                    vf42_template = fingerprint.Features;
                    NFRecord nfrecord = new NFRecord(vf42_template);
                    vf63_template = nfrecord.Save();
                    // Write to HF
                    _AccountsID = fingerprint.AccountsID;
                    _DistrictStudentNbr = fingerprint.DistrictStudentNbr;
                    _FingerID = fingerprint.FingerID;
                    if (hfAccess.WriteData(_AccountsID, _DistrictStudentNbr, _FingerID,  vf63_template) )
                    {
                        // Message
                        textConvert.AppendText(fingerprint.AccountsID.ToString() + &quot;; &quot;);
                    }
                    else
                    {
                        textConvert.AppendText(&quot;Error: &quot;+fingerprint.AccountsID.ToString() + &quot;; &quot;);
                    }
                    nfrecord.Dispose();
                }
                textConvert.AppendText(string.Format(&quot;\nAdded {0} HF fingerprints.\n Now {1} fingerprints.&quot;,iCount,hfAccess.gm_iNbrRecords));
                hfAccess = null;
                dsFP1s.Dispose();
                taFP1.Dispose();
            }
            catch (Exception ex)
            {
                // Display the errors
                textConvert.AppendText(&quot;Error: Source = &quot; + ex.Source + &quot;\n&quot;);
                textConvert.AppendText(&quot;Error: Message = &quot; + ex.Message + &quot;\n&quot;);
            }
            
            textConvert.AppendText(&quot; End of test.&quot;);
        }

        private void buttonDataSet_Click(object sender, EventArgs e) // Read Access with dataset
        {
            textDataSet.Text = &quot;&quot;;
            try
            {
                // Data access by using a DataSet
                //FPIDDataSetTableAdapters.FingerprintsTableAdapter ctaFPID = new FPIDDataSetTableAdapters.FingerprintsTableAdapter;
                //FPIDDataSet
                FPIDDataSet_MDBTableAdapters.FingerprintsTableAdapter taFP = new FPIDDataSet_MDBTableAdapters.FingerprintsTableAdapter();
                FPIDDataSet_MDB dsFPs = new FPIDDataSet_MDB();
                taFP.Fill(dsFPs.Fingerprints);
                int iCount = 0;
                foreach (FPIDDataSet_MDB.FingerprintsRow fingerprint in dsFPs.Fingerprints.Rows)
                {
                    iCount++;
                    if (iCount &gt; 15) break;
                    textDataSet.AppendText(fingerprint.AccountsID.ToString() + &quot;; &quot;);
                }
            }
            catch (OdbcException eExcpt)
            {
                // Display the errors
                textDataSet.AppendText(&quot;Error: Source = &quot; + eExcpt.Source);
                textDataSet.AppendText(&quot;Error: Message = &quot; + eExcpt.Message);
                //Console.WriteLine(&quot;Source = &quot; + eExcpt.Source);
                //Console.WriteLine(&quot;Message = &quot; + eExcpt.Message);
            }
        }

        #region Comments and code showing limitations of PC Soft data access 
  /* Note the code below gets the following exception: 
  * The ICommandWithParameters interface is not supported by the &#039;PCSOFT.HFSQL&#039; provider.  
  * Command parameters are unsupported with the current provider.
  *           try
            {
                // FPID Data access by using a DataSet
                FPIDDataSet_MDBTableAdapters.FingerprintsTableAdapter taFP = new FPIDDataSet_MDBTableAdapters.FingerprintsTableAdapter();
                FPIDDataSet_MDB dsFPs = new FPIDDataSet_MDB();
                taFP.Fill(dsFPs.Fingerprints);

                // .FIC access by =======================================================
                System.Data.OleDb.OleDbConnection myFIC = new System.Data.OleDb.OleDbConnection
                    (&quot;Provider=PCSOFT.HFSQL;Data Source=D:\\BioMetrics\\VF_CS_Test\\VF_CS_Test.wdd;Initial Catalog=D:\\BioMetrics\\VF_CS_Test\\exe;&quot;);
                // Experiment with making a data adapter for Insert &amp; Modify
                OleDbDataAdapter adapter = CreateDataAdapter(&quot;SELECT * FROM Fingerprints&quot;, myFIC);

                DataSet dsFIC = new DataSet();
                adapter.Fill(dsFIC);

                // Process FPID records
                int iCount = 0;
                foreach (FPIDDataSet_MDB.FingerprintsRow fingerprint in dsFPs.Fingerprints.Rows)
                {
                    iCount++;
                    if (iCount &gt; 15) break;
                    textConvert.AppendText(fingerprint.AccountsID.ToString() + &quot;; &quot;);
                    // Add to FIC Fingerprints
                   // Parameters not supported by PCSoft
                    //DataRow newFIC = dsFIC.Tables[0].NewRow();
                    //newFIC[&quot;AccountsID&quot;] = fingerprint.AccountsID;
                    //newFIC[&quot;FingerID&quot;] = fingerprint.FingerID;
                    //newFIC[&quot;DistrictStudentNbr&quot;] = fingerprint.DistrictStudentNbr;
                    //byte[] vf42_template = fingerprint.Features;
                    ////NFRecord nfrecord = new NFRecord(vf42_template);
                    ////newFIC[&quot;Features&quot;] = nfrecord;
                    //newFIC[&quot;Features&quot;] = vf42_template;
                    //dsFIC.Tables[0].Rows.Add(newFIC);
                  
                    // Try commands:
                    myFIC.Open();
                    OleDbCommand addFIC = new OleDbCommand(
                        &quot;INSERT INTO Fingerprints (AccountsID) &quot; +
                        &quot;VALUES (?)&quot;, myFIC);
                    //&quot;INSERT INTO Fingerprints (Features, FingerID, AccountsID, DistrictStudentNbr) &quot; +
                    //&quot;VALUES (?, ?, ?, ?)&quot;, myFIC);
                    OleDbParameter p1 = new OleDbParameter();
                    addFIC.Parameters.Add(p1);
                    p1.Value = fingerprint.AccountsID;
                    //fingerprint.Features, fingerprint.FingerID, fingerprint.AccountsID, fingerprint.DistrictStudentNbr);
                    //addFIC.CommandType = System.Data.CommandType.TableDirect;
                    int iAdded = addFIC.ExecuteNonQuery();
                    MessageBox.Show(&quot;Added {0} rows.&quot;, iAdded.ToString());
                }
                adapter.Update(dsFIC);
            }
            catch (OdbcException eExcpt)
            {
                // Display the errors
                textConvert.AppendText(&quot;Error: Source = &quot; + eExcpt.Source);
                textConvert.AppendText(&quot;Error: Message = &quot; + eExcpt.Message);
                //Console.WriteLine(&quot;Source = &quot; + eExcpt.Source);
                //Console.WriteLine(&quot;Message = &quot; + eExcpt.Message);
            }
        }


        public static OleDbDataAdapter CreateDataAdapter(string selectCommand,
        OleDbConnection connection)
        {
        }

           OleDbDataAdapter adapter = new OleDbDataAdapter(selectCommand, connection);

            adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

            // Create the Insert, Update and Delete commands.
            adapter.InsertCommand = new OleDbCommand(
                &quot;INSERT INTO Fingerprints (Features, FingerID, AccountsID, DistrictStudentNbr) &quot; +
                &quot;VALUES (?, ?, ?, ?)&quot;, connection);

            adapter.UpdateCommand = new OleDbCommand(
                &quot;UPDATE Fingerprints SET Features = ?, FingerID, AccountsID = ?, DistrictStudentNbr = ? &quot; +
                &quot;WHERE AccountsID = ?&quot;, connection);

            adapter.DeleteCommand = new OleDbCommand(
                &quot;DELETE FROM Fingerprints WHERE AccountsID = ?&quot;, connection);

            // Create the parameters. Add others !@!!!!!!!!!!!!!!!!!
            adapter.InsertCommand.Parameters.Add(&quot;@AccountsID&quot;,
                OleDbType.Integer, 10, &quot;AccountsID&quot;);
            adapter.InsertCommand.Parameters.Add(&quot;@DistrictStudentNbr&quot;,
                OleDbType.Integer, 10, &quot;DistrictStudentNbr&quot;);
            adapter.InsertCommand.Parameters.Add(&quot;@FingerID&quot;,
                OleDbType.VarChar, 50, &quot;FingerID&quot;);
            adapter.InsertCommand.Parameters.Add(&quot;@Features&quot;,
                OleDbType.Binary, 0, &quot;Features&quot;);

            adapter.UpdateCommand.Parameters.Add(&quot;@AccountsID&quot;,
                OleDbType.Integer, 10, &quot;AccountsID&quot;);
            adapter.UpdateCommand.Parameters.Add(&quot;@DistrictStudentNbr&quot;,
                OleDbType.Integer, 10, &quot;DistrictStudentNbr&quot;);
            adapter.UpdateCommand.Parameters.Add(&quot;@FingerID&quot;,
                OleDbType.VarChar, 50, &quot;FingerID&quot;);
            adapter.UpdateCommand.Parameters.Add(&quot;@Features&quot;,
                OleDbType.Binary, 0, &quot;Features&quot;);

            adapter.DeleteCommand.Parameters.Add(&quot;@AccountsID&quot;,
                OleDbType.Char, 5, &quot;AccountsID&quot;).SourceVersion =
                DataRowVersion.Original;
            return (adapter);
        }
*/
#endregion

        private void buttonWL_Click(object sender, EventArgs e)
        {
            //var testWL = &quot;Test&quot;;
            //var param1 = &quot;Param1&quot;;
            //clLog testLog = new clLog(ref testWL, ref param1);  

            WL.clHFAccess hfAccess = new clHFAccess();
            textWL.Text = &quot;Starting clHFAccess test.\n&quot;;
            textWL.AppendText(&quot;Data Path = &quot;+hfAccess.GetDataPath()+&quot;\n&quot;);
            textWL.AppendText(&quot;hfAccess.TestString = &quot; + hfAccess.GetTestString()+&quot;\n&quot;);
            // Read records:
            textWL.AppendText( &quot;\nStarting Records test usingg clAcess.\n&quot;); 
            textWL.AppendText(&quot;hfAccess.TestString = &quot; + hfAccess.GetTestString() + &quot;\n&quot;);
            int nbrRecords = hfAccess.gm_iNbrRecords;
            textWL.AppendText(&quot;Number of Records = &quot; + nbrRecords.ToString() + &quot;\n&quot;);
            int _ID = 0;
            int _AccountsID = 0;
            int _DistrictStudentNbr = 0;
            //var _FingerPrint = new Neurotec.IO.NBuffer(byte[]);// _Buffer);
            //NFRecord _FingerPrint = new NFRecord(); // _Buffer);
            //Neurotec.IO.NBuffer _FingerPrint;
            //byte[] _FingerPrint;
            //object _FingerPrint = new byte[100];
            //Buffer _FingerPrint;
            //byte[] _FingerPrint = new byte[100];
            //Byte[] _FingerPrint = new Byte[100];
            //try
            //{
            //    if (hfAccess.GetFirstFingerprint(ref _ID, ref _AccountsID, ref _DistrictStudentNbr,ref _FingerPrint))
            //    //if (hfAccess.GetFirstFingerprint( _ID,  _AccountsID,  _DistrictStudentNbr,  _FingerPrint)) 

            //    {
            //        do
            //        {
            //            //textWLAppendText(&quot;Processing Account: &quot; + _AccountsID.ToString()+
            //            //   &quot;, FP_Length = &quot;+_FingerPrint.Length.ToString()+ &quot;\n&quot;);
            //            textWL.AppendText(string.Format(&quot;Processing ID={0} Account: {1}, FP_Length = {2}\n&quot;, _ID, _AccountsID.ToString(),
            //              _FingerPrint.Length));
            //        }
            //        while (hfAccess.GetNextFingerprint(ref _ID, ref _AccountsID, ref _DistrictStudentNbr, ref _FingerPrint));
            //        //while (hfAccess.GetNextFingerprint( _ID, _AccountsID, _DistrictStudentNbr,  _FingerPrint));
            //    }
            //}
            //catch (Exception  ex)
            //{
            //    textWL.AppendText(&quot;Exception: &quot; + ex.Message + &quot;\n&quot;);
            //}
            //hfAccess = null;  // How to dispose? (Getting call stack error)

        }

        private void FormTest_Load(object sender, EventArgs e)
        {
 
        }

        private void buttonWL2_Click(object sender, EventArgs e)
        {
            // Test different methods of passing data from WinDev to C#
            clHFAccess wlTest = new clHFAccess();
            textWL.Text = &quot;Start of parameter test.\n&quot;;
            int testInt = 0;
            byte[] testArray = new byte[20];

            //wlTest.TestD(ref testInt,ref testArray);
            //textWL.AppendText(string.Format(&quot;Test D: testInt={0}, testArray upper bound={1}\n&quot;, testInt, testArray.GetLength(0)));

            wlTest.TestC(ref testInt, ref testArray);
            textWL.AppendText(string.Format(&quot;Test C: testInt={0}, testArray upper bound={1}\n&quot;, testInt, testArray.GetLength(0)));

            textWL.AppendText(&quot;End of test.\n&quot;);
            wlTest = null;
        }

    }
}</pre>
]]></description>
            <dc:creator>Jeff Graham</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 16 May 2024 15:07:32 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,116109,116109#msg-116109</guid>
            <title>psword for analises default (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,116109,116109#msg-116109</link>
            <description><![CDATA[ I saw this in the windev forum and I thibk it is usefull in the solutions forum:<br />
<br />
By default, the data files of user groupware have a specific password. This password is: &quot;PCSGPW2001&quot;.<br />
]]></description>
            <dc:creator>Allard</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 16 Nov 2011 20:42:17 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,113185,113185#msg-113185</guid>
            <title>Instructions for how to set up HFSQL C/S on 4 Linux distributions (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,113185,113185#msg-113185</link>
            <description><![CDATA[ [<a href="http://www.windev.at/html/hfsql_c_s_on_linux.html"  rel="nofollow">www.windev.at</a>]<br />
<br />
Alexander Predl has written up the exact procedure of how to set up HyperFile C/S on a Linux System.<br />
<br />
Three other instruction pdfs (for OpenSuse, Ubuntu 11.04 and Debian) are to follow! Sorry, the first manual is in German only. We plan to translate &amp; publish them in English too!<br />
<br />
This is done in the light of our intention to offer virtual web servers to our customers for HF C/S synchronization of their POS terminals. We&#039;re looking at e.g. [<a href="https://vps.servage.com/plans"  rel="nofollow">vps.servage.com</a>] for setting up such a server. It&#039;s cheap and we can get our customers databases off from our own web server. Sure, it&#039;s possible to use MySQL in ordinary rented web space too but experienced funny limitations by providers. They simply want to limit traffic and aren&#039;t very excited about having large databases running on their servers.<br />
]]></description>
            <dc:creator>Jimbo</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 28 Feb 2013 14:13:26 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,111298,111298#msg-111298</guid>
            <title>[WD16] Select / Unselect the underlayingTreeview-Nodes with the checkmark of the parent node (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,111298,111298#msg-111298</link>
            <description><![CDATA[ Hi,<br />
<br />
this is a recursiv function to select/unselect a node and his children with the checkmark feature of the wd16 treeview.<br />
<br />
Call the function in the treeview &quot;whenever modified&quot; event with the full path of the current node. I think that must be a built in function in future releases of WD.<br />
<br />
---------------------------------------------------------------------------------------------------------------<br />
<br />
<br />
<br />
PROCEDURE Treeview_click_auswerten(sNode is string=&quot;&quot;)<br />
<br />
bStatus is boolean=TREE_Gesamtstruktur[sNode]..Checked<br />
sChild, sChildPath is string<br />
<br />
sChild=TreeGiveChild(TREE_Gesamtstruktur,sNode,tvFirst)<br />
<br />
IF sChild=&quot;&quot; THEN<br />
RESULT &quot;&quot;<br />
ELSE<br />
sChildPath=sNode+TAB+sChild<br />
TREE_Gesamtstruktur[sChildPath]..Checked=bStatus<br />
Treeview_click_auswerten(sChildPath)<br />
END<br />
<br />
WHILE sChild&lt;&gt;&quot;&quot;<br />
sChild=TreeGiveChild(TREE_Gesamtstruktur,sNode,tvNext)<br />
IF sChild=&quot;&quot; THEN<br />
Treeview_click_auswerten(sChildPath)<br />
ELSE<br />
sChildPath=sNode+TAB+sChild<br />
TREE_Gesamtstruktur[sChildPath]..Checked=bStatus<br />
Treeview_click_auswerten(sChildPath)<br />
END<br />
<br />
END]]></description>
            <dc:creator>Michael Drechsel</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Mon, 19 Sep 2011 20:44:25 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,91068,91068#msg-91068</guid>
            <title>[WD14] Balloon Help (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,91068,91068#msg-91068</link>
            <description><![CDATA[ Hi<br />
Windev includes an example of Balloon Help which uses API calls. Unfortunately this just doesn&#039;t seem to work correctly under Win7. The attached example uses standard Windev code to make a balloon help type error message, so that the user is not forced to stop &amp; click on a button to continue data entry.<br />
The file includes a README which explains the general logic behind the example.<br />
[<a href="http://www.expresslanepos.com.au/windev/balloonexample.zip"  rel="nofollow">www.expresslanepos.com.au</a>] <br />
<br />
David<br />
<br />
]]></description>
            <dc:creator>David Egan</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Fri, 03 Feb 2012 13:54:11 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,86294,86294#msg-86294</guid>
            <title>Using an INI file to point to your HF Classic data files... (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,86294,86294#msg-86294</link>
            <description><![CDATA[ Hello everyone,<br />
<br />
I recently had a need to write a bit of code that would allow my app to &quot;know&quot; where the HF classic data files were stored on my app&#039;s network. In a production environment, my app&#039;s EXE is installed on each client PC and on a &quot;main&quot; PC acting as the system &quot;server&quot; in the &quot;C:\Program Files\System&quot; folders. The HF classic data files are stored in a shared folder on the &quot;server&quot; such as &quot;C:\SystemData&quot; and shared appropriately (Where &quot;System&quot; is your app name).<br />
<br />
This all came about via a topic I raised on the main Windev forum concerning &quot;where does WD look for data files?&quot; - [<a href="http://forum.mysnip.de/read.php?27131,85264"  rel="nofollow">forum.mysnip.de</a>]<br />
<br />
Via this thread, I decided to go down the INI file route.<br />
<br />
So, here goes - You&#039;ll need something like the code below for the INI file processing. I&#039;ve tried to keep it logical rather than &quot;fancy&quot; for maintenance purposes. It needs to go in your Project Code (well that&#039;s were I put it), before any data files are processed.<br />
<br />
<pre class="bbcode">
// Setup var for processing INI file
gproviINIResult is int
gprovsFolder is string

// Handle the INI file for Network drive location
IF fDirectoryExist(fExeDir()) THEN
	
	// If INI file exists then read the &#039;Drive&#039; entry
	IF fFileExist(fExeDir + &quot;\System.INI&quot;) THEN
		// If found, then read it
		gprovsFolder = INIRead(&quot;NetworkDrive&quot;,&quot;Drive&quot;,&quot;&quot;,fExeDir + &quot;\System.INI&quot;)
	ELSE
		// INI file not found, so browse for network drive
		gprovsFolder = UserSelectDataDir()
		// Test for no folder selected
		IF gprovsFolder = &quot;&quot; THEN
			// Error already reported in UserSelectDataDir, so get out of here
			EndProgram()
		ELSE
			// Directory selected, so Create/Write INI file entry
			gproviINIResult = INIWrite(&quot;NetworkDrive&quot;,&quot;Drive&quot;,gprovsFolder,fExeDir + &quot;\System.INI&quot;)
		END
	END
ELSE
	
	// Directory doesn&#039;t already exist, so create DIR
	fMakeDir(fExeDir())
	// INI file not found, so browse for network drive
	gprovsFolder = UserSelectDataDir()
	// Test for no folder selected
	IF gprovsFolder = &quot;&quot; THEN
		// Error already reported in UserSelectDataDir, so get out of here
		EndProgram()
	ELSE
		// Directory selected, so Create/Write INI file entry
		gproviINIResult = INIWrite(&quot;NetworkDrive&quot;,&quot;Drive&quot;,gprovsFolder,fExeDir + &quot;\System.INI&quot;)
	END
END

// Now swap to the drive selected...
HChangeDir(&quot;*&quot;,gprovsFolder)</pre>
<br />
The UserSelectDataDir is a procedure purely to avoid repeating the code: <br />
<br />
<pre class="bbcode">
PROCEDURE UserSelectDataDir()

glocalsDataFolder is string

// Browse for network drive
glocalsDataFolder = fSelectDir(&quot;&quot;, &quot;Select a directory...&quot;, &quot;I can&#039;t seem to locate your data files. Please select the server network directory that contains your data files OR, if this is your server, select the local directory that contains the data files.&quot;, &quot;&quot;)

// Test for no folder selected
IF glocalsDataFolder = &quot;&quot; THEN
	Error(&quot;You must select a local or network folder  to continue!&quot;,&quot;Please re-run the system.&quot;,...
	&quot;If this problem persists or you are not able to select the required folder, then please contact your system administrator for help.&quot;)
END

// Return the folder (blank or otherwise)
RESULT glocalsDataFolder</pre>
<br />
So now when you run your app on each PC for the first time, you&#039;ll be asked where your data files are. From then on, your app will read the INI file on each PC to locate the data files. If you move your data files for any reason, then all you need to do is either amend the INI files on the PC&#039;s or delete them and you&#039;ll be re-prompted - it&#039;s as simple as that! :cheers:<br />
<br />
Hope this helps you on your way...  <br />
]]></description>
            <dc:creator>DarrenF</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Fri, 26 Nov 2010 13:11:18 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,72846,72846#msg-72846</guid>
            <title>Getting printer status (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,72846,72846#msg-72846</link>
            <description><![CDATA[ The code below can be used to read the status of all printers, like in start-settings-printers.<br />
You need to add System.Printing to the dotnet list of your project.<br />
<br />
<pre class="bbcode">
pclLps is LocalPrintServer dynamic
pclLps = new LocalPrintServer
pclEnu is IEnumerator dynamic
PcliEnumObject is PrintQueueCollection dynamic
PcliEnumObject = pclLps:GetPrintQueues()
pclEnu = PcliEnumObject:GetEnumerator()
bOK is boolean = pclEnu:MoveNext()
pq is PrintQueue dynamic
WHILE bOK
	pq = pclEnu:Current
	Trace(pq:FullName,pq:NumberOfJobs,pq:HasPaperProblem,pq:IsDoorOpened,pq:IsNotAvailable,pq:IsOffline,pq:IsInError,pq:IsPaperJammed,pq:IsOutOfPaper,pq:NeedUserIntervention,pq:IsTonerLow)
	bOK = pclEnu:MoveNext()
END</pre>
<br />
btw: in WD15 you can skip the IEnumerator steps and use FOR EACH directly]]></description>
            <dc:creator>Arie</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Mon, 02 Aug 2010 21:47:11 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,69354,69354#msg-69354</guid>
            <title>[WD12] Creating a set of CSV files from corresponding HF files... (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,69354,69354#msg-69354</link>
            <description><![CDATA[ Hi guys,<br />
<br />
Some people may find this useful...? I posted it as a result of this post; [<a href="http://forum.mysnip.de/read.php?27131,69324,69340#msg-69340"  rel="nofollow">forum.mysnip.de</a>]<br />
<br />
In my app, I have a requirement to extract Products (and related info, such as Categories and Catergory usage), into 3 separate CSV files then FTP them upto a web server in order to update the web site. This example shows only the CSV creation part of the requirement.<br />
<br />
You will also see various bits of code referencing window elements - this is because this code sits behind a push button on a window and also updates 3 progress bars (one for each CSV file), on the same window.<br />
<br />
It may be more complex than you need, but hopefully you can glean the information you need - Enjoy! :spos:<br />
<br />
<pre class="bbcode">
// Get counts of the 3 tables I&#039;m sending data from to use with progress bars
HExecuteQuery(QRY_CountActiveCategories)
glocaliCatCount is int = HNbRec(QRY_CountActiveCategories)
HExecuteQuery(QRY_CountActiveWebProducts)
glocaliProdCount is int = HNbRec(QRY_CountActiveWebProducts)
HExecuteQuery(QRY_CountProducts2Categories)
glocaliPrd2CatCount is int = HNbRec(QRY_CountProducts2Categories)

// Set-up progress bars
WPBAR_Products..MinValue = 0
WPBAR_Products..MaxValue = glocaliProdCount
WPBAR_PageNodes..MinValue = 0
WPBAR_PageNodes..MaxValue = glocaliCatCount
WPBAR_PageProducts..MinValue = 0
WPBAR_PageProducts..MaxValue = glocaliPrd2CatCount
//Set up actual counts
glocaliPBarProdCount,glocaliPBarCatCount,glocaliPBarP2CCount is int = 0

// Set-up variables
glocaliTempCount is int
glocalsSep is string = WEDIT_TypeOfSeparator
glocalsQuotes is string = WEDIT_TypeOfQuotes
glocalsSampleData is string = &quot;&quot;
nFileID1,nFileID2,nFileID3 is int
sMyString is string

// Decide if quotes are required around the data
IF WCB_IncludeQuotes = False THEN
	glocalsQuotes = &quot;&quot;
END

// Create the blank files in the &quot;ftp&quot; folder
nFileID1 = fOpen(WEDIT_CSVFielname1, foCreate+foReadWrite)
nFileID2 = fOpen(WEDIT_CSVFielname2, foCreate+foReadWrite)
nFileID3 = fOpen(WEDIT_CSVFielname3, foCreate+foReadWrite)

// Did any of the files fail to open correctly?
IF nFileID1 = -1 OR nFileID2 = -1 OR nFileID3 = -1 THEN

	// Error trying to open the Product CSV file in read/write mode
	IF nFileID1 = -1 THEN
		Error(&quot;Error: Unable to create the Product CSV file!&quot;, ErrorInfo())
		RETURN
	END

	// Error trying to open the PageNodes CSV file in read/write mode
	IF nFileID2 = -1 THEN
		Error(&quot;Error: Unable to create the PageNodes CSV file!&quot;, ErrorInfo())
		RETURN
	END

	// Error trying to open the PageProducts CSV file in read/write mode
	IF nFileID3 = -1 THEN
		Error(&quot;Error: Unable to create the PageProducts CSV file!&quot;, ErrorInfo())
		RETURN
	END

ELSE

	// Reset counter
	glocaliTempCount = 0
	
	// Tax Rate control var
	glocaliTempSTDID is int
	glocaliTempZEROID is int
	glocalsTempTaxCode is string
			
	// Read the STD Tax Rate to get ID
	HReadSeek(Tax_Rates,cCode,&quot;STD&quot;)
	IF HFound() THEN
		// Set depending on what
		glocaliTempSTDID = Tax_Rates.ID
	ELSE
		// Error getting tax info...
		Error(&quot;Error: Unable to find the STD VAT tax record!&quot; + CR + &quot;There should be a VAT tax record with a code of STD, and I can&#039;t find it on the database.&quot; + CR + &quot;Please check via the VAT Maintenance option and try this option again.&quot;, ErrorInfo())
		RETURN
	END
	
	// Read the ZERO Tax Rate to get ID
	HReadSeek(Tax_Rates,cCode,&quot;ZERO&quot;)
	IF HFound() THEN
		// Set depending on what
		glocaliTempZEROID = Tax_Rates.ID
	ELSE
		// Error getting tax info...
		Error(&quot;Error: Unable to find the ZERO VAT tax record!&quot; + CR + &quot;There should be a VAT tax record with a code of ZERO, and I can&#039;t find it on the database.&quot; + CR + &quot;Please check via the VAT Maintenance option and try this option again.&quot;, ErrorInfo())
		RETURN
	END

	// Loop through each product
	FOR EACH Product_Variants
		
		// Only consider products that are flagged as Web products and are also flagged as Active
		IF Product_Variants.bWeb = True AND Product_Variants.bActive = True THEN

			// Fill the string to write in the file
			
			// prod_id = ID
			sMyString = glocalsQuotes + Product_Variants.ID + glocalsQuotes + glocalsSep
			//sMyString = glocalsQuotes + Product_Variants.cCode_External + glocalsQuotes + glocalsSep
			
			// product_name = cTitle
			sMyString = sMyString + Charact(34) + Product_Variants.cTitle + Charact(34) + glocalsSep
			
			// unitprice = cyRetail
			sMyString = sMyString + glocalsQuotes + Product_Variants.cyRetail + glocalsQuotes + glocalsSep
			
			// rrp_proce = cySRP
			sMyString = sMyString + glocalsQuotes + Product_Variants.cySRP + glocalsQuotes + glocalsSep
			
			// weight = nWeight
			sMyString = sMyString + glocalsQuotes + Product_Variants.nWeight + glocalsQuotes + glocalsSep
			
			// taxcode = See code...
			IF Product_Variants.FK_Tax = glocaliTempSTDID THEN
				
				glocalsTempTaxCode = &quot;0&quot;
				
			ELSE IF Product_Variants.FK_Tax = glocaliTempZEROID THEN
				
				glocalsTempTaxCode = &quot;2&quot;
				
			END
						
			sMyString = sMyString + glocalsQuotes + glocalsTempTaxCode + glocalsQuotes + glocalsSep
			
			// displayoff = &quot;1&quot;
			sMyString = sMyString + glocalsQuotes + &quot;1&quot; + glocalsQuotes + glocalsSep
			
			// options = ???
			sMyString = sMyString + glocalsQuotes + &quot;&quot; + glocalsQuotes + glocalsSep
			
			// description = cDescription
			sMyString = sMyString + Charact(34) + Product_Variants.cDescription + Charact(34) + glocalsSep

			// long_description = &lt;various&gt; see code...
			IF Product_Variants.cWebDesc &lt;&gt; &quot;&quot; THEN
				
				// First use the Web description if it&#039;s not empty
				sMyString = sMyString + Charact(34) + Product_Variants.cWebDesc + Charact(34)
				
			ELSE IF Product_Variants.cB2BDesc &lt;&gt; &quot;&quot; THEN
				
				// If Web description is blank, then use B2B description
				sMyString = sMyString + Charact(34) + Product_Variants.cB2BDesc + Charact(34)
				
			ELSE
				
				// If both the above are empty then put something in there
				sMyString = sMyString + Charact(34) + Product_Variants.cDescription + Charact(34)				
				
			END
			

			// Write to the Products CSV file
			fWriteLine(nFileID1, sMyString)	
			
			// Create Preview string for output later
			IF glocaliTempCount &lt; 100 THEN
				// Add this row to the preview
				IF glocaliTempCount = 1 THEN 
					glocalsSampleData = glocalsSampleData + sMyString
				ELSE
					glocalsSampleData = glocalsSampleData + CR + sMyString	
				END	
			END
			
			// Now write to the the PageProducts CSV file
			sMyString = glocalsQuotes + Product_Variants.FK_Category + glocalsQuotes + glocalsSep
			sMyString = sMyString + glocalsQuotes + Product_Variants.ID + glocalsQuotes + glocalsSep
			sMyString = sMyString + glocalsQuotes + &quot;0&quot; + glocalsQuotes +glocalsSep
			// Just for me - not required for Get Trolleyed system
			sMyString = sMyString + glocalsQuotes + Product_Variants.cTitle + glocalsQuotes
			
			// Write to the PageProducts CSV file based on the current product
			fWriteLine(nFileID3, sMyString)	
			
			// Keep track of the number of records in the file
			glocaliTempCount ++
			glocaliPBarP2CCount ++
			glocaliPBarProdCount ++
			WPBAR_Products = glocaliPBarProdCount
			WPBAR_PageProducts = glocaliPBarP2CCount
			
		END
	END
END

// Write all the PageNodes to a CSV file
FOR EACH Categories 
	
	// Now write to the the PageProducts CSV file
	sMyString = glocalsQuotes + Categories.ID + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + Categories.FK_Parent + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + Categories.cDescription + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + &quot;&quot; + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + Categories.cTreeBranch + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + &quot;&quot; + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + &quot;&quot; + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + &quot;&quot; + glocalsQuotes + glocalsSep
	sMyString = sMyString + glocalsQuotes + &quot;0&quot; + glocalsQuotes
	
	// Write into the PageProducts CSV file based on the current product
	fWriteLine(nFileID2, sMyString)	
	
	glocaliPBarCatCount ++
	WPBAR_PageNodes = glocaliPBarCatCount
	
END

// Now close the CSV files
fClose(nFileID1)
fClose(nFileID3)
fClose(nFileID2)

// Set the on screen preview field with the preview data...
WEDIT_Preview = glocalsSampleData

IF glocaliTempCount &gt; 0 THEN

	// Show the user a message
	NextTitle(&quot;File Created&quot;)
	Info(&quot;Product Data Feed files were successfully created!&quot; + CR + &quot;The required Data Feed files have been created containing &quot; + glocaliTempCount + &quot; products.&quot; + CR + &quot;Don&#039;t forget to press the Send Data Feed Files button to actually send the files to your FTP server.&quot;)

ELSE
	
	// Show the user a message
	NextTitle(&quot;File Create Error!&quot;)
	Info(&quot;Sorry, I couldn&#039;t find any products to put into the Product Data Feed file!&quot; + CR + &quot;Remember: Only products which have the &#039;Web&#039; check box set on the Product Maintenance screen will be selected for processing.&quot;)
	
END</pre>
<br />
<br />
]]></description>
            <dc:creator>DarrenF</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 26 Jul 2011 12:30:51 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,44381,44381#msg-44381</guid>
            <title>NOTE: This forum is for WinDev SOLUTIONS only, please, post your questions to the WinDev Forum! (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,44381,44381#msg-44381</link>
            <description><![CDATA[ Dear visitor,<br />
<br />
this forum has been made available for those who can offer solutions to known problems, algorithms, demo programs etc.<br />
<br />
For asking questions in regards to WinDev programming, please use the main WinDev forum [<a href="http://forum.mysnip.de/list.php?27131"  rel="nofollow">forum.mysnip.de</a>] ! <br />
<br />
Kind regards,<br />
Guenter]]></description>
            <dc:creator>Jimbo</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 14 Jan 2021 15:13:21 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,44188,44188#msg-44188</guid>
            <title>How to make a treeview with parents (3 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,44188,44188#msg-44188</link>
            <description><![CDATA[ Hi all,<br />
<br />
I thought I share this knowledge I gained about tree and parents.<br />
<br />
I have 1 file named contacts. With a ID int and IDParent int field.<br />
<br />
The IDParent contains the ID of the Parent in the same file.<br />
<br />
To let an entry be a parent of a parent of a parent etc.. I found it was very easy after reading the help instead of coding with trial and error. This way also runs the query ones so, the filling of the treeview is very fast. (I only tested it with a few hundred entries, so if anyone wants to try with more entries and let me (us) know how fast/slow this becomes it would be much appreciated. I hope it is very helpful and if it can be fine-tuned I love to hear it.<br />
<br />
So let us start.<br />
<br />
I created a query of the datafile called QRY_TreeContacts.<br />
<br />
<pre class="bbcode">
SELECT 
	Contacts.ID AS ID,	
	Contacts.IDParent AS IDParent,	
	Contacts.Name AS Name,	
	Contacts.IsDeleted AS IsDeleted,	
	Contacts.IDIcon AS IDIcon
FROM 
	Contacts
ORDER BY 
	IDParent ASC</pre>
<br />
<br />
<pre class="bbcode">
My Query 
sRoot is string
sTrash is string
sInbox is string

sParentNode is string

sRoot 	= &quot;Categories&quot;
sTrash 	= &quot;Deleted Items&quot;

sParentNode = &quot;&quot;

TreeDeleteAll(TREE_CONTACTS)
HReadSeek(Icons,ID,1,hIdentical)
TreeAdd(TREE_CONTACTS,sRoot,Icons.Icon,Icons.Icon,0)
HReadSeek(Icons,ID,-11,hIdentical)
TreeAdd(TREE_CONTACTS,sTrash,Icons.Icon,Icons.Icon,-11)

HExecuteQuery(QRY_TreeContacts)
HReadFirst(QRY_TreeContacts)

WHILE NOT HOut()
	
	HReadSeek(Icons,ID,QRY_TreeContacts.IDIcon,hIdentical)
	sParentNode = QRY_TreeContacts.Name
	
	IF NOT QRY_TreeContacts.IDParent = 0 THEN
		sParentNode = TreeFind(TREE_CONTACTS, QRY_TreeContacts.IDParent)
		TreeAdd(TREE_CONTACTS,sParentNode+TAB+QRY_TreeContacts.Name,Icons.Icon,Icons.Icon,QRY_TreeContacts.ID,tvAlphaSort+tvAcceptDuplicate)
	ELSE
		IF NOT QRY_TreeContacts.IsDeleted THEN
			TreeAdd(TREE_CONTACTS,sRoot+TAB+QRY_TreeContacts.Name,Icons.Icon,Icons.Icon,QRY_TreeContacts.ID,tvAlphaSort+tvAcceptDuplicate)
		ELSE IF QRY_TreeContacts.IsDeleted THEN
			TreeAdd(TREE_CONTACTS,sTrash+TAB+QRY_TreeContacts.Name,Icons.Icon,Icons.Icon,QRY_TreeContacts.ID,tvAlphaSort+tvAcceptDuplicate)	
		END
	END
	HReadNext(QRY_TreeContacts)
END

TreeSort(TREE_CONTACTS,sRoot,tvUp)</pre>
]]></description>
            <dc:creator>Carlo Hermus</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 08 Feb 2024 10:12:30 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,43966,43966#msg-43966</guid>
            <title>German Holidays (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,43966,43966#msg-43966</link>
            <description><![CDATA[ <br />
Hi, it&#039;s just a start, there will be a full calendar with holidays of the German speaking countries ...<br />
<br />
[<a href="http://www.windev.at/html/feiertage.html"  rel="nofollow">www.windev.at</a>]<br />
<br />
Kind regards,<br />
Guenter]]></description>
            <dc:creator>Jimbo</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 12 Jan 2010 11:02:25 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,39016,39016#msg-39016</guid>
            <title>Import from DBF (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,39016,39016#msg-39016</link>
            <description><![CDATA[ Here is my solution how to import data from DBF with very little code.<br />
I hope this will be very useful. I love to use it with Progress-Bar so I put code here<br />
if you also love to see what happening with your data. <br />
<br />
Button code, on click:<br />
<pre class="bbcode">
dsKontaQuery is Data Source

//Same name can not be for DBF and for one into analysis THEN alias will be KTA 
HDBOpen(&quot;KTA&quot;,&quot;KTA&quot;,&quot;C:\IMPORT\KONTA.DBF&quot;)

sSql is string = &quot;SELECT * FROM KTA&quot;
IF NOT HExecuteSQLQuery(dsKontaQuery,hQueryDefault,sSql) THEN
	ErrorInfo(errFullDetails)
END

HCreation(Konta)
TableDisplay(TABLE_Konta,taStart)
nUkupno is int = HNbRec(dsKontaQuery)
nRbr is int =0

PROGBAR_ProgressBar1..MinValue=0
PROGBAR_ProgressBar1..MaxValue=nUkupno

HReadFirst(dsKontaQuery)
WHILE NOT HOut(dsKontaQuery)
	nRbr += 1
	PROGBAR_ProgressBar1 = nRbr
	Konta.Konto= dsKontaQuery.Konto
	Konta.Naziv_Konta=NoSpace(dsKontaQuery.kon_naz)
	HAdd(Konta)
	HReadNext(dsKontaQuery)
END
TableDisplay(TABLE_Konta,taStart)  //Re-display Table from start</pre>
<br />
And voila your DBF data are imported very very fast. Zooooomm.]]></description>
            <dc:creator>ICI</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 22 Oct 2009 00:32:56 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,38744,38744#msg-38744</guid>
            <title>XMLtoTable (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,38744,38744#msg-38744</link>
            <description><![CDATA[ Windev should consider to provide an XLMToTable function so that I don&#039;t need to write this as a workaround. <br />
<br />
See below: <br />
<br />
// 14:16:38 Fri 9 Oct 2009 xml2memoryTable <br />
// 14:44:51 Sat 10 Oct 2009 <br />
<br />
XMLDoc is string=&quot;XML&quot; <br />
XMLInfo is string <br />
sXmlTable is string = &quot;C:\1.xml&quot; <br />
sTableName is string <br />
sDir is string=completeDir(&quot;c:\wd7\7&quot;) //Make your own DIR <br />
sFile is string=&quot;dTable&quot; <br />
<br />
HCancelDeclaration(dTable) <br />
TableDesc is file description <br />
ItemDesc is item description <br />
dTable is data source <br />
fDelete(sFile+&quot;.fic&quot;) <br />
fDelete(sFile+&quot;.ndx&quot;) <br />
hDuplicateKey is int = 2062 //2061 for hUniqueKey <br />
nSize is int = 40 <br />
<br />
// Description of the &quot;dTable&quot; file <br />
TableDesc..Name = &quot;dTable&quot; <br />
TableDesc..Type = hFileNormal <br />
TableDesc..FicCryptMethod = hCryptStandard <br />
<br />
<br />
XMLClose(XMLDoc) //Frees the XML document <br />
<br />
// Load the XML file in a string <br />
XMLInfo = fLoadText(sXmlTable) <br />
// Initialize the XML functions on this file <br />
XMLDocument(XMLDoc,XMLInfo) <br />
// point to the root <br />
XMLRoot(XMLDoc) <br />
XMLFind(XMLDoc, null) <br />
sTableName = XMLElementName(XMLDoc) <br />
//trace(&quot;ParentName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
<br />
XMLChild(XMLDoc) <br />
XMLFirst(XMLDoc) <br />
<br />
//trace(&quot;elementName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
ItemDesc..Name = XMLElementName(XMLDoc) <br />
ItemDesc..Type = hItemText <br />
ItemDesc..Size = nSize <br />
ItemDesc..KeyType = hDuplicateKey <br />
<br />
HDescribeItem ( TableDesc , ItemDesc ) <br />
<br />
nElement is int = 1 <br />
XMLNext(XMLDoc) <br />
WHILE NOT XMLOut(XMLDoc) <br />
nElement = nElement + 1 <br />
ItemDesc..Name = XMLElementName(XMLDoc) <br />
ItemDesc..Type = hItemText <br />
ItemDesc..Size = nSize <br />
HDescribeItem ( TableDesc , ItemDesc ) <br />
// trace(&quot;elementName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
XMLNext(XMLDoc) <br />
END <br />
<br />
HDeclareExternal(sDir+sFile+&quot;.fic&quot;, sFile) <br />
HDescribeFile ( TableDesc ) <br />
HImportXML ( dTable , sXmlTable , hImpCreation ) <br />
//Make a DUMMY Memory table, a few columns will do, mine is a 3-column table <br />
OpenChild(&quot;t=c:\wd7\wdw\t03.wdw&quot;) <br />
<br />
BuildBrowsingTable(&quot;t.tbl&quot;, sFile,taFillTable) //t.tbl WDWname.TableName <br />
HCancelDeclaration(sFile) <br />
HClose(dTable) <br />
<br />
//trace(&quot;Total # of Elements in &quot;+ sTableName + &quot; = &quot; + nElement) <br />
// Cancels the search for the other XML functions used thereafter <br />
<br />
XMLCancelSearch(XMLDoc) <br />
XMLClose(XMLDoc) //Frees the XML document <br />
]]></description>
            <dc:creator>King</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 18 May 2010 17:02:25 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,38662,38662#msg-38662</guid>
            <title>Example of a Hierarchy Pop-up (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,38662,38662#msg-38662</link>
            <description><![CDATA[ Hello All,<br />
<br />
This is a example of a Hierarchy Pop-up created in Windev 14 called Zone Picker.<br />
<br />
Zone Picker<br />
<br />
[<a href="http://www.mediafire.com/file/dt4mimj2zgz/Zone"  rel="nofollow">www.mediafire.com</a>] Picker.zip<br />
<br />
<img src="http://i38.tinypic.com/2ebtmbt.jpg" class="bbcode" border="0" /><br />
<br />
<br />
Have fun,<br />
<br />
<br />
Dennis W]]></description>
            <dc:creator>DW</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Fri, 16 Oct 2009 18:28:46 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,37576,37576#msg-37576</guid>
            <title>Automatic update via http (2 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,37576,37576#msg-37576</link>
            <description><![CDATA[ Hi all,<br />
<br />
Here&#039;s a simple live update program, you can download the project <a href="http://www.vzs.nl/windev/update.zip"  rel="nofollow">here</a><br />
<br />
Instructions:<br />
<br />
Create a directory on your website called updates.<br />
In this directory you put future downloads of the latest version of the update program itself and the .upd files for your applications. (myapp1.upd, myapp2.upd etc.)<br />
For each application you create a subdir containing the files to be downloaded.<br />
<br />
Incorporate the global_procedures_of_VZupdate.wdg in your program and in the project initialization code input the line: <br />
check_update()<br />
<br />
Open the project VZ_update.wdp and create the executable.<br />
The file VZ_updateNN.exe should be in the same dir as your application&#039;s executable. (NN being the Windev version) So Include it in your first setup.<br />
<br />
Create a textfile containing the files to be updated.<br />
The filename is the name of your app + .upd<br />
It contains the fileinfo separated by tabs:<br />
Version: this is the version of your exe file<br />
Date: this is the release date of the file<br />
Filename: this is the file to be downloaded<br />
Size: this is the filesize in bytes<br />
<br />
example of the content of a .upd file:<br />
02.54  tab  20091003  tab  subdir_myappname/myprogram.exe  tab  4879415<br />
02.50  tab  20090621  tab  subdir_myappname/myprogram.wdd  tab  31577<br />
02.14  tab  20090331  tab  subdir_myappname/WD120ZIP.DLL  tab  364544<br />
<br />
Upload this file to your server.<br />
Upload the files to be updated to the same relative location as indicated in the .upd file. <br />
<br />
Put a textfile called VZupdateNN.upd containing the current version of VZ_updateNN.exe in the update directory of your website. (again: NN being the Windev version)<br />
The VZ_update program uses the Windev framework of your application, so it should be the same Windev version. You create a VZ_update.exe for each Windev version of the deployed programs.<br />
<br />
Of course you are free to rename all files to your liking.<br />
<br />
If you have made improvements to this program please report them on the forum, so we can all benefit.<br />
<br />
todo:<br />
Create a Windev program to create and upload the .upd files and all files to be updated.<br />
<br />
notes:<br />
- the sIniName variable refers to an ini file in which the user&#039;s choice to enable live-update is stored. (e.g. if they don&#039;t have an internet connection)<br />
- the testing of the program is not easy, because on testmode the circumstances are quite different from a running executable.<br />
<br />
Best regards,<br />
Piet]]></description>
            <dc:creator>Piet van Zanten</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 21 Sep 2011 09:50:52 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,35348,35348#msg-35348</guid>
            <title>How to make a Table forget its column configuration - solution (1 reply)</title>
            <link>https://www.wxforum.info/read.php?27161,35348,35348#msg-35348</link>
            <description><![CDATA[ Hi,<br />
<br />
WinDev AAF offers to move, resize, hide and unhide colums of a Table. But there is no easy way to return to the original column configuration. The code below allows for being added to all Tables (with the name &#039;Table&#039;, others have to bee adapted) in the System popup-menu as a menu-item of something like &#039;Reset Column Configuration&#039;:<br />
<br />
<pre class="bbcode">

TC,TX, TW, TD are int
TN is string

TC = TableCount(Table,toColumn)

FOR TX = 1 TO TC
	TN = TableEnumColumn(Table,TX)
	TableMoveColumn(Table,TN,TX)
	IF {&quot;Table.&quot;+TN}..InitialVisible = True THEN
		{&quot;Table.&quot;+TN}..Visible = True
		{&quot;Table.&quot;+TN}..Width = {&quot;Table.&quot;+TN}..InitialWidth
		TW += {&quot;Table.&quot;+TN}..Width
	END
END

TD = Table..Width - TW - 18  // 18 ~= Width of vertical scrollbar of Table
FOR TX = 1 TO TC
	TN = TableEnumColumn(Table,TX)
	IF {&quot;Table.&quot;+TN}..InitialVisible = True THEN
		{&quot;Table.&quot;+TN}..Width += TD * {&quot;Table.&quot;+TN}..AnchorRateWidth / 1000
	END
END</pre>
<br />
<br />
Note 1: I wasn&#039;t able to find the width of the vertical scrollbar of the table programmatically. Vertical scrollbars of my tables (&#039;110 System&#039;) are 18 pixels in width ..<br />
<br />
Note 2: to make the second part of the procedure work, take care that the original AnchorRateWidth of the visible colums add up to 100%<br />
<br />
Note 3: In order to make this code even independent from the name of the Table (&#039;Table&#039;) you&#039;d have to experiment with <b><span style="color:#0000FF">PopupField</span>(..)</b> to recover the name of the Table. However, I find it easier to change the Table&#039;s name in code ..<br />
<br />
Kind regards,<br />
Guenter ]]></description>
            <dc:creator>Jimbo</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Sat, 12 Dec 2009 23:38:30 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,32540,32540#msg-32540</guid>
            <title>Import data from CSV file (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,32540,32540#msg-32540</link>
            <description><![CDATA[ <pre class="bbcode">


PROCEDURE ImportCSVdata(sFullFileName is string)

sCsvSeparator is string = &quot;;&quot;
sCsvRow is string
nFileNum is int
nLoop is int
nCol is int
nJumCol is int = 1

// Create a Table Control with the sufficient (more) column
TableDeleteAll(TABLE_Table1)

nFileNum = fOpen(sFullFileName,foRead)
IF nFileNum = -1 THEN
	Error(&quot;File not found!&quot;)
ELSE
	LOOP
		sCsvRow=fReadLine(nFileNum)
		nCol=1
		FOR nLoop = 1 TO Length(sCsvRow)
			IF sCsvRow[[nLoop]] = sCsvSeparator THEN 
				sCsvRow[[nLoop]] = TAB
				nCol ++
			END
		END
		TableAdd(TABLE_Table1,sCsvRow)
		IF sCsvRow = EOT THEN BREAK
	END
	fClose(nFileNum)
        FOR x = 1 TO TableCount(TABLE_Table1)
             myfield1 = TABEL_Table1.column1[x]
             myfield2 = TABLE_Table1.column2[x]
             ....
             // Put your logic to HAdd or Hmodify here
             ....
        END

END</pre>
<br />
HTH<br />
Toddy<br />
]]></description>
            <dc:creator>Toddy Utomo</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 04 Aug 2009 05:52:08 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,32137,32137#msg-32137</guid>
            <title>Printing labels on a Zebra LP 2844 using Zebra EPL (2 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,32137,32137#msg-32137</link>
            <description><![CDATA[ It took a bit of thinking about as I&#039;ve not used the fOpen etc. commands before, but here it is - a simple working Zebra LP 2844 example using the Zebra EPL language commands:<br />
<br />
<pre class="bbcode">
// EXAMPLE - Printing a product label (with barcode) on a Zebra LP 2844

// Device name
glocalsDevice is string = &quot;LPT1&quot;

// String to send to printer
sMyString is string

// Port no. returned from fOpen
glocaliPort is int

// Open the file
glocaliPort = fOpen(glocalsDevice, foCreateIfNotExist)

IF ErrorOccurred THEN
	Error(&quot;Unable to contact the printer! &quot;, ErrorInfo())
ELSE
	// Init the label
	sMyString = Charact(10) + &quot;N&quot; + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - Business name
	sMyString = &quot;A230,5,0,3,2,2,N,&quot; + Charact(34) + &quot;XYZ Cycles&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - Manufacturer name
	sMyString = &quot;A230,45,0,3,1,1,N,&quot; + Charact(34) + &quot;Shimano&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - Price
	sMyString = &quot;A480,45,0,3,1,1,N,&quot; + Charact(34) + &quot;1234.99&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - Product name
	sMyString = &quot;A230,65,0,3,1,1,N,&quot; + Charact(34) + &quot;XT 32 hole hub&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - Product Barcode
	sMyString = &quot;B245,90,0,E30,3,5,70,B,&quot; + Charact(34) + &quot;123456789012&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send text - web address
	sMyString = &quot;A250,185,0,3,1,1,R,&quot; + Charact(34) + &quot;www.xyzcycles.co.uk&quot; + Charact(34) + Charact(10)
	fWrite(glocaliPort, sMyString)
	
	// Send P1 print buffer contents
 	sMyString = &quot;P1&quot; + Charact(10)
	fWrite(glocaliPort, sMyString)

	// Close the file
	fClose(glocaliPort)
END</pre>
]]></description>
            <dc:creator>DarrenF</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 10 Aug 2022 09:02:16 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,30279,30279#msg-30279</guid>
            <title>Extended DDW (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,30279,30279#msg-30279</link>
            <description><![CDATA[ <span style="color:#3399FF"><span style="font-size:x-large">Extended DDW</span></span><br />
<br />
You probably like the WinDev exclusive DDW feature, however it has some limitations:<br />
1 - It works only with native WinDev controls.<br />
2 - It relies on the graphic card configuration and on the processor speed.<br />
3 - It doesn&#039;t work with DirectX nor with OpenGL.<br />
<br />
The <b>CreateDDW</b> below has no limitation, however it must be used only on true 32-bit or 64-bit OS (W2K, XP, VISTA, Windows 7).<br />
It is based on direct call to the low level API, and uses the layerd window extended style.<br />
<i><b>It could be used with any third party addons as well as with 3D graphics using DirectX or OpenGL.</b></i><br />
<br />
<br />
<pre class="bbcode">
CONSTANT
   CS_VREDRAW        = 1
   CS_HREDRAW        = 2
   WM_SETCURSOR      = 32
   IDC_WAIT          = 32514
   WS_EX_TOOLWINDOW  = 128
   WS_POPUP          = -2147483648
   WS_DISABLED       = 134217728
   WS_EX_LAYERED     = 524288
   GWL_EXSTYLE       = -20
   LWA_ALPHA         = 2
END</pre>
<br />
<pre class="bbcode">
WNDCLASSEX is structure
   cbSize        is unsigned int //Type C : UINT
   style         is unsigned int //Type C : UINT
   lpfnWndProc   is int      //Type C : WNDPROC
   cbClsExtra    is int      //Type C : int
   cbWndExtra    is int      //Type C : int
   hInstance     is int      //Type C : HINSTANCE
   hIcon         is int      //Type C : HICON
   hCursor       is int      //Type C : HCURSOR
   hbrBackground is int      //Type C : HBRUSH
   lpszMenuName  is int      //Type C : LPCSTR
   lpszClassName is int      //Type C : LPCSTR
   hIconSm       is int      //Type C : HICON
END</pre>
<br />
<pre class="bbcode">
FUNCTION GetWindowRgn(LOCAL nX is int, LOCAL nY is int, LOCAL nhWnd is int)
nRet, nRgn, n1, n2, n3, n4 are int = 0
nRgn = API(&quot;GDI32&quot;, &quot;CreateRectRgn&quot;, n1, n2, n3, n4)
IF API(&quot;USER32&quot;, &quot;GetWindowRgn&quot;, nhWnd, nRgn) THEN
   IF API(&quot;GDI32&quot;, &quot;OffsetRgn&quot;, nRgn, nX, nY) THEN nRet = nRgn
END
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION DDWproc(LOCAL nhWnd is int, LOCAL nMsg is int, LOCAL nwParam is int, LOCAL nlParam is int)
nRet is int
IF nMsg = WM_SETCURSOR THEN
   API(&quot;USER32&quot;, &quot;SetCursor&quot;, API(&quot;USER32&quot;, &quot;LoadCursorA&quot;, Null, IDC_WAIT))
   nRet = 1
ELSE
   nRet = API(&quot;USER32&quot;, &quot;DefWindowProcA&quot;, nhWnd, nMsg, nwParam, nlParam)
END
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION RegisterDDWclass()
wc is WNDCLASSEX
zClass is string ASCIIZ on 16 = &quot;DDWINDOWEX&quot;
wcStyle is int = CS_HREDRAW + CS_VREDRAW
IsInitialized is int = API(&quot;USER32.DLL&quot;, &quot;GetClassInfoExA&quot;, Instance, &amp;zClass, &amp;wc)
IF IsInitialized    = 0 THEN
   wc:cbSize        = Dimension(wc)
   wc:style         = wcStyle
   wc:lpfnWndProc   = &amp;DDWproc
   wc:cbClsExtra    = 0
   wc:cbWndExtra    = 0 // Extend_cbWndExtra * 4
   wc:hInstance     = Instance
   wc:hIcon         = Null
   wc:hCursor       = API(&quot;USER32&quot;, &quot;LoadCursorA&quot;, Null, IDC_WAIT)
   wc:hbrBackground = API(&quot;GDI32&quot;, &quot;GetStockObject&quot;, 4) // BlackBrush
   wc:lpszMenuName  = Null
   wc:lpszClassName = &amp;zClass
   wc:hIconSm       = Null
   IF API(&quot;USER32.DLL&quot;, &quot;RegisterClassExA&quot;, &amp;wc) THEN IsInitialized = True
END
RESULT IsInitialized</pre>
<br />
<pre class="bbcode">
FUNCTION IsOsNT()
nRet is int
sVersion is string = SysWindowsVersion()
IF sVersion = &quot;NT 5&quot; THEN sVersion = &quot;0&quot;
// Check the OS before to apply the shadow effect
IF StringCount(&quot;0XV2&quot;, Left(sVersion, 1)) THEN nRet = -1 // 2000, XP, 2003, VISTA
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION GetWindowLong(LOCAL nHandle is int, LOCAL nIndex is int)
nRet is int = API(&quot;USER32&quot;, &quot;GetWindowLongA&quot;, nHandle, nIndex)
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION SetWindowLong(LOCAL nHandle is int, LOCAL nIndex is int, LOCAL nNewValue is int)
nRet is int = API(&quot;USER32&quot;, &quot;SetWindowLongA&quot;, nHandle, nIndex, nNewValue)
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION SetLayeredWindowAttributes(LOCAL nHandle is int, LOCAL nAlpha is 1-byte unsigned int)
nRet, nBlackColor, nUseStyle are int
IF IsOsNT THEN
  nBlackColor = 0
  nUseStyle = BinaryOR(GetWindowLong(nHandle, GWL_EXSTYLE), WS_EX_LAYERED)
  SetWindowLong(nHandle, GWL_EXSTYLE, nUseStyle)
  nRet = API(&quot;USER32&quot;, &quot;SetLayeredWindowAttributes&quot;, nHandle, nBlackColor, nAlpha, LWA_ALPHA)
END
RESULT nRet</pre>
<br />
<pre class="bbcode">
FUNCTION CreateDDW(LOCAL nParent is int)
nDDW, nUseStyle are is int
stRW is RECT
IF RegisterDDWclass() THEN
   IF nParent &lt;&gt; 0 THEN
      nUseStyle = BinaryOR(WS_POPUP, WS_DISABLED)
      nDDW = API(&quot;USER32&quot;,&quot;CreateWindowExA&quot;, ...
      WS_EX_TOOLWINDOW, ... // SDK extended style
      &quot;DDWINDOWEX&quot;,...      // The unique class name
      &quot;&quot;, ...               // Caption
      nUseStyle, ...        // SDK style
      0, ...                // X location
      0, ...                // Y location
      0, ...                // Control width
      0, ...                // Control height
      nParent, ...          // Parent handle
      0, ...                // Control ID
      Instance, ...         // Instance
      0)
      IF nDDW THEN
         SetLayeredWindowAttributes(nDDW, 132)
         // Get the region of the parent window.
         nRgn is int = GetWindowRgn(0, 0, nParent)
         // Assign same region shape to our DDW window.
         nRet is int = API(&quot;USER32&quot;, &quot;SetWindowRgn&quot;, nDDW, nRgn, 0)
         API(&quot;USER32&quot;, &quot;GetWindowRect&quot;, nParent, &amp;stRW)
         // Setup the good size for our DDW window.
         API(&quot;USER32&quot;, &quot;SetWindowPos&quot;, nDDW, nParent, stRW:nLeft, stRW:nTop, stRW:nRight, stRW:nBottom, SWP_NOACTIVATE)
         API(&quot;USER32&quot;, &quot;ShowWindow&quot;, nDDW, SW_SHOW)
      END
   END
END
RESULT nDDW</pre>
<br />
<pre class="bbcode">
PROCEDURE DestroyDDW(nDDW is int)
IF nDDW THEN API(&quot;USER32&quot;, &quot;DestroyWindow&quot;, nDDW); nDDW = 0</pre>
<br />
To use it, call <b>CreateDDW</b> before to open the child popup, then call <b>DestroyDDW</b> once done.<br />
<b>MyWindow..Handle</b> is the handle of the parent window <u>that should be grayed</u>.<br />
<br />
<b>Syntax example</b>:<br />
<pre class="bbcode">
nDDW is int = CreateDDW(MyWindow..Handle)
   Open(&quot;MyChildPopupWindow&quot;)
DestroyDDW(nDDW)</pre>
]]></description>
            <dc:creator>Patrice Terrier</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Fri, 26 Jun 2009 14:35:15 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,30119,30119#msg-30119</guid>
            <title>Using STATIC variables within a procedure (7 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,30119,30119#msg-30119</link>
            <description><![CDATA[ There is one big feature i am missing in WinDev:<br />
<span style="color:#FF3366">the use of <b>STATIC</b> variables in a procedure to preserve specific values from one call to another.</span><br />
<br />
Actualy there is no other alternative than using GLOBALs, however this is considered as a bad programming pratice in most languages i know, and it doesn&#039;t help to create modular procedures that can be reused from one project to another.<br />
<br />
To work around this problem, i have written a couple of functions (see the code below), <b>but if you have a better solution i would be glad to know about it.</b><br />
<br />
Thank you!<br />
<br />
<br />
_________________________________________________________________<br />
<br />
<span style="color:#0000FF"><b>SetStaticValue</b><pre class="bbcode">
PROCEDURE SetStaticValue(LOCAL sUseString is string, LOCAL nValue is int)
sUseString += &quot;|&quot;
nhMain is int = Handle(MyWindow..Name)
nStaticHandle is int = GetDlgItem(nhMain, ID_STATIC)
IF nStaticHandle = 0 THEN
	nStaticHandle = API(&quot;USER32&quot;, &quot;CreateWindowExA&quot;, 0, &quot;LISTBOX&quot;, &quot;&quot;, WS_CHILD + LBS_HASSTRINGS, 0, 0, 0, 0, nhMain, ID_STATIC, Instance, 0)
END
IF nStaticHandle THEN
	nIndex is int = SendMessage(nStaticHandle, 399, -1, &amp;sUseString)
	IF nIndex &gt; -1 THEN // We found same static
		SendMessage(nStaticHandle, 410, nIndex, nValue)
	ELSE // Add it to our static list
		SendMessage(nStaticHandle, 410, SendMessage(nStaticHandle, 384, 0, &amp;sUseString), nValue)
	END
END</pre>
<br />
<b>GetStaticValue</b><pre class="bbcode">
FUNCTION GetStaticValue(LOCAL sUseString is string)
sUseString += &quot;|&quot;
nValue is int = 0
nhMain is int = Handle(MyWindow..Name)
nStaticHandle is int = GetDlgItem(nhMain, ID_STATIC)
IF nStaticHandle THEN
	nIndex is int = SendMessage(nStaticHandle, 399, -1, &amp;sUseString)
	IF nIndex &gt; -1 THEN // We found it
		nValue = SendMessage(nStaticHandle, 409, nIndex, 0)
	END
END
RESULT nValue</pre></span><br />
<br />
Example showing how to use it:<br />
<span style="color:#0000FF">nFlip is int = <b>GetStaticValue</b>(&quot;nFlip&quot;); nFlip = NOT nFlip; <b>SetStaticValue</b>(&quot;nFlip&quot;, nFlip)</span>]]></description>
            <dc:creator>Patrice Terrier</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Mon, 27 Dec 2010 09:24:49 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,30118,30118#msg-30118</guid>
            <title>Using TRANSFER with API calls (no replies)</title>
            <link>https://www.wxforum.info/read.php?27161,30118,30118#msg-30118</link>
            <description><![CDATA[ <span style="color:#3366FF"><span style="font-size:x-large">Useful TIP</span></span><br />
<br />
You probably know that the WL <b>API</b> keyword returns &quot;only&quot; a long integer whatever the real value returned by the underlaying api call.<br />
<br />
What to do, if the returned value is a pointer to a structure or indeed a real value?<br />
<br />
Then the WL <b>Transfer</b> comes to rescue, here is an example showing you how to turn the Long integer (4-byte int) into a Single 4-byte real.<br />
<br />
<pre class="bbcode">
// Example based on the GDImage encapsulation
FUNCTION ZI_GetZoomValue(LOCAL hWnd is int)
nRet is int = ZI_GetProperty(hWnd, ZI_ZoomFactor)
rValue is 4-byte real       // &lt;----------
Transfer(&amp;rValue, &amp;nRet, 4) // &lt;----------
IF rValue &lt; 0.001 THEN rValue = 1
RESULT rValue</pre>
...<br />
]]></description>
            <dc:creator>Patrice Terrier</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Wed, 24 Jun 2009 15:18:17 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,28082,28082#msg-28082</guid>
            <title>GetGUID (by Guenter) (2 replies)</title>
            <link>https://www.wxforum.info/read.php?27161,28082,28082#msg-28082</link>
            <description><![CDATA[ <pre class="bbcode">
// Summary: &lt;specify the procedure action&gt;
// Syntax:
//[ &lt;Result&gt; = ] GetGUID ()
//
// Parameters:
//	None
// Return Value:
// 	string: // 	None
//
// For instance:
// Indicate an example.
//
PROCEDURE GetGUID() 

GUID is TO structure
	Data1 is int on 4 bytes
	Data2 is int on 2 bytes
	Data3 is int on 2 bytes
	Data4 is fixed array of 8 unsigned int on 1 byte
END 

LOCAL
	i is int on 4 bytes
	udtGuid is GUID
	s is string
	g is string 
	
i=CallDLL32(&quot;OLE32.DLL&quot;,&quot;CoCreateGuid&quot;,&amp;udtGuid) 

IF i = 0 THEN
	s = NumToString(udtGuid:Data1, &quot;08X&quot;)+NumToString(udtGuid:Data2, &quot;04X&quot;)+...
	NumToString(udtGuid:Data3, &quot;04X&quot;)
	IF udtGuid:Data4[1] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[1],&quot;X&quot;)
	IF udtGuid:Data4[2] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[2],&quot;X&quot;)
	IF udtGuid:Data4[3] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[3],&quot;X&quot;)
	IF udtGuid:Data4[4] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[4],&quot;X&quot;)
	IF udtGuid:Data4[5] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[5],&quot;X&quot;)
	IF udtGuid:Data4[6] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[6],&quot;X&quot;)
	IF udtGuid:Data4[7] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[7],&quot;X&quot;)
	IF udtGuid:Data4[8] &lt; 0x10 THEN
		s=s+&quot;0&quot;
	END
	s=s+NumToString(udtGuid:Data4[8],&quot;X&quot;)
END 

RESULT s</pre>
]]></description>
            <dc:creator>Michael Drechsel</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Thu, 10 Dec 2009 18:19:19 +0100</pubDate>
        </item>
    </channel>
</rss>
