<![CDATA[FiveTech Software tech support forums]]> https://forums.fivetechsupport.com Smartfeed extension for phpBB <![CDATA[FiveWin for Harbour/xHarbour :: Re: Lost connection to MySQL server during query :: Reply by PAUL SIMM]]> 2024-12-30T06:06:36-07:00 2024-12-30T06:06:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43528&p=276689#p276689
This code do'snt do this

oCon:Execute(cQwery)

if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif

I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************]]>

This code do'snt do this

oCon:Execute(cQwery)

if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif

I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Lost connection to MySQL server during query :: Reply by JoséQuintas]]> 2024-12-30T06:52:40-07:00 2024-12-30T06:52:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43528&p=276690#p276690
1) On machine with ODBC 3.51
Same query ok on ODBC 5.3 returns that message on ODBC 3.51

2) When update from MySQL 5.6 TO 5.7
I was using INNER JOIN between INT and VARCHAR ( 1 and 0000001 ), this was ok on 5.6.
From 5.7 this is a problem, that requires internal codepage conversion and slow down queries execution

3) A really long time execution query (or do not exists index to optimize query)

4) A query executed by a user with no privileges to do it

5) Connection fail

A first test is try to execute same query on HEIDISQL or anything else, with same user and server, to check result.

If query is the problem, execute again will not solve problem.

Another common problem using connections on Windows:
Before Windows XP service pack 5, half open connections limit was anything about 67 millions, and from service pack 5 limit was reduced to 8, only 8 units.
When close connection, windows move connection to halfopen for a limited time, before really to close it.
connection open/close/open/close/open/close, this can crash application and windows too.

if you are using port 3306 for MySQL, you can check this using
netstat -a | find /i "3306"]]>

1) On machine with ODBC 3.51
Same query ok on ODBC 5.3 returns that message on ODBC 3.51

2) When update from MySQL 5.6 TO 5.7
I was using INNER JOIN between INT and VARCHAR ( 1 and 0000001 ), this was ok on 5.6.
From 5.7 this is a problem, that requires internal codepage conversion and slow down queries execution

3) A really long time execution query (or do not exists index to optimize query)

4) A query executed by a user with no privileges to do it

5) Connection fail

A first test is try to execute same query on HEIDISQL or anything else, with same user and server, to check result.

If query is the problem, execute again will not solve problem.

Another common problem using connections on Windows:
Before Windows XP service pack 5, half open connections limit was anything about 67 millions, and from service pack 5 limit was reduced to 8, only 8 units.
When close connection, windows move connection to halfopen for a limited time, before really to close it.
connection open/close/open/close/open/close, this can crash application and windows too.

if you are using port 3306 for MySQL, you can check this using
netstat -a | find /i "3306"]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Lost connection to MySQL server during query :: Reply by vilian]]> 2024-12-30T07:09:03-07:00 2024-12-30T07:09:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43528&p=276691#p276691 You can use bOnLostServer

* FWMariaConnection:
Reconnection logic improved when the app loses connection to the server.
New data bOnLostServer: If this codeblock is specified, it is called when the
application loses connection with the server.
PAUL SIMM wrote:Is there any way I can change the error message "Lost Connection to MySql server during query" to only log the error to a text file end return false to the calling fintion. At the moment the error is a MsgInfo and the process which is automatic with a Timer blocks the aplication.

This code do'snt do this

oCon:Execute(cQwery)

if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif

I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************
]]>
You can use bOnLostServer

* FWMariaConnection:
Reconnection logic improved when the app loses connection to the server.
New data bOnLostServer: If this codeblock is specified, it is called when the
application loses connection with the server.
PAUL SIMM wrote:Is there any way I can change the error message "Lost Connection to MySql server during query" to only log the error to a text file end return false to the calling fintion. At the moment the error is a MsgInfo and the process which is automatic with a Timer blocks the aplication.

This code do'snt do this

oCon:Execute(cQwery)

if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif

I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Browse of my ADO Class :: Reply by Antonio Linares]]> 2024-12-27T14:07:41-07:00 2024-12-27T14:07:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44894&p=276674#p276674
Very good work!]]>

Very good work!]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Browse of my ADO Class :: Reply by JoséQuintas]]> 2024-12-30T07:10:58-07:00 2024-12-30T07:10:58-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44894&p=276692#p276692
A good option would be an interface like Navigator (Edge/Chrome/Text Editor) with the dialogs.
Not sure if this can be done with folderex, inserting any dialog as part of folderex.]]>

A good option would be an interface like Navigator (Edge/Chrome/Text Editor) with the dialogs.
Not sure if this can be done with folderex, inserting any dialog as part of folderex.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Browse of my ADO Class :: Reply by Antonio Linares]]> 2024-12-30T07:16:59-07:00 2024-12-30T07:16:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44894&p=276693#p276693
If you provide a drawing of what you want we can code it using FWH :-)]]>

If you provide a drawing of what you want we can code it using FWH :-)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: PrinterInfo with Powershell :: Author Otto]]> 2024-12-28T18:13:29-07:00 2024-12-28T18:13:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45272&p=276680#p276680 Otto

Code: Select all | Expand


 #include "fivewin.ch"

function main
     CreateAndRunPrinterScript() 
     CreateAndRunPrinterInfoScript()
return nil

//----------------------------------------------------------------------------//
FUNCTION CreateAndRunPrinterScript()
   LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
   LOCAL cResultFile := ".\psfiles\printers_output.txt"
    LOCAL aPrinters := ""
    
   // PowerShell-Befehle als Text zusammenstellen
   cScript := '$printers = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers"' + CRLF
   cScript += '$output = @()' + CRLF
   cScript += 'foreach ($printer in $printers) {' + CRLF
   cScript += '    $printerName = $printer.PSChildName' + CRLF
   cScript += '    $output += $printerName' + CRLF
   cScript += '}' + CRLF
   cScript += '$output | Out-File -FilePath "' + cResultFile + '" -Encoding utf8' + CRLF

   // PowerShell-Skript in eine Datei schreiben
   MEMOWRIT(cOutputFile, cScript)

   // PowerShell-Skript ausführen
   WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)

   // Ergebnis anzeigen
   IF FILE(cResultFile)
      aPrinters := MEMOREAD(cResultFile)
    msgInfo( aPrinters )
    
   ELSE
      ? "Keine Ausgabe gefunden."
   ENDIF

   RETURN NIL
   
   
   
   
   FUNCTION CreateAndRunPrinterInfoScript()
   LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
   LOCAL cResultFile := ".\psfiles\printer_info_output.csv"

   // PowerShell-Skript zusammenstellen
   cScript := 'Get-Printer | Select-Object Name, DriverName, PortName, ShareName, PrinterStatus, Default | ' + ;
              'Export-Csv -Path "' + cResultFile + '" -NoTypeInformation -Encoding UTF8' + CRLF

   // PowerShell-Skript in eine Datei schreiben
   MEMOWRIT(cOutputFile, cScript)

   // PowerShell-Skript ausführen
   WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)

   // Ergebnis anzeigen
   IF FILE(cResultFile)
     msginfo( MEMOREAD(cResultFile) )
     
   ELSE
      ? "Keine Druckerinformationen gefunden."
   ENDIF

   RETURN NIL

   

 
]]>
Otto

Code: Select all | Expand


 #include "fivewin.ch"

function main
     CreateAndRunPrinterScript() 
     CreateAndRunPrinterInfoScript()
return nil

//----------------------------------------------------------------------------//
FUNCTION CreateAndRunPrinterScript()
   LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
   LOCAL cResultFile := ".\psfiles\printers_output.txt"
    LOCAL aPrinters := ""
    
   // PowerShell-Befehle als Text zusammenstellen
   cScript := '$printers = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers"' + CRLF
   cScript += '$output = @()' + CRLF
   cScript += 'foreach ($printer in $printers) {' + CRLF
   cScript += '    $printerName = $printer.PSChildName' + CRLF
   cScript += '    $output += $printerName' + CRLF
   cScript += '}' + CRLF
   cScript += '$output | Out-File -FilePath "' + cResultFile + '" -Encoding utf8' + CRLF

   // PowerShell-Skript in eine Datei schreiben
   MEMOWRIT(cOutputFile, cScript)

   // PowerShell-Skript ausführen
   WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)

   // Ergebnis anzeigen
   IF FILE(cResultFile)
      aPrinters := MEMOREAD(cResultFile)
    msgInfo( aPrinters )
    
   ELSE
      ? "Keine Ausgabe gefunden."
   ENDIF

   RETURN NIL
   
   
   
   
   FUNCTION CreateAndRunPrinterInfoScript()
   LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
   LOCAL cResultFile := ".\psfiles\printer_info_output.csv"

   // PowerShell-Skript zusammenstellen
   cScript := 'Get-Printer | Select-Object Name, DriverName, PortName, ShareName, PrinterStatus, Default | ' + ;
              'Export-Csv -Path "' + cResultFile + '" -NoTypeInformation -Encoding UTF8' + CRLF

   // PowerShell-Skript in eine Datei schreiben
   MEMOWRIT(cOutputFile, cScript)

   // PowerShell-Skript ausführen
   WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)

   // Ergebnis anzeigen
   IF FILE(cResultFile)
     msginfo( MEMOREAD(cResultFile) )
     
   ELSE
      ? "Keine Druckerinformationen gefunden."
   ENDIF

   RETURN NIL

   

 
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: PrinterInfo with Powershell :: Reply by Antonio Linares]]> 2024-12-29T00:26:34-07:00 2024-12-29T00:26:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45272&p=276682#p276682
Many thanks for sharing it :-)]]>

Many thanks for sharing it :-)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: PrinterInfo with Powershell :: Reply by karinha]]> 2024-12-30T08:23:33-07:00 2024-12-30T08:23:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45272&p=276694#p276694

Code: Select all | Expand

   LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
   LOCAL cResultFile := ".\psfiles\printers_output.txt"

   LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
   LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
 
???????????

Regards, saludos.]]>

Code: Select all | Expand

   LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
   LOCAL cResultFile := ".\psfiles\printers_output.txt"

   LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
   LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
 
???????????

Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: PrinterInfo with Powershell :: Reply by Otto]]> 2024-12-30T09:13:17-07:00 2024-12-30T09:13:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45272&p=276695#p276695 I use ps1 files for many tasks, especially for installing servers, and have automated many tasks with them.
You need to create the directory. You could use c:\temp, for example.
Best regards,
Otto

c:\fwh\samples\psfiles\]]>
I use ps1 files for many tasks, especially for installing servers, and have automated many tasks with them.
You need to create the directory. You could use c:\temp, for example.
Best regards,
Otto

c:\fwh\samples\psfiles\]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: To all the FW family :: Reply by Antonio Linares]]> 2024-12-27T14:09:15-07:00 2024-12-27T14:09:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45269&p=276675#p276675 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: To all the FW family :: Reply by Massimo Linossi]]> 2024-12-28T05:11:19-07:00 2024-12-28T05:11:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45269&p=276679#p276679 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: To all the FW family :: Reply by MarcoBoschi]]> 2024-12-29T23:46:41-07:00 2024-12-29T23:46:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45269&p=276684#p276684 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: To all the FW family :: Reply by Horizon]]> 2024-12-31T04:38:17-07:00 2024-12-31T04:38:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45269&p=276703#p276703 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: To all the FW family :: Reply by chiaiese]]> 2024-12-31T07:56:07-07:00 2024-12-31T07:56:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45269&p=276704#p276704
Roberto Chiaiese]]>

Roberto Chiaiese]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by dtussman]]> 2024-12-30T11:39:02-07:00 2024-12-30T11:39:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276696#p276696 runbrowser
getcodefromuser
curlpost
jsondecode
jsonget]]>
runbrowser
getcodefromuser
curlpost
jsondecode
jsonget]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by Antonio Linares]]> 2024-12-31T04:03:16-07:00 2024-12-31T04:03:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276701#p276701
Have you already done steps 1 and 2 ?

1. You register your app with Google.
2. Google provides a client ID and secret for your app.

Do you already have your client ID and secret ?]]>

Have you already done steps 1 and 2 ?

1. You register your app with Google.
2. Google provides a client ID and secret for your app.

Do you already have your client ID and secret ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by dtussman]]> 2024-12-31T11:25:41-07:00 2024-12-31T11:25:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276707#p276707
Yes, I have the client id and secret code but it was very confusing. It says you have to have your app verified, is that true? I submitted a request and it said it will take 3 weeks. And it asked for url link and link to privacy statement etc, which I assume is irrelevant for a desktop app.

Anyway, thanks and Happy New Year!

David]]>

Yes, I have the client id and secret code but it was very confusing. It says you have to have your app verified, is that true? I submitted a request and it said it will take 3 weeks. And it asked for url link and link to privacy statement etc, which I assume is irrelevant for a desktop app.

Anyway, thanks and Happy New Year!

David]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by Antonio Linares]]> 2025-01-01T01:38:22-07:00 2025-01-01T01:38:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276708#p276708
Then we will have to wait three weeks to continue it, I guess

Happy new year! :-)]]>

Then we will have to wait three weeks to continue it, I guess

Happy new year! :-)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by dtussman]]> 2025-01-01T11:51:36-07:00 2025-01-01T11:51:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276713#p276713 <![CDATA[FiveWin for Harbour/xHarbour :: Re: oauth for dummies :: Reply by Antonio Linares]]> 2025-01-01T11:53:32-07:00 2025-01-01T11:53:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45244&p=276714#p276714 <![CDATA[FiveWin for Harbour/xHarbour :: Using Tget and Cuebanner :: Author Marc Venken]]> 2025-01-01T06:44:30-07:00 2025-01-01T06:44:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276712#p276712
Looking for some info I came also on Cuebanner get with its inline, infield,... syntax. They are all in Tget but I wonder at this point and versions is Tget the correct control to use ?

Since it is only a couple of screens I will not use RC or Borland. Just coded gets. Do You have a nice looking dialog with gets coded ? I would like to see the extra code from some of these gets.

Thanks]]>

Looking for some info I came also on Cuebanner get with its inline, infield,... syntax. They are all in Tget but I wonder at this point and versions is Tget the correct control to use ?

Since it is only a couple of screens I will not use RC or Borland. Just coded gets. Do You have a nice looking dialog with gets coded ? I would like to see the extra code from some of these gets.

Thanks]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-01T12:02:15-07:00 2025-01-01T12:02:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276715#p276715
I arrived at a personal technique using simply nRow:=10, ncol=5 and nLine spacing =30 obviously nLine spacing changes depending on the fonts used. what do you have in mind in particular? do you have images from which to copy the screenshots?]]>

I arrived at a personal technique using simply nRow:=10, ncol=5 and nLine spacing =30 obviously nLine spacing changes depending on the fonts used. what do you have in mind in particular? do you have images from which to copy the screenshots?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-01T13:28:51-07:00 2025-01-01T13:28:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276717#p276717
Today I came up with a post from you :

https://forums.fivetechsupport.com/view ... =3&t=35098


I think to start building like the first picture but I don't need the animated/moving boxes. AS I said, pretty simple ))

And like you say the basic code. Works ok.]]>

Today I came up with a post from you :

https://forums.fivetechsupport.com/view ... =3&t=35098


I think to start building like the first picture but I don't need the animated/moving boxes. AS I said, pretty simple ))

And like you say the basic code. Works ok.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-01T15:06:47-07:00 2025-01-01T15:06:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276718#p276718
@ 100,05 GET oGet2 VAR oKlant:Naam_1 OF oFld2:aDialogs[FOLDERDOC_KASSA] COLOR "N/W*" ;
CUEBANNER "Name" PIXEL BOTTOMBORDER ;
INFIELD;
INCLRTXT CLR_DARKGRAY;
INCLRBORDER CLR_DARKGRAY;
INCLRLINE CLR_HRED;
DYNAMIC;
GROUP

In the info folowing message is included :

All color values included in the clauses can be codeblocks

https://forums.fivetechsupport.com/view ... =3&t=36283

Can someone please explain why this is usefull and give also a sample code of using it ? Maybe it will help me with a design.]]>

@ 100,05 GET oGet2 VAR oKlant:Naam_1 OF oFld2:aDialogs[FOLDERDOC_KASSA] COLOR "N/W*" ;
CUEBANNER "Name" PIXEL BOTTOMBORDER ;
INFIELD;
INCLRTXT CLR_DARKGRAY;
INCLRBORDER CLR_DARKGRAY;
INCLRLINE CLR_HRED;
DYNAMIC;
GROUP

In the info folowing message is included :

All color values included in the clauses can be codeblocks

https://forums.fivetechsupport.com/view ... =3&t=36283

Can someone please explain why this is usefull and give also a sample code of using it ? Maybe it will help me with a design.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T00:45:07-07:00 2025-01-02T00:45:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276719#p276719
Could you provide a screenshot of the dialogbox design you are looking for ?

many thanks]]>

Could you provide a screenshot of the dialogbox design you are looking for ?

many thanks]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-02T02:02:32-07:00 2025-01-02T02:02:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276720#p276720
I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image]]>

I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-02T02:19:40-07:00 2025-01-02T02:19:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276721#p276721
autoget
fget
mget
tget

fget and tget are the big owns.

I do need to use the tget right ?]]>

autoget
fget
mget
tget

fget and tget are the big owns.

I do need to use the tget right ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T03:31:48-07:00 2025-01-02T03:31:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276722#p276722
You can provide that screenshot to chatgpt and ask it to create the RC file and the header file, unless you don't want to use RCs and want to fully build it from source code:

test.rc

Code: Select all | Expand

#include "resource.h"

IDD_CARTOLERIA_DIALOG DIALOGEX 0, 0, 400, 300
STYLE WS_CAPTION | WS_SYSMENU
CAPTION "Registry"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Operational Headquarters",IDC_STATIC,10,10,380,150
    LTEXT           "Code:",IDC_STATIC,20,30,40,10
    EDITTEXT        IDC_CODE,70,30,50,14,ES_AUTOHSCROLL
    
    LTEXT           "Name:",IDC_STATIC,20,50,60,10
    EDITTEXT        IDC_NAME,70,50,200,14,ES_AUTOHSCROLL

    LTEXT           "Address:",IDC_STATIC,20,70,40,10
    EDITTEXT        IDC_ADDRESS,70,70,200,14,ES_AUTOHSCROLL

    LTEXT           "ZIP Code:",IDC_STATIC,20,90,40,10
    EDITTEXT        IDC_ZIP_CODE,70,90,50,14,ES_AUTOHSCROLL

    LTEXT           "City:",IDC_STATIC,130,90,40,10
    EDITTEXT        IDC_CITY,170,90,100,14,ES_AUTOHSCROLL

    LTEXT           "Country:",IDC_STATIC,20,110,40,10
    COMBOBOX        IDC_COUNTRY,70,110,100,14,CBS_DROPDOWNLIST | WS_VSCROLL

    LTEXT           "Phone:",IDC_STATIC,20,140,50,10
    EDITTEXT        IDC_PHONE,70,140,100,14,ES_AUTOHSCROLL
    LTEXT           "Mobile:",IDC_STATIC,180,140,40,10
    EDITTEXT        IDC_MOBILE,220,140,100,14,ES_AUTOHSCROLL

    LTEXT           "Email:",IDC_STATIC,20,160,50,10
    EDITTEXT        IDC_EMAIL,70,160,150,14,ES_AUTOHSCROLL

    LTEXT           "VAT Number:",IDC_STATIC,20,180,50,10
    EDITTEXT        IDC_VAT_NUMBER,70,180,100,14,ES_AUTOHSCROLL

    PUSHBUTTON      "Add Address...",IDC_BTN_ADD_ADDRESS,250,100,120,14
    PUSHBUTTON      "Attach...",IDC_BTN_ATTACH,250,200,120,14
    PUSHBUTTON      "Documents",IDC_BTN_DOCUMENTS,250,220,120,14
    PUSHBUTTON      "Payments",IDC_BTN_PAYMENTS,250,240,120,14
END
 
resource.h

Code: Select all | Expand

#ifndef RESOURCE_H
#define RESOURCE_H

// Dialog ID
#define IDD_CARTOLERIA_DIALOG         101

// Control IDs
#define IDC_CODE                      1001
#define IDC_NAME                      1002
#define IDC_ADDRESS                   1003
#define IDC_ZIP_CODE                  1004
#define IDC_CITY                      1005
#define IDC_COUNTRY                   1006
#define IDC_PHONE                     1007
#define IDC_MOBILE                    1008
#define IDC_EMAIL                     1009
#define IDC_VAT_NUMBER                1010

#define IDC_BTN_ADD_ADDRESS           1101
#define IDC_BTN_ATTACH                1102
#define IDC_BTN_DOCUMENTS             1103
#define IDC_BTN_PAYMENTS              1104

#endif // RESOURCE_H
]]>

You can provide that screenshot to chatgpt and ask it to create the RC file and the header file, unless you don't want to use RCs and want to fully build it from source code:

test.rc

Code: Select all | Expand

#include "resource.h"

IDD_CARTOLERIA_DIALOG DIALOGEX 0, 0, 400, 300
STYLE WS_CAPTION | WS_SYSMENU
CAPTION "Registry"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Operational Headquarters",IDC_STATIC,10,10,380,150
    LTEXT           "Code:",IDC_STATIC,20,30,40,10
    EDITTEXT        IDC_CODE,70,30,50,14,ES_AUTOHSCROLL
    
    LTEXT           "Name:",IDC_STATIC,20,50,60,10
    EDITTEXT        IDC_NAME,70,50,200,14,ES_AUTOHSCROLL

    LTEXT           "Address:",IDC_STATIC,20,70,40,10
    EDITTEXT        IDC_ADDRESS,70,70,200,14,ES_AUTOHSCROLL

    LTEXT           "ZIP Code:",IDC_STATIC,20,90,40,10
    EDITTEXT        IDC_ZIP_CODE,70,90,50,14,ES_AUTOHSCROLL

    LTEXT           "City:",IDC_STATIC,130,90,40,10
    EDITTEXT        IDC_CITY,170,90,100,14,ES_AUTOHSCROLL

    LTEXT           "Country:",IDC_STATIC,20,110,40,10
    COMBOBOX        IDC_COUNTRY,70,110,100,14,CBS_DROPDOWNLIST | WS_VSCROLL

    LTEXT           "Phone:",IDC_STATIC,20,140,50,10
    EDITTEXT        IDC_PHONE,70,140,100,14,ES_AUTOHSCROLL
    LTEXT           "Mobile:",IDC_STATIC,180,140,40,10
    EDITTEXT        IDC_MOBILE,220,140,100,14,ES_AUTOHSCROLL

    LTEXT           "Email:",IDC_STATIC,20,160,50,10
    EDITTEXT        IDC_EMAIL,70,160,150,14,ES_AUTOHSCROLL

    LTEXT           "VAT Number:",IDC_STATIC,20,180,50,10
    EDITTEXT        IDC_VAT_NUMBER,70,180,100,14,ES_AUTOHSCROLL

    PUSHBUTTON      "Add Address...",IDC_BTN_ADD_ADDRESS,250,100,120,14
    PUSHBUTTON      "Attach...",IDC_BTN_ATTACH,250,200,120,14
    PUSHBUTTON      "Documents",IDC_BTN_DOCUMENTS,250,220,120,14
    PUSHBUTTON      "Payments",IDC_BTN_PAYMENTS,250,240,120,14
END
 
resource.h

Code: Select all | Expand

#ifndef RESOURCE_H
#define RESOURCE_H

// Dialog ID
#define IDD_CARTOLERIA_DIALOG         101

// Control IDs
#define IDC_CODE                      1001
#define IDC_NAME                      1002
#define IDC_ADDRESS                   1003
#define IDC_ZIP_CODE                  1004
#define IDC_CITY                      1005
#define IDC_COUNTRY                   1006
#define IDC_PHONE                     1007
#define IDC_MOBILE                    1008
#define IDC_EMAIL                     1009
#define IDC_VAT_NUMBER                1010

#define IDC_BTN_ADD_ADDRESS           1101
#define IDC_BTN_ATTACH                1102
#define IDC_BTN_DOCUMENTS             1103
#define IDC_BTN_PAYMENTS              1104

#endif // RESOURCE_H
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T03:34:23-07:00 2025-01-02T03:34:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276723#p276723
test.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg RESOURCE IDD_CARTOLERIA_DIALOG

   REDEFINE GET oGetCode VAR cCode     ID IDC_CODE OF oDlg
   REDEFINE GET oGetName VAR cName     ID IDC_NAME OF oDlg
   REDEFINE GET oGetAddress VAR cAddress  ID IDC_ADDRESS OF oDlg
   REDEFINE GET oGetZipCode VAR cZipCode  ID IDC_ZIP_CODE OF oDlg
   REDEFINE GET oGetCity VAR cCity     ID IDC_CITY OF oDlg
   REDEFINE COMBOBOX oCbxCountry VAR cCountry ID IDC_COUNTRY OF oDlg
   REDEFINE GET oGetPhone VAR cPhone    ID IDC_PHONE OF oDlg
   REDEFINE GET oGetMobile VAR cMobile   ID IDC_MOBILE OF oDlg
   REDEFINE GET oGetEmail VAR cEmail    ID IDC_EMAIL OF oDlg
   REDEFINE GET oGetVAT VAR cVAT      ID IDC_VAT_NUMBER OF oDlg

   REDEFINE BUTTON oBtnAddAddress ID IDC_BTN_ADD_ADDRESS OF oDlg ACTION MsgInfo("Add Address clicked")
   REDEFINE BUTTON oBtnAttach     ID IDC_BTN_ATTACH OF oDlg ACTION MsgInfo("Attach clicked")
   REDEFINE BUTTON oBtnDocuments  ID IDC_BTN_DOCUMENTS OF oDlg ACTION MsgInfo("Documents clicked")
   REDEFINE BUTTON oBtnPayments   ID IDC_BTN_PAYMENTS OF oDlg ACTION MsgInfo("Payments clicked")

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
]]>

test.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg RESOURCE IDD_CARTOLERIA_DIALOG

   REDEFINE GET oGetCode VAR cCode     ID IDC_CODE OF oDlg
   REDEFINE GET oGetName VAR cName     ID IDC_NAME OF oDlg
   REDEFINE GET oGetAddress VAR cAddress  ID IDC_ADDRESS OF oDlg
   REDEFINE GET oGetZipCode VAR cZipCode  ID IDC_ZIP_CODE OF oDlg
   REDEFINE GET oGetCity VAR cCity     ID IDC_CITY OF oDlg
   REDEFINE COMBOBOX oCbxCountry VAR cCountry ID IDC_COUNTRY OF oDlg
   REDEFINE GET oGetPhone VAR cPhone    ID IDC_PHONE OF oDlg
   REDEFINE GET oGetMobile VAR cMobile   ID IDC_MOBILE OF oDlg
   REDEFINE GET oGetEmail VAR cEmail    ID IDC_EMAIL OF oDlg
   REDEFINE GET oGetVAT VAR cVAT      ID IDC_VAT_NUMBER OF oDlg

   REDEFINE BUTTON oBtnAddAddress ID IDC_BTN_ADD_ADDRESS OF oDlg ACTION MsgInfo("Add Address clicked")
   REDEFINE BUTTON oBtnAttach     ID IDC_BTN_ATTACH OF oDlg ACTION MsgInfo("Attach clicked")
   REDEFINE BUTTON oBtnDocuments  ID IDC_BTN_DOCUMENTS OF oDlg ACTION MsgInfo("Documents clicked")
   REDEFINE BUTTON oBtnPayments   ID IDC_BTN_PAYMENTS OF oDlg ACTION MsgInfo("Payments clicked")

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T03:41:46-07:00 2025-01-02T03:41:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276724#p276724

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg TITLE "Cartoleria Mazzini" FROM 0, 0 TO 25, 70 PIXEL

   @ 1, 1 SAY "Code:" OF oDlg
   @ 1, 10 GET oGetCode VAR cCode OF oDlg

   @ 2, 1 SAY "Name:" OF oDlg
   @ 2, 10 GET oGetName VAR cName OF oDlg

   @ 3, 1 SAY "Address:" OF oDlg
   @ 3, 10 GET oGetAddress VAR cAddress OF oDlg

   @ 4, 1 SAY "ZIP Code:" OF oDlg
   @ 4, 10 GET oGetZipCode VAR cZipCode OF oDlg

   @ 5, 1 SAY "City:" OF oDlg
   @ 5, 10 GET oGetCity VAR cCity OF oDlg

   @ 6, 1 SAY "Country:" OF oDlg
   @ 6, 10 COMBOBOX oCbxCountry VAR cCountry ITEMS {"Italy", "San Marino", "Other"} OF oDlg

   @ 7, 1 SAY "Phone:" OF oDlg
   @ 7, 10 GET oGetPhone VAR cPhone OF oDlg

   @ 8, 1 SAY "Mobile:" OF oDlg
   @ 8, 10 GET oGetMobile VAR cMobile OF oDlg

   @ 9, 1 SAY "Email:" OF oDlg
   @ 9, 10 GET oGetEmail VAR cEmail OF oDlg

   @ 10, 1 SAY "VAT Number:" OF oDlg
   @ 10, 10 GET oGetVAT VAR cVAT OF oDlg

   @ 12, 10 BUTTON oBtnAddAddress PROMPT "Add Address" ACTION MsgInfo("Add Address clicked") OF oDlg
   @ 12, 25 BUTTON oBtnAttach PROMPT "Attach" ACTION MsgInfo("Attach clicked") OF oDlg
   @ 13, 10 BUTTON oBtnDocuments PROMPT "Documents" ACTION MsgInfo("Documents clicked") OF oDlg
   @ 13, 25 BUTTON oBtnPayments PROMPT "Payments" ACTION MsgInfo("Payments clicked") OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 
]]>

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg TITLE "Cartoleria Mazzini" FROM 0, 0 TO 25, 70 PIXEL

   @ 1, 1 SAY "Code:" OF oDlg
   @ 1, 10 GET oGetCode VAR cCode OF oDlg

   @ 2, 1 SAY "Name:" OF oDlg
   @ 2, 10 GET oGetName VAR cName OF oDlg

   @ 3, 1 SAY "Address:" OF oDlg
   @ 3, 10 GET oGetAddress VAR cAddress OF oDlg

   @ 4, 1 SAY "ZIP Code:" OF oDlg
   @ 4, 10 GET oGetZipCode VAR cZipCode OF oDlg

   @ 5, 1 SAY "City:" OF oDlg
   @ 5, 10 GET oGetCity VAR cCity OF oDlg

   @ 6, 1 SAY "Country:" OF oDlg
   @ 6, 10 COMBOBOX oCbxCountry VAR cCountry ITEMS {"Italy", "San Marino", "Other"} OF oDlg

   @ 7, 1 SAY "Phone:" OF oDlg
   @ 7, 10 GET oGetPhone VAR cPhone OF oDlg

   @ 8, 1 SAY "Mobile:" OF oDlg
   @ 8, 10 GET oGetMobile VAR cMobile OF oDlg

   @ 9, 1 SAY "Email:" OF oDlg
   @ 9, 10 GET oGetEmail VAR cEmail OF oDlg

   @ 10, 1 SAY "VAT Number:" OF oDlg
   @ 10, 10 GET oGetVAT VAR cVAT OF oDlg

   @ 12, 10 BUTTON oBtnAddAddress PROMPT "Add Address" ACTION MsgInfo("Add Address clicked") OF oDlg
   @ 12, 25 BUTTON oBtnAttach PROMPT "Attach" ACTION MsgInfo("Attach clicked") OF oDlg
   @ 13, 10 BUTTON oBtnDocuments PROMPT "Documents" ACTION MsgInfo("Documents clicked") OF oDlg
   @ 13, 25 BUTTON oBtnPayments PROMPT "Payments" ACTION MsgInfo("Payments clicked") OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-02T03:43:14-07:00 2025-01-02T03:43:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276725#p276725
Will give it a try ....]]>

Will give it a try ....]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T03:46:50-07:00 2025-01-02T03:46:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276726#p276726 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-02T04:25:48-07:00 2025-01-02T04:25:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276727#p276727
Marc Venken wrote:Antonio,

I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image
Marc I need where you take this picture ( also the year) to make a search]]>
Marc Venken wrote:Antonio,

I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image
Marc I need where you take this picture ( also the year) to make a search]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-02T04:43:51-07:00 2025-01-02T04:43:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276728#p276728
This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.]]>

This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-02T05:27:59-07:00 2025-01-02T05:27:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276729#p276729
Marc Venken wrote:Silvio,

This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.
This dialog was taken from an Italian commercial application called Danea Easyfact, but I think we can remake It Easy]]>
Marc Venken wrote:Silvio,

This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.
This dialog was taken from an Italian commercial application called Danea Easyfact, but I think we can remake It Easy]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-02T11:20:18-07:00 2025-01-02T11:20:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276733#p276733
Image

If you like it can continue to make it]]>

Image

If you like it can continue to make it]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-02T11:27:09-07:00 2025-01-02T11:27:09-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276734#p276734
Excellent!

Could you share its source code ?

many thanks]]>

Excellent!

Could you share its source code ?

many thanks]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-03T01:14:10-07:00 2025-01-03T01:14:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276736#p276736
This is indeed what I want to make, even on the folderex ....

If we could have just 1 dialog like this, and also some code inside with some validation and extra's
It would we a very good sample for me, but also for others in the Forum.

I would like to thank you for your effort !!

I came accross some parts of pics from your program for the beach. There is some very nice design used by you.
Can you post a screenshot ? There where some Gets with a + and - sign inside. Cool is that.]]>

This is indeed what I want to make, even on the folderex ....

If we could have just 1 dialog like this, and also some code inside with some validation and extra's
It would we a very good sample for me, but also for others in the Forum.

I would like to thank you for your effort !!

I came accross some parts of pics from your program for the beach. There is some very nice design used by you.
Can you post a screenshot ? There where some Gets with a + and - sign inside. Cool is that.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-03T02:25:27-07:00 2025-01-03T02:25:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276737#p276737 where ?
there are on xbrowse I think]]>
where ?
there are on xbrowse I think]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-03T02:54:48-07:00 2025-01-03T02:54:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276738#p276738 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-03T07:01:33-07:00 2025-01-03T13:01:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276743#p276743 Original

Image

Made by me

Image

I'll Publish source code on afternoon

It 's a Resizable dialog As on original dialog of that italian Application


the source and pngs are on GitHub https://github.com/Falconisilvio/Customer-dialog

Last Release

Image



Notice
iF i USE Folderex I have problem when resize because the clrpane become gray
If I use normal folder then the Turllnk class objects are not transparente]]>
Original

Image

Made by me

Image

I'll Publish source code on afternoon

It 's a Resizable dialog As on original dialog of that italian Application


the source and pngs are on GitHub https://github.com/Falconisilvio/Customer-dialog

Last Release

Image



Notice
iF i USE Folderex I have problem when resize because the clrpane become gray
If I use normal folder then the Turllnk class objects are not transparente]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-03T12:32:46-07:00 2025-01-03T12:32:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276747#p276747
Great! :-)

many thanks!]]>

Great! :-)

many thanks!]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Silvio.Falconi]]> 2025-01-03T12:34:47-07:00 2025-01-03T12:34:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276748#p276748
Antonio Linares wrote:Dear Silvio,

Great! :-)

many thanks!
sent to you with pngs]]>
Antonio Linares wrote:Dear Silvio,

Great! :-)

many thanks!
sent to you with pngs]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Antonio Linares]]> 2025-01-03T13:13:12-07:00 2025-01-03T13:13:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276750#p276750 https://github.com/Falconisilvio/Customer-dialog

cd Customer-dialog

go32.bat

Excellent!!!

Many thanks Silvio! :-)]]>
https://github.com/Falconisilvio/Customer-dialog

cd Customer-dialog

go32.bat

Excellent!!!

Many thanks Silvio! :-)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using Tget and Cuebanner :: Reply by Marc Venken]]> 2025-01-06T05:03:10-07:00 2025-01-06T05:03:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45275&p=276769#p276769
Many thanks for you time and sample code. This is helpfull....]]>

Many thanks for you time and sample code. This is helpfull....]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Milestone Achieved: WINHOTEL as a Web Application :: Author Otto]]> 2024-12-31T10:28:46-07:00 2024-12-31T10:28:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276705#p276705 Milestone Achieved: WINHOTEL as a Web Application and Looking Ahead to the Anniversary Year

Dear friends,

I am very satisfied today and also with 2024. In test mode, the entire WINHOTEL, including the BIENEN (waiter communication terminals), is now running as a web application. With Cloudflare, I have secured the servers. Next year, we will celebrate our 30th company anniversary, and if nothing comes up, we will release the online version 30 years after our WINHOTEL '95.

I am especially happy that I haven't linked any libraries except for Bootstrap. Both the room plan and the dashboard navigation were programmed using pure HTML and JavaScript. I believe this is a great advantage for the future.

I take this opportunity to wish you a happy New Year and all the best for 2025.

Warm regards,
Otto

Image]]>
Milestone Achieved: WINHOTEL as a Web Application and Looking Ahead to the Anniversary Year

Dear friends,

I am very satisfied today and also with 2024. In test mode, the entire WINHOTEL, including the BIENEN (waiter communication terminals), is now running as a web application. With Cloudflare, I have secured the servers. Next year, we will celebrate our 30th company anniversary, and if nothing comes up, we will release the online version 30 years after our WINHOTEL '95.

I am especially happy that I haven't linked any libraries except for Bootstrap. Both the room plan and the dashboard navigation were programmed using pure HTML and JavaScript. I believe this is a great advantage for the future.

I take this opportunity to wish you a happy New Year and all the best for 2025.

Warm regards,
Otto

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Milestone Achieved: WINHOTEL as a Web Application :: Reply by MarcoBoschi]]> 2025-01-01T02:02:30-07:00 2025-01-01T02:02:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276709#p276709 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Milestone Achieved: WINHOTEL as a Web Application :: Reply by Marc Venken]]> 2025-01-01T06:35:59-07:00 2025-01-01T06:35:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276711#p276711 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Milestone Achieved: WINHOTEL as a Web Application :: Reply by Otto]]> 2025-01-01T12:30:32-07:00 2025-01-01T12:30:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276716#p276716
Thank you very much for the kind words.
It is quite a lot of work to transition a program that has been developed over 30 years to the web.
I have also had to reprogram many things 2, 3, or even more times.
My goal is to use as few libraries as possible.
This has only been possible since ChatGPT started providing good answers, really only in the past six months.
Thank you for your interest. I will keep you updated.
Many things are easier together.
Wishing everyone all the best for 2025 once again.

Best regards,
Otto]]>

Thank you very much for the kind words.
It is quite a lot of work to transition a program that has been developed over 30 years to the web.
I have also had to reprogram many things 2, 3, or even more times.
My goal is to use as few libraries as possible.
This has only been possible since ChatGPT started providing good answers, really only in the past six months.
Thank you for your interest. I will keep you updated.
Many things are easier together.
Wishing everyone all the best for 2025 once again.

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Milestone Achieved: WINHOTEL as a Web Application :: Reply by karinha]]> 2025-01-02T06:14:50-07:00 2025-01-02T06:14:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276730#p276730
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Milestone Achieved: WINHOTEL as a Web Application :: Reply by Rick Lipkin]]> 2025-01-06T08:22:38-07:00 2025-01-06T08:22:38-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45274&p=276771#p276771
Obviously this is a project that you sell to potential Customers or is this application just for your personal use ? .. Very Nicely Done !!

Rick Lipkin]]>

Obviously this is a project that you sell to potential Customers or is this application just for your personal use ? .. Very Nicely Done !!

Rick Lipkin]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: GetDesktopWindow() on dual monitor system. :: Reply by byron.hopp]]> 2025-01-06T15:27:39-07:00 2025-01-06T15:27:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44931&p=276782#p276782
Function Antonio()
EnumDisplayMonitors( { | nMonitor, hMonitor, hdcMonitor, lPrimary, aMonitorRect, aMonitorRectInfo, aWorkRect | XBrowser(
{ "nMonitor" => nMonitor,;
"hMonitor" => hMonitor,;
"hdcMonitor" => hdcMonitor,;
"lPrimary" => lPrimary,;
"aMonitorRect" => aMonitorRect,;
"aMonitorRectInfo" => aMonitorRectInfo,;
"aWorkRect" => aWorkRect } ), .T. } ) // .T. continue to next monitor
return nil]]>

Function Antonio()
EnumDisplayMonitors( { | nMonitor, hMonitor, hdcMonitor, lPrimary, aMonitorRect, aMonitorRectInfo, aWorkRect | XBrowser(
{ "nMonitor" => nMonitor,;
"hMonitor" => hMonitor,;
"hdcMonitor" => hdcMonitor,;
"lPrimary" => lPrimary,;
"aMonitorRect" => aMonitorRect,;
"aMonitorRectInfo" => aMonitorRectInfo,;
"aWorkRect" => aWorkRect } ), .T. } ) // .T. continue to next monitor
return nil]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: GetDesktopWindow() on dual monitor system. :: Reply by byron.hopp]]> 2025-01-06T17:10:29-07:00 2025-01-06T17:10:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44931&p=276783#p276783 Thanks again Antonio.]]> Thanks again Antonio.]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: GetDesktopWindow() on dual monitor system. :: Reply by Antonio Linares]]> 2025-01-06T23:38:05-07:00 2025-01-06T23:38:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44931&p=276785#p276785 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Xbrowser keeps in a continious loop :: Author Marc Venken]]> 2025-01-03T06:17:50-07:00 2025-01-03T06:17:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276742#p276742
When I use this :

oKassa = TGet object

@ dialog->top ,dialog->left GET oKassa VAR hKassa["SALDO"] SIZE hDialog["BREEDTE"],hDialog["HOOGTE"] PIXEL RIGHT FONT oFontGet COLORS CLR_GET,CLR_GETBACK OF oTarget UPDATE

xbrowser(oKassa)

I see all object items and can scroll. But when it comes on

21 bDelete : it will ask to Delete the control. You can say Yes or No but it will stay in a continious loop until you kill the program.

Can someone try this and see if it is a general thing ?]]>

When I use this :

oKassa = TGet object

@ dialog->top ,dialog->left GET oKassa VAR hKassa["SALDO"] SIZE hDialog["BREEDTE"],hDialog["HOOGTE"] PIXEL RIGHT FONT oFontGet COLORS CLR_GET,CLR_GETBACK OF oTarget UPDATE

xbrowser(oKassa)

I see all object items and can scroll. But when it comes on

21 bDelete : it will ask to Delete the control. You can say Yes or No but it will stay in a continious loop until you kill the program.

Can someone try this and see if it is a general thing ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-06T05:06:28-07:00 2025-01-06T05:06:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276770#p276770
xbrowser(oGet) is only needed to test

I don't think that I can do anything wrong in order to get that error.]]>

xbrowser(oGet) is only needed to test

I don't think that I can do anything wrong in order to get that error.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Antonio Linares]]> 2025-01-06T09:17:32-07:00 2025-01-06T09:17:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276772#p276772
Do you mean a code like this one ?

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, cTest := Space( 10 ) 

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oDlg )

return nil
]]>

Do you mean a code like this one ?

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, cTest := Space( 10 ) 

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oDlg )

return nil
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-06T09:22:44-07:00 2025-01-06T09:22:44-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276773#p276773
If you run this, you will see that Xbrowser (when you scroll down and past bDelete or come on bdelete, Xbrowsers will keep asking to delete in a endless loop. You can not scroll from top to bottom in xBrowser

At least here is thus, also with this sample.

I have to CTRL+ALT+DELETE to kill the process.

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, cTest := Space( 10 )

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET oGet Var cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oGet )

return nil

]]>

If you run this, you will see that Xbrowser (when you scroll down and past bDelete or come on bdelete, Xbrowsers will keep asking to delete in a endless loop. You can not scroll from top to bottom in xBrowser

At least here is thus, also with this sample.

I have to CTRL+ALT+DELETE to kill the process.

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, cTest := Space( 10 )

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET oGet Var cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oGet )

return nil

]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Antonio Linares]]> 2025-01-06T09:36:37-07:00 2025-01-06T09:36:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276774#p276774
Please test my EXE and let me know if you get the same behavior with it, thanks

https://wormhole.app/E71xE#pgFwYZunhwqwvP4Oq23D9A]]>

Please test my EXE and let me know if you get the same behavior with it, thanks

https://wormhole.app/E71xE#pgFwYZunhwqwvP4Oq23D9A]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-06T09:44:34-07:00 2025-01-06T09:44:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276775#p276775 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Antonio Linares]]> 2025-01-06T10:07:29-07:00 2025-01-06T10:07:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276776#p276776

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, oGet, cTest := Space( 10 ) 

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET oGet VAR cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oGet )

return nil   
]]>

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, oGet, cTest := Space( 10 ) 

   DEFINE DIALOG oDlg TITLE "Test"

   @ 2, 2 GET oGet VAR cTest OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK XBrowser( oGet )

return nil   
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by karinha]]> 2025-01-06T12:16:34-07:00 2025-01-06T12:16:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276777#p276777
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-06T13:20:33-07:00 2025-01-06T13:23:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276778#p276778
This is version 23.07

I just scroll the xbrowser from top down until bdelete. I don't press delete, just arrow down.
Yes/NO will stay and can't quit.

Image]]>

This is version 23.07

I just scroll the xbrowser from top down until bdelete. I don't press delete, just arrow down.
Yes/NO will stay and can't quit.

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-06T13:21:17-07:00 2025-01-06T13:21:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276779#p276779
karinha wrote: Mon Jan 06, 2025 7:16 pm marc, answer: NO, NO, NO,NO and DISCARD.

Regards, saludos.
What do you mean ?

I do have a issue with this ....]]>
karinha wrote: Mon Jan 06, 2025 7:16 pm marc, answer: NO, NO, NO,NO and DISCARD.

Regards, saludos.
What do you mean ?

I do have a issue with this ....]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Antonio Linares]]> 2025-01-07T01:20:11-07:00 2025-01-07T01:20:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276789#p276789 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Xbrowser keeps in a continious loop :: Reply by Marc Venken]]> 2025-01-07T01:45:59-07:00 2025-01-07T01:45:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45278&p=276790#p276790 <![CDATA[FiveWin for Harbour/xHarbour :: Touchscreen interface :: Author Silvio.Falconi]]> 2025-01-07T02:15:26-07:00 2025-01-07T02:15:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45283&p=276792#p276792
local nHt := Int( ScreenHeight() + 100 )
local nWd := Int( ScreenWidth() )

but does this work for all resolutions?

that is, if I run the test on a 10" laptop do I have the same configuration?

in this dialog i have a lot of btnbmp controls, how should i create the btnbmp buttons depending on the screen resolution, so that i can display them equally at the same coordinates obviously the buttons will appear smaller in 10' than in a normal pc?

Has anyone created a similar test?


I make a test with but I not Know if it go right

local nSizeWBtn := Int( ScreenWidth() ) /20
local nSizeHBtn := Int( ScreenHeight() + 100 ) /10

@ 148, 320 BTNBMP abtnCat[1] ;
RESOURCE "GRID_DWN_REC";
SIZE nSizeWBtn,nSizeHBtn PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL when ltest]]>

local nHt := Int( ScreenHeight() + 100 )
local nWd := Int( ScreenWidth() )

but does this work for all resolutions?

that is, if I run the test on a 10" laptop do I have the same configuration?

in this dialog i have a lot of btnbmp controls, how should i create the btnbmp buttons depending on the screen resolution, so that i can display them equally at the same coordinates obviously the buttons will appear smaller in 10' than in a normal pc?

Has anyone created a similar test?


I make a test with but I not Know if it go right

local nSizeWBtn := Int( ScreenWidth() ) /20
local nSizeHBtn := Int( ScreenHeight() + 100 ) /10

@ 148, 320 BTNBMP abtnCat[1] ;
RESOURCE "GRID_DWN_REC";
SIZE nSizeWBtn,nSizeHBtn PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL when ltest]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: to Excel : using Array and "paste" it :: Reply by MarcoBoschi]]> 2025-01-03T10:47:40-07:00 2025-01-03T10:47:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43094&p=276745#p276745

Code: Select all | Expand

oSheet:Range( "A1:C1" ):Value := { 1, 2, 3 } //WORKS.
oSheet:Range( "A1:C2" ):Value := { {1,2,3},{4,5,6} } // FAILS, though works with VB <<<<<<<<<<<<<<< this problem 
 
this problem has been resolved?

Many thanks

Marco]]>

Code: Select all | Expand

oSheet:Range( "A1:C1" ):Value := { 1, 2, 3 } //WORKS.
oSheet:Range( "A1:C2" ):Value := { {1,2,3},{4,5,6} } // FAILS, though works with VB <<<<<<<<<<<<<<< this problem 
 
this problem has been resolved?

Many thanks

Marco]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: to Excel : using Array and "paste" it :: Reply by nageswaragunupudi]]> 2025-01-06T02:04:41-07:00 2025-01-06T02:04:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43094&p=276765#p276765 We just need to be aware of the differences of behavior between VB vs. (x)Harbour and write our code accordingly.
Please use the sample code I provided above and that works well]]>
We just need to be aware of the differences of behavior between VB vs. (x)Harbour and write our code accordingly.
Please use the sample code I provided above and that works well]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: to Excel : using Array and "paste" it :: Reply by MarcoBoschi]]> 2025-01-07T02:33:10-07:00 2025-01-07T02:33:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43094&p=276793#p276793 Happy New Year

Marco]]>
Happy New Year

Marco]]>
<![CDATA[FiveWin for Harbour/xHarbour :: xbrowse autosort :: Author Silvio.Falconi]]> 2025-01-07T04:15:30-07:00 2025-01-07T04:15:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45284&p=276795#p276795 :AddBitmap( { "SOR_TUP","SOR_TDW" } )

this insert the bitmap on the right I think on default

How insert bitmaps at left before the title of column ?]]>
:AddBitmap( { "SOR_TUP","SOR_TDW" } )

this insert the bitmap on the right I think on default

How insert bitmaps at left before the title of column ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse autosort :: Reply by Marc Venken]]> 2025-01-07T04:57:17-07:00 2025-01-07T04:57:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45284&p=276796#p276796 :nHeadBmpNo := 1
:nHeadBmpAlign := AL_RIGHT

oCol:nHeadBmpAlign := AL_LEFT/AL_RIGHT]]>
:nHeadBmpNo := 1
:nHeadBmpAlign := AL_RIGHT

oCol:nHeadBmpAlign := AL_LEFT/AL_RIGHT]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse autosort :: Reply by Silvio.Falconi]]> 2025-01-07T12:23:34-07:00 2025-01-07T12:23:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45284&p=276811#p276811 I tried with

Code: Select all | Expand

WITH OBJECT oBrw
         :AddBitmap( { "SOR_TUP","SOR_TDW" } )

 WITH OBJECT  oBrw:aCols[1]
          :nHeadBmpNo := 1
                  :nHeadBmpAlign := AL_LEFT
                 END
Image

and not run k]]>
I tried with

Code: Select all | Expand

WITH OBJECT oBrw
         :AddBitmap( { "SOR_TUP","SOR_TDW" } )

 WITH OBJECT  oBrw:aCols[1]
          :nHeadBmpNo := 1
                  :nHeadBmpAlign := AL_LEFT
                 END
Image

and not run k]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Author Otto]]> 2024-12-29T14:05:07-07:00 2024-12-29T14:05:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276683#p276683 now that I’m working more with mod harbour, I find Autocode even more useful. When you’re not constantly dealing with syntax, you forget some things, and an assistant becomes very helpful.

I’ve always wondered why no one has ever seriously been interested in Autocode. But some things are hard to understand.

Best regards,
Otto]]>
now that I’m working more with mod harbour, I find Autocode even more useful. When you’re not constantly dealing with syntax, you forget some things, and an assistant becomes very helpful.

I’ve always wondered why no one has ever seriously been interested in Autocode. But some things are hard to understand.

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Otto]]> 2024-12-30T03:57:12-07:00 2024-12-30T03:57:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276686#p276686

Image

Image

Image

Image]]>


Image

Image

Image

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2024-12-30T12:15:05-07:00 2024-12-30T12:15:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276697#p276697
How do you keep it up-to-date ?]]>

How do you keep it up-to-date ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2024-12-30T12:40:25-07:00 2024-12-30T12:49:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276698#p276698
I think that most forum members don't want to use code generators, since we don't have full control. You can use it because you build it and it perfectly will do what you want.
I tried the 2020 version, but it erases all the comments and // info from the code. This is important for me because I comment all stuff inside my program.

Just sharing my feeling, sure not show negatif info about AutoCode.

I use a Shared program from Rao and Uwe and modified it so that ALL functions, prg's, methods and data are in a dbf for lookup. Is not perfect, but helps a lot. I also modified it in order to read
the forum every now and then in order to read ALL prg's posted. They also come in a dbf for lookup.

So If I want a drag/drop implemention from Xbrowse I use these 2 parameters and I get samples from the forum. This is my most used program to find part of source and ideas.
If no match and no info... I ask the Forum ))))

I do think however that Autocode has a great potencial since it shows the Data etc. on a nice way. You could convert it so that It hold all data from functions like you do with Xbrowse, but as a INFO maker
Call it AutoInfo ....]]>

I think that most forum members don't want to use code generators, since we don't have full control. You can use it because you build it and it perfectly will do what you want.
I tried the 2020 version, but it erases all the comments and // info from the code. This is important for me because I comment all stuff inside my program.

Just sharing my feeling, sure not show negatif info about AutoCode.

I use a Shared program from Rao and Uwe and modified it so that ALL functions, prg's, methods and data are in a dbf for lookup. Is not perfect, but helps a lot. I also modified it in order to read
the forum every now and then in order to read ALL prg's posted. They also come in a dbf for lookup.

So If I want a drag/drop implemention from Xbrowse I use these 2 parameters and I get samples from the forum. This is my most used program to find part of source and ideas.
If no match and no info... I ask the Forum ))))

I do think however that Autocode has a great potencial since it shows the Data etc. on a nice way. You could convert it so that It hold all data from functions like you do with Xbrowse, but as a INFO maker
Call it AutoInfo ....]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2024-12-30T12:48:04-07:00 2024-12-30T12:48:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276699#p276699

Hitting forum will bring me to the topic on the forum.]]>


Hitting forum will bring me to the topic on the forum.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Otto]]> 2024-12-30T13:45:50-07:00 2024-12-30T13:45:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276700#p276700
yes, you're right. I understand that in your case, you only need to solve your problem and don't need to sell your software.
But when offering software on the market, you have to push the parameters that are possible with the controls to their limits.

It was just that, after a long time, I had to make some significant changes to a FW-program again, and I already had to look up the smallest syntax settings.
I was glad to have AUTOCODE.

Autocode uses the FIVEWIN.CH files and is therefore up to date.

The first post about AUTOCODE was on Thu Apr 22, 2010, 10:49 pm:
autoCode5 – the timesaver. And that's exactly what it's been for me for almost 15 years now.

I have also posted the source code several times.

I think you misunderstood the part about the comments. The tool always only works with the control that you copy & paste into Autocode.

It also provides a clear source code formatting.

I use it and am glad to have this "competitive advantage."

HARBOURINO – mainly for mod harbour – which also doesn't interest anyone, is an even bigger "timesaver" and enables programs and programming that a beginner otherwise wouldn't be able to do.
Today, I finished the layout for the dashboard of WINHOTEL Web in terms of web technology.
I'll post screenshots later.

The Cloudflare solution for self-hosting also finds no interest. €10 and you’re securely online with a domain, have the web server on your own PC, and can access your programs via cloudflared tunnel just like with VPN from anywhere (keyword: RDP).

Best regards,
Otto]]>

yes, you're right. I understand that in your case, you only need to solve your problem and don't need to sell your software.
But when offering software on the market, you have to push the parameters that are possible with the controls to their limits.

It was just that, after a long time, I had to make some significant changes to a FW-program again, and I already had to look up the smallest syntax settings.
I was glad to have AUTOCODE.

Autocode uses the FIVEWIN.CH files and is therefore up to date.

The first post about AUTOCODE was on Thu Apr 22, 2010, 10:49 pm:
autoCode5 – the timesaver. And that's exactly what it's been for me for almost 15 years now.

I have also posted the source code several times.

I think you misunderstood the part about the comments. The tool always only works with the control that you copy & paste into Autocode.

It also provides a clear source code formatting.

I use it and am glad to have this "competitive advantage."

HARBOURINO – mainly for mod harbour – which also doesn't interest anyone, is an even bigger "timesaver" and enables programs and programming that a beginner otherwise wouldn't be able to do.
Today, I finished the layout for the dashboard of WINHOTEL Web in terms of web technology.
I'll post screenshots later.

The Cloudflare solution for self-hosting also finds no interest. €10 and you’re securely online with a domain, have the web server on your own PC, and can access your programs via cloudflared tunnel just like with VPN from anywhere (keyword: RDP).

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2025-01-06T13:39:57-07:00 2025-01-06T13:39:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276780#p276780
What text do you select for Autocode to show a tGet and his data ?

I could use :

Get
Say
Folderex
Dialog
Window
Xbrowse (we know)]]>

What text do you select for Autocode to show a tGet and his data ?

I could use :

Get
Say
Folderex
Dialog
Window
Xbrowse (we know)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Otto]]> 2025-01-07T00:23:33-07:00 2025-01-07T00:23:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276787#p276787 here some screenshots:
Best regards,
Otto

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image]]>
here some screenshots:
Best regards,
Otto

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2025-01-07T01:13:22-07:00 2025-01-07T01:13:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276788#p276788
Ok, but what text in the code you must select in order to get this data ?

@ 05, 05 SAY "Document" SIZE 150, 20 OF oFld2:aDialogs[FOLDERDOC_INFO] PIXEL FONT oBoldLarge COLORS CLR_BLUE, CLR_WHITE TRANSPARENT UPDATE

@ 05, 55 get oDoc VAR h_ingeven["DOCNUMMER"] SIZE 35,14 PIXEL OF oFld2:aDialogs[FOLDERDOC_INFO] ;
valid(zoekdoc(oDlg,oFld2:aDialogs[FOLDERDOC_INFO],h_ingeven["DOCNUMMER"],oFld:SetOption( 2 ) )) UPDATE

If I past anything, it will not work.

It works with xBrowser, but there you take a part of the code :

WITH OBJECT oBrw[ 2 ]
//:bKeyDown := {| k | IF ( K == VK_DELETE, Del_row( oBrw[ 2 ] ), NIL ) }

WITH OBJECT:ak_start
:nEditType := EDIT_DATE
:bClrSel := { || { CLR_BLACK, CLR_HGRAY }}
ENDWITH

WITH OBJECT :Prijs1
:nDataStrAlign := AL_CENTER
:SetProgBar( 100,500, { || { MY_GREEN, CLR_WHITE } } ) // Saples in FW
:cEditPicture := "999.99 %"
//:bClrSel := :bClrSelFocus := oBrw:bClrStd
END

END]]>

Ok, but what text in the code you must select in order to get this data ?

@ 05, 05 SAY "Document" SIZE 150, 20 OF oFld2:aDialogs[FOLDERDOC_INFO] PIXEL FONT oBoldLarge COLORS CLR_BLUE, CLR_WHITE TRANSPARENT UPDATE

@ 05, 55 get oDoc VAR h_ingeven["DOCNUMMER"] SIZE 35,14 PIXEL OF oFld2:aDialogs[FOLDERDOC_INFO] ;
valid(zoekdoc(oDlg,oFld2:aDialogs[FOLDERDOC_INFO],h_ingeven["DOCNUMMER"],oFld:SetOption( 2 ) )) UPDATE

If I past anything, it will not work.

It works with xBrowser, but there you take a part of the code :

WITH OBJECT oBrw[ 2 ]
//:bKeyDown := {| k | IF ( K == VK_DELETE, Del_row( oBrw[ 2 ] ), NIL ) }

WITH OBJECT:ak_start
:nEditType := EDIT_DATE
:bClrSel := { || { CLR_BLACK, CLR_HGRAY }}
ENDWITH

WITH OBJECT :Prijs1
:nDataStrAlign := AL_CENTER
:SetProgBar( 100,500, { || { MY_GREEN, CLR_WHITE } } ) // Saples in FW
:cEditPicture := "999.99 %"
//:bClrSel := :bClrSelFocus := oBrw:bClrStd
END

END]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Otto]]> 2025-01-07T08:03:00-07:00 2025-01-07T08:03:00-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276801#p276801 like this:

Image

Best regards,
Otto]]>
like this:

Image

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Marc Venken]]> 2025-01-07T08:31:33-07:00 2025-01-07T08:31:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276804#p276804
I get nothing

Version = 12/08/2020 : 4.007.424]]>

I get nothing

Version = 12/08/2020 : 4.007.424]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: AC4xBrowse :: Reply by Otto]]> 2025-01-07T16:13:37-07:00 2025-01-07T16:13:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40830&p=276818#p276818

How Autocode Works. Here are the main points of how the process works:

**Conversion of preprocessor directives into source code:**

The Harbour compiler handles this task. It translates `#xcommand` directives such as `@ <nRow>, <nCol> BUTTONBMP ...` into executable source code (e.g., `TButtonBmp():New(...)`).
This happens automatically through the PPO file (Preprocessor Output), which shows the resulting source code.

**Reverse translation through Autocode:**

Autocode reads the generated source code from the PPO file.
It converts this source code back into the original directive (e.g., `@ <nRow>, <nCol> BUTTONBMP ...`), extracting the parameter and variable values.
For this, the mapping structure (`M->acd5_params`) is used, which defines how the individual parameters are interpreted and represented in the code.

---

I think it is now possible to automatically generate the mapping blocks using ChatGPT. At least with the blocks I tested, it works.
It would now also be possible to create mapping blocks for the redefine blocks.

However, since there is no interest in Autocode, and I do not work with resources myself and therefore do not need it, mappings are not included in the current `ACD5.ch`.

Best regards,
Otto]]>


How Autocode Works. Here are the main points of how the process works:

**Conversion of preprocessor directives into source code:**

The Harbour compiler handles this task. It translates `#xcommand` directives such as `@ <nRow>, <nCol> BUTTONBMP ...` into executable source code (e.g., `TButtonBmp():New(...)`).
This happens automatically through the PPO file (Preprocessor Output), which shows the resulting source code.

**Reverse translation through Autocode:**

Autocode reads the generated source code from the PPO file.
It converts this source code back into the original directive (e.g., `@ <nRow>, <nCol> BUTTONBMP ...`), extracting the parameter and variable values.
For this, the mapping structure (`M->acd5_params`) is used, which defines how the individual parameters are interpreted and represented in the code.

---

I think it is now possible to automatically generate the mapping blocks using ChatGPT. At least with the blocks I tested, it works.
It would now also be possible to create mapping blocks for the redefine blocks.

However, since there is no interest in Autocode, and I do not work with resources myself and therefore do not need it, mappings are not included in the current `ACD5.ch`.

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: OpenAI vision API from FWH :: Author Antonio Linares]]> 2025-01-03T14:51:03-07:00 2025-01-03T14:51:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276754#p276754

Using https://platform.openai.com/docs/guides/vision examples.

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>


Using https://platform.openai.com/docs/guides/vision examples.

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-03T15:21:57-07:00 2025-01-03T15:21:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276755#p276755 BMPs are not allowed

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    // oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
    oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD SendImage( cImageFileName )    
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD SendImage( cImageFileName ) CLASS TOpenAI

    local aHeaders, cJson, cBase64Image, hMessage := { => }

    if ! File( cImageFileName )
       MsgAlert( "Image " + cImageFileName + " not found" )
       return nil
    endif

    cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What is in this image?" }, ;
        { "type" => "image_url", ;
          "image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )

    cJson := hb_jsonEncode( { "model" => ::cModel, ;
                              "messages" => { hMessage } } )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>
BMPs are not allowed

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    // oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
    oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD SendImage( cImageFileName )    
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD SendImage( cImageFileName ) CLASS TOpenAI

    local aHeaders, cJson, cBase64Image, hMessage := { => }

    if ! File( cImageFileName )
       MsgAlert( "Image " + cImageFileName + " not found" )
       return nil
    endif

    cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What is in this image?" }, ;
        { "type" => "image_url", ;
          "image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )

    cJson := hb_jsonEncode( { "model" => ::cModel, ;
                              "messages" => { hMessage } } )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-03T15:43:59-07:00 2025-01-03T15:43:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276756#p276756 METHOD Send( cPrompt ) CLASS TOpenAI implemented

Before running this example please set your OpenAI user key from your CMD window:
set OPENAI_API_KEY=sk-...

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    // oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
    // oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
    oChatgpt:Send( "What is the capital of France ?" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD SendImage( cImageFileName )    
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TOpenAI 

    LOCAL aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt(::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders)
    curl_easy_setopt(::hCurl, HB_CURLOPT_USERNAME, '')
    curl_easy_setopt(::hCurl, HB_CURLOPT_DL_BUFF_SETUP)
    curl_easy_setopt(::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F.)

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", cPrompt )

    hRequest[ "messages" ] = { hMessage }
    cJson = hb_jsonEncode( hRequest )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif
 
return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImage( cImageFileName ) CLASS TOpenAI

    local aHeaders, cJson, cBase64Image, hMessage := { => }

    if ! File( cImageFileName )
       MsgAlert( "Image " + cImageFileName + " not found" )
       return nil
    endif

    cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What is in this image?" }, ;
        { "type" => "image_url", ;
          "image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )

    cJson := hb_jsonEncode( { "model" => ::cModel, ;
                              "messages" => { hMessage } } )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse = "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse = "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>
METHOD Send( cPrompt ) CLASS TOpenAI implemented

Before running this example please set your OpenAI user key from your CMD window:
set OPENAI_API_KEY=sk-...

openai1.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

function Main()

    local oChatgpt := TOpenAI():New()

    // oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
    // oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
    oChatgpt:Send( "What is the capital of France ?" )

    MsgInfo( oChatgpt:GetValue() )

    oChatgpt:End()

return nil    

//----------------------------------------------------------------------------//

CLASS TOpenAI
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "gpt-4o-mini"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD SendImage( cImageFileName )    
    METHOD SendImageURL( cImageUrl )
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TOpenAI

    if Empty( cKey )
       ::cKey = GetEnv( "OPENAI_API_KEY" )
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.openai.com/v1/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TOpenAI

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TOpenAI

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TOpenAI 

    LOCAL aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt(::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders)
    curl_easy_setopt(::hCurl, HB_CURLOPT_USERNAME, '')
    curl_easy_setopt(::hCurl, HB_CURLOPT_DL_BUFF_SETUP)
    curl_easy_setopt(::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F.)

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", cPrompt )

    hRequest[ "messages" ] = { hMessage }
    cJson = hb_jsonEncode( hRequest )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse := "Error code " + Str( ::nError )
    endif
 
return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImage( cImageFileName ) CLASS TOpenAI

    local aHeaders, cJson, cBase64Image, hMessage := { => }

    if ! File( cImageFileName )
       MsgAlert( "Image " + cImageFileName + " not found" )
       return nil
    endif

    cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hMessage, "role", "user" )
    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What is in this image?" }, ;
        { "type" => "image_url", ;
          "image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )

    cJson := hb_jsonEncode( { "model" => ::cModel, ;
                              "messages" => { hMessage } } )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse = "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//

METHOD SendImageURL( cImageUrl ) CLASS TOpenAI

    local aHeaders, cJson, hRequest := { => }, hMessage := { => }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

    aHeaders := { "Content-Type: application/json", ;
                  "Authorization: Bearer " + ::cKey }

    curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
    curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

    hb_HSet( hRequest, "model", ::cModel )
    hb_HSet( hMessage, "role", "user" )

    hb_HSet( hMessage, "content", { ;
        { "type" => "text", "text" => "What's in this image?" }, ;
        { "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )

    hRequest[ "messages" ] = { hMessage }

    cJson = hb_jsonEncode( hRequest )

    curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )

    ::nError = curl_easy_perform( ::hCurl )
    curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

    if ::nError == HB_CURLE_OK
       ::cResponse = curl_easy_dl_buff_get( ::hCurl )
    else
       ::cResponse = "Error code " + Str( ::nError )
    endif

return ::cResponse

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-03T15:48:34-07:00 2025-01-03T15:48:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276757#p276757 Next: our first AI Agent demo ;-)]]> Next: our first AI Agent demo ;-)]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Carles]]> 2025-01-06T01:12:25-07:00 2025-01-06T01:12:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276760#p276760
Great !

C.]]>

Great !

C.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Otto]]> 2025-01-06T02:32:55-07:00 2025-01-06T02:32:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276766#p276766
Thank you very much for your research work.

A few days ago, I saw an advertisement for the Jetson Nano Orin. Do you think it would be possible to use this hardware to run a custom LMM and then send requests using FIVEWIN?

For example:

Emails are read via a local tool (e.g., Outlook or a custom email parser) and provided in a structured form (e.g., text files or via an API).

**Summary:**
The language model analyzes the content of the emails and generates a short summary (e.g., "New reservation for room 12 from January 10th to 12th.").

**Presentation:**
The summarized information could be displayed in a user-friendly interface, e.g., in a FIVEWIN application.

**Additional Features:**
- **Keyword Detection:** Highlighting important terms such as names, reservation dates, or invoice inquiries.
- **Categorization:** Sorting emails by topics (e.g., bookings, complaints, inquiries).

Best regards,
Otto]]>

Thank you very much for your research work.

A few days ago, I saw an advertisement for the Jetson Nano Orin. Do you think it would be possible to use this hardware to run a custom LMM and then send requests using FIVEWIN?

For example:

Emails are read via a local tool (e.g., Outlook or a custom email parser) and provided in a structured form (e.g., text files or via an API).

**Summary:**
The language model analyzes the content of the emails and generates a short summary (e.g., "New reservation for room 12 from January 10th to 12th.").

**Presentation:**
The summarized information could be displayed in a user-friendly interface, e.g., in a FIVEWIN application.

**Additional Features:**
- **Keyword Detection:** Highlighting important terms such as names, reservation dates, or invoice inquiries.
- **Categorization:** Sorting emails by topics (e.g., bookings, complaints, inquiries).

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-06T03:16:46-07:00 2025-01-06T03:16:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276767#p276767
Nvidia's Jetson Nano Orin uses Linux (a special ubuntu version) so I have just asked copilot if ollama may be installed on it:
Yes, it is possible to use Ollama on the Jetson Nano Orin. Ollama is an open-source tool that allows you to run large language models (LLMs) locally on Jetson devices, including the Jetson Nano Orin.

To install Ollama on your Jetson Nano Orin, you can follow these steps:

1. **Preparation**:
- Ensure you have JetPack 6.0 installed on your device.
- Download the SD card image from the official NVIDIA website.

2. **Native Installation**:
- Use the official Ollama installer:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
- This will create a service to run `ollama serve` at startup, allowing you to use the `ollama` command immediately.

3. **Using Docker Containers**:
- You can run Ollama inside a Docker container to avoid changes to your existing system:
```bash
docker run --runtime nvidia --rm --network=host -v ~/ollama:/ollama -e OLLAMA_MODELS=/ollama dustynv/ollama:r36.2.0
```

By following these steps, you can fully utilize the capabilities of your Jetson Nano Orin to run large language models efficiently.
We can use ollama from Harbour :)]]>

Nvidia's Jetson Nano Orin uses Linux (a special ubuntu version) so I have just asked copilot if ollama may be installed on it:
Yes, it is possible to use Ollama on the Jetson Nano Orin. Ollama is an open-source tool that allows you to run large language models (LLMs) locally on Jetson devices, including the Jetson Nano Orin.

To install Ollama on your Jetson Nano Orin, you can follow these steps:

1. **Preparation**:
- Ensure you have JetPack 6.0 installed on your device.
- Download the SD card image from the official NVIDIA website.

2. **Native Installation**:
- Use the official Ollama installer:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
- This will create a service to run `ollama serve` at startup, allowing you to use the `ollama` command immediately.

3. **Using Docker Containers**:
- You can run Ollama inside a Docker container to avoid changes to your existing system:
```bash
docker run --runtime nvidia --rm --network=host -v ~/ollama:/ollama -e OLLAMA_MODELS=/ollama dustynv/ollama:r36.2.0
```

By following these steps, you can fully utilize the capabilities of your Jetson Nano Orin to run large language models efficiently.
We can use ollama from Harbour :)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-06T03:19:18-07:00 2025-01-06T03:19:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276768#p276768 https://forums.fivetechsupport.com/view ... hp?t=44848]]> https://forums.fivetechsupport.com/view ... hp?t=44848]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Eroni]]> 2025-01-07T05:38:12-07:00 2025-01-07T05:38:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276797#p276797
I am trying build exe from openai1.prg but experiencing I am linking errors: (unresolved external)

Code: Select all | Expand

openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_INIT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_CLEANUP
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_SETOPT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_PERFORM
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_GETINFO
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_DL_BUFF_GET
Harbour 32 and MSVC 2022.

Which libs is missing?

Thanks in advance.]]>

I am trying build exe from openai1.prg but experiencing I am linking errors: (unresolved external)

Code: Select all | Expand

openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_INIT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_CLEANUP
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_SETOPT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_PERFORM
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_GETINFO
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_DL_BUFF_GET
Harbour 32 and MSVC 2022.

Which libs is missing?

Thanks in advance.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Antonio Linares]]> 2025-01-07T07:16:17-07:00 2025-01-07T07:16:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276799#p276799 <![CDATA[FiveWin for Harbour/xHarbour :: Re: OpenAI vision API from FWH :: Reply by Eroni]]> 2025-01-08T05:49:05-07:00 2025-01-08T05:49:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45279&p=276828#p276828
Antonio Linares wrote: Tue Jan 07, 2025 2:16 pm hbcurl.lib and libcurl.lib
Thanks!]]>
Antonio Linares wrote: Tue Jan 07, 2025 2:16 pm hbcurl.lib and libcurl.lib
Thanks!]]>
<![CDATA[FiveWin for Harbour/xHarbour :: BTNBMP image :: Author Silvio.Falconi]]> 2025-01-09T14:16:30-07:00 2025-01-09T14:16:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45292&p=276848#p276848 I tried with adjust the image is inserted as I want but after the caption it is not underneath and you can't see it well
the images i use are not the same size


@ nRow, 530 BTNBMP oImage ;
FILENAME IF(empty( cImmagine),cDefaImage,cImgPath+(cImmagine) );
SIZE 150,140 PIXEL FLAT ;
PROMPT cImmagine ;
OF oDlg NOROUND ;
UPDATE TOP

also the control must not be disabled but it must not be clicked either in fact I use Toggle()


oImage:Toggle()
oImage:nClrBorder := RGB(195,195,185)
oImage:nDeepFocusRect := 0
oImage:nClrFocusRect := RGB(245,245,235)
oImage:ltransparent:=.t.
oImage:lMOver = .f.


I have this result

Image

this figure below is to make you understand what I would like, enlarge the image to the edges and the caption slightly below
Image


if I upload a png I get a Stretch image

Image

only if I insert the color (color CLR_BLACK,CLR_WHITE) then I get a clear image but I think it's a forced thing because I won't always have the image on a white background

How can I solve it?]]>
I tried with adjust the image is inserted as I want but after the caption it is not underneath and you can't see it well
the images i use are not the same size


@ nRow, 530 BTNBMP oImage ;
FILENAME IF(empty( cImmagine),cDefaImage,cImgPath+(cImmagine) );
SIZE 150,140 PIXEL FLAT ;
PROMPT cImmagine ;
OF oDlg NOROUND ;
UPDATE TOP

also the control must not be disabled but it must not be clicked either in fact I use Toggle()


oImage:Toggle()
oImage:nClrBorder := RGB(195,195,185)
oImage:nDeepFocusRect := 0
oImage:nClrFocusRect := RGB(245,245,235)
oImage:ltransparent:=.t.
oImage:lMOver = .f.


I have this result

Image

this figure below is to make you understand what I would like, enlarge the image to the edges and the caption slightly below
Image


if I upload a png I get a Stretch image

Image

only if I insert the color (color CLR_BLACK,CLR_WHITE) then I get a clear image but I think it's a forced thing because I won't always have the image on a white background

How can I solve it?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Excel functions :: Author TimStone]]> 2025-01-09T16:59:35-07:00 2025-01-09T16:59:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45294&p=276852#p276852
So, It would be nice if we could get a summary here of how we can create, read, edit, and save Excel files without having Microsoft's program on that specific computer. With all the changes to the Office 365 programs, it's getting harder to keep up with their interface capabilities.

Tim]]>

So, It would be nice if we could get a summary here of how we can create, read, edit, and save Excel files without having Microsoft's program on that specific computer. With all the changes to the Office 365 programs, it's getting harder to keep up with their interface capabilities.

Tim]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Btnbmp with a line :: Author Silvio.Falconi]]> 2025-01-09T05:44:22-07:00 2025-01-09T06:33:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276841#p276841
example

Image


if there is no image the text must be in the center without the line

Image

I saw that if I upload an image on a white background the button then puts the text on a gray background
Any solution ?]]>

example

Image


if there is no image the text must be in the center without the line

Image

I saw that if I upload an image on a white background the button then puts the text on a gray background
Any solution ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Btnbmp with a line :: Reply by Antonio Linares]]> 2025-01-09T06:14:21-07:00 2025-01-09T06:14:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276842#p276842
1. You can modify the Class TBtnBmp source code

2. You may try to use oBtnBmp:bPainted]]>

1. You can modify the Class TBtnBmp source code

2. You may try to use oBtnBmp:bPainted]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Btnbmp with a line :: Reply by Silvio.Falconi]]> 2025-01-09T06:35:32-07:00 2025-01-09T06:35:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276843#p276843
Antonio Linares wrote: Thu Jan 09, 2025 1:14 pm Dear Silvio,

1. You can modify the Class TBtnBmp source code

2. You may try to use oBtnBmp:bPainted
I was inclined to go with the second option but
the problem is that if the text is bigger you should make the image smaller to give more prominence to the text]]>
Antonio Linares wrote: Thu Jan 09, 2025 1:14 pm Dear Silvio,

1. You can modify the Class TBtnBmp source code

2. You may try to use oBtnBmp:bPainted
I was inclined to go with the second option but
the problem is that if the text is bigger you should make the image smaller to give more prominence to the text]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Btnbmp with a line :: Reply by Antonio Linares]]> 2025-01-09T06:42:32-07:00 2025-01-09T06:42:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276844#p276844 <![CDATA[FiveWin for Harbour/xHarbour :: Re: Btnbmp with a line :: Reply by Silvio.Falconi]]> 2025-01-09T14:48:43-07:00 2025-01-09T14:48:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276849#p276849
Antonio Linares wrote: Thu Jan 09, 2025 1:42 pm You may use a TPanel object and paint what you need...
Resolved
although maybe I should calculate the length of the caption
oImage:bpainted:= { |hDC| MyLine(hDC,{oImage:nBottom - 50, 1,oImage:nWidth,147 },RGB(195,195,185),RGB(195,195,185)) }


Image]]>
Antonio Linares wrote: Thu Jan 09, 2025 1:42 pm You may use a TPanel object and paint what you need...
Resolved
although maybe I should calculate the length of the caption
oImage:bpainted:= { |hDC| MyLine(hDC,{oImage:nBottom - 50, 1,oImage:nWidth,147 },RGB(195,195,185),RGB(195,195,185)) }


Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Btnbmp with a line :: Reply by Antonio Linares]]> 2025-01-10T00:23:54-07:00 2025-01-10T00:23:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45291&p=276855#p276855
You are a FWH Master already :wink:]]>

You are a FWH Master already :wink:]]>
<![CDATA[FiveWin for Harbour/xHarbour :: SAY with FLAT border :: Author JoséQuintas]]> 2025-01-13T15:19:51-07:00 2025-01-13T15:19:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45303&p=276889#p276889

Code: Select all | Expand

   @ 10, nCol SAY xLabel VAR cFilter OF xDlg PIXEL ;
      SIZE 500, nRowSize FONT oFont COLOR CLR_BLACK, CLR_WHITE TRANSPARENT BORDER
   xLabel:l3D := .F.
How to do a FLAT BORDER ?]]>

Code: Select all | Expand

   @ 10, nCol SAY xLabel VAR cFilter OF xDlg PIXEL ;
      SIZE 500, nRowSize FONT oFont COLOR CLR_BLACK, CLR_WHITE TRANSPARENT BORDER
   xLabel:l3D := .F.
How to do a FLAT BORDER ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: SAY with FLAT border :: Reply by karinha]]> 2025-01-14T08:23:13-07:00 2025-01-14T08:23:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45303&p=276906#p276906
I don't understand it very well, but I think that using SSAY.PRG or DSAY.PRG you get the desired effect.

Regards, saludos.]]>

I don't understand it very well, but I think that using SSAY.PRG or DSAY.PRG you get the desired effect.

Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: message for Darrell Ortiz :: Author Antonio Linares]]> 2025-01-13T23:17:43-07:00 2025-01-13T23:17:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45306&p=276895#p276895
It seems as there is an email problem with your email account, please check it:

550 permanent failure for one or more recipients (darrell.ortiz@cdmsoft.com:blocked)

Is this email working for you Darrell.ortiz0310@gmail.com ?

best regards]]>

It seems as there is an email problem with your email account, please check it:

550 permanent failure for one or more recipients (darrell.ortiz@cdmsoft.com:blocked)

Is this email working for you Darrell.ortiz0310@gmail.com ?

best regards]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: message for Darrell Ortiz :: Reply by karinha]]> 2025-01-14T08:28:53-07:00 2025-01-14T08:28:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45306&p=276907#p276907 https://cdmsoft.com/

corporate@cdmsoft.com

Regards, saludos.]]>
https://cdmsoft.com/

corporate@cdmsoft.com

Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Bootstrap for FiveWin :: Author Otto]]> 2025-01-16T00:09:20-07:00 2025-01-16T00:09:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276925#p276925 Bootstrap for FiveWin is a concept based on the grid system used in modern web frameworks like Bootstrap. It enables the creation of user-friendly and responsive user interfaces (UI) in FiveWin applications. The grid system divides the window into a specific number of columns, allowing for simple and consistent positioning and sizing of controls (such as buttons, text fields, labels, etc.).

Main features:
Grid system: The window is divided into 12 columns, with the spacing between columns (gutter) being definable.

Responsive design: The controls automatically adjust to the size of the window when it is resized.

Easy positioning: Controls can be positioned based on rows and columns, similar to HTML/CSS with Bootstrap.

Flexibility: Controls can span across multiple columns (ColSpan) to create complex layouts.

Code: Select all | Expand

#include "FiveWin.ch"

// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )

// Hauptprogramm
FUNCTION Main()
  
      LOCAL oDlg, oGrid
      LOCAL oBtnOk, oBtnCancel

      // Dialogfenster erstellen
      DEFINE DIALOG oDlg ;
         TITLE "FiveWin Bootstrap Test" ;
         SIZE 800, 600 ;
         TRUEPIXEL ;
         STYLE WS_THICKFRAME

      oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

      // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
      oGrid := FWGrid():New( 12, 10 )

      // Buttons hinzufügen
      oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
      oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

      oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
      oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

      // Grid-System dem Dialog zuweisen
      oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

      // Dialogfenster anzeigen
      ACTIVATE DIALOG oDlg ;
         CENTERED

  
   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
         nControlHeight := 32  // Standardhöhe
         nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
         nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

         aControl[1]:SetPos( nY, nX )
         aControl[1]:SetSize( nControlWidth, nControlHeight )
      ENDIF
   NEXT
   RETURN Self

// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

Then I thought that it might be better to simply extend the TWindows class.
But I still have problems here.
Best regards,
Otto

class

Code: Select all | Expand

CLASS TWindow
   // ... (vorhandene Daten und Methoden)

   // Neue Eigenschaften für das Grid-System
   DATA nColumns AS NUMERIC INIT 12  // Anzahl der Spalten im Grid
   DATA nGutter  AS NUMERIC INIT 5   // Abstand zwischen den Steuerelementen
   DATA oGrid    AS ARRAY   INIT {}  // Array zur Speicherung der Steuerelemente im Grid

   // Neue Methoden für das Grid-System
   METHOD AddToGrid( oControl, nRow, nCol, nColSpan )
   METHOD ResizeControls( nWidth, nHeight )
   METHOD _NCOLUMNS( nNewValue ) SETGET

   // ... (restliche vorhandene Methoden)
ENDCLASS

//----------------------------------------------------------------------------//

METHOD AddToGrid( oControl, nRow, nCol, nColSpan ) CLASS TWindow
   // Fügt ein Steuerelement zum Grid hinzu
   IF !EMPTY( ::oGrid )
      AAdd( ::oGrid, { oControl, nRow, nCol, nColSpan } )
   ENDIF
   RETURN Self

//----------------------------------------------------------------------------//

METHOD ResizeControls( nWidth, nHeight ) CLASS TWindow
   // Berechnet die Größe und Position der Steuerelemente basierend auf dem Grid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   IF !EMPTY( ::oGrid )
      FOR EACH aControl IN ::oGrid
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )
         ENDIF
      NEXT
   ENDIF
   RETURN Self

//----------------------------------------------------------------------------//

METHOD _NCOLUMNS( nNewValue ) CLASS TWindow
   IF PCount() > 0
      ::nColumns := nNewValue
   ENDIF
   RETURN ::nColumns

prg

Code: Select all | Expand

FUNCTION Main()
   LOCAL oDlg
   LOCAL oSayName, oGetName
   LOCAL oSayAge, oGetAge
   LOCAL oBtnOk, oBtnCancel

   // Create the dialog
   oDlg := TDialog():New(,,,, "FiveWin Bootstrap Test",,, .F., 262144,,,,, .F.,,,, 800, 600, .F.,, "oDlg", nil, .T., )

   // Initialize grid system
   oDlg:nColumns := 12
   oDlg:nGutter := 5
   oDlg:oGrid := {}

   // SAY (Label) for Name
   oSayName := TSay():New( 0, 0, "Name:", oDlg )
   oDlg:AddToGrid( oSayName, 2, 1, 2 )

   // GET (Input field) for Name
   oGetName := TGet():New( 0, 0, 100, 32, "", oDlg )
   oDlg:AddToGrid( oGetName, 2, 3, 4 )

   // SAY (Label) for Age
   oSayAge := TSay():New( 0, 0, "Alter:", oDlg )
   oDlg:AddToGrid( oSayAge, 3, 1, 2 )

   // GET (Input field) for Age
   oGetAge := TGet():New( 0, 0, 100, 32, "", oDlg )
   oDlg:AddToGrid( oGetAge, 3, 3, 4 )

   // Buttons
   oBtnOk := TButton():New( 0, 0, "&Ok", oDlg, { || MsgInfo("Ok clicked!") }, 100, 32 )
   oDlg:AddToGrid( oBtnOk, 4, 1, 3 )

   oBtnCancel := TButton():New( 0, 0, "&Cancel", oDlg, { || oDlg:End() }, 100, 32 )
   oDlg:AddToGrid( oBtnCancel, 4, 4, 3 )

   // Assign grid system to the dialog
   oDlg:bResized := { || oDlg:ResizeControls( oDlg:nWidth(), oDlg:nHeight() ) }

   // Show the dialog
   ACTIVATE DIALOG oDlg CENTERED

   RETURN NIL
   
]]>
Bootstrap for FiveWin is a concept based on the grid system used in modern web frameworks like Bootstrap. It enables the creation of user-friendly and responsive user interfaces (UI) in FiveWin applications. The grid system divides the window into a specific number of columns, allowing for simple and consistent positioning and sizing of controls (such as buttons, text fields, labels, etc.).

Main features:
Grid system: The window is divided into 12 columns, with the spacing between columns (gutter) being definable.

Responsive design: The controls automatically adjust to the size of the window when it is resized.

Easy positioning: Controls can be positioned based on rows and columns, similar to HTML/CSS with Bootstrap.

Flexibility: Controls can span across multiple columns (ColSpan) to create complex layouts.

Code: Select all | Expand

#include "FiveWin.ch"

// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )

// Hauptprogramm
FUNCTION Main()
  
      LOCAL oDlg, oGrid
      LOCAL oBtnOk, oBtnCancel

      // Dialogfenster erstellen
      DEFINE DIALOG oDlg ;
         TITLE "FiveWin Bootstrap Test" ;
         SIZE 800, 600 ;
         TRUEPIXEL ;
         STYLE WS_THICKFRAME

      oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

      // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
      oGrid := FWGrid():New( 12, 10 )

      // Buttons hinzufügen
      oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
      oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

      oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
      oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

      // Grid-System dem Dialog zuweisen
      oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

      // Dialogfenster anzeigen
      ACTIVATE DIALOG oDlg ;
         CENTERED

  
   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
         nControlHeight := 32  // Standardhöhe
         nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
         nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

         aControl[1]:SetPos( nY, nX )
         aControl[1]:SetSize( nControlWidth, nControlHeight )
      ENDIF
   NEXT
   RETURN Self

// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

Then I thought that it might be better to simply extend the TWindows class.
But I still have problems here.
Best regards,
Otto

class

Code: Select all | Expand

CLASS TWindow
   // ... (vorhandene Daten und Methoden)

   // Neue Eigenschaften für das Grid-System
   DATA nColumns AS NUMERIC INIT 12  // Anzahl der Spalten im Grid
   DATA nGutter  AS NUMERIC INIT 5   // Abstand zwischen den Steuerelementen
   DATA oGrid    AS ARRAY   INIT {}  // Array zur Speicherung der Steuerelemente im Grid

   // Neue Methoden für das Grid-System
   METHOD AddToGrid( oControl, nRow, nCol, nColSpan )
   METHOD ResizeControls( nWidth, nHeight )
   METHOD _NCOLUMNS( nNewValue ) SETGET

   // ... (restliche vorhandene Methoden)
ENDCLASS

//----------------------------------------------------------------------------//

METHOD AddToGrid( oControl, nRow, nCol, nColSpan ) CLASS TWindow
   // Fügt ein Steuerelement zum Grid hinzu
   IF !EMPTY( ::oGrid )
      AAdd( ::oGrid, { oControl, nRow, nCol, nColSpan } )
   ENDIF
   RETURN Self

//----------------------------------------------------------------------------//

METHOD ResizeControls( nWidth, nHeight ) CLASS TWindow
   // Berechnet die Größe und Position der Steuerelemente basierend auf dem Grid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   IF !EMPTY( ::oGrid )
      FOR EACH aControl IN ::oGrid
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )
         ENDIF
      NEXT
   ENDIF
   RETURN Self

//----------------------------------------------------------------------------//

METHOD _NCOLUMNS( nNewValue ) CLASS TWindow
   IF PCount() > 0
      ::nColumns := nNewValue
   ENDIF
   RETURN ::nColumns

prg

Code: Select all | Expand

FUNCTION Main()
   LOCAL oDlg
   LOCAL oSayName, oGetName
   LOCAL oSayAge, oGetAge
   LOCAL oBtnOk, oBtnCancel

   // Create the dialog
   oDlg := TDialog():New(,,,, "FiveWin Bootstrap Test",,, .F., 262144,,,,, .F.,,,, 800, 600, .F.,, "oDlg", nil, .T., )

   // Initialize grid system
   oDlg:nColumns := 12
   oDlg:nGutter := 5
   oDlg:oGrid := {}

   // SAY (Label) for Name
   oSayName := TSay():New( 0, 0, "Name:", oDlg )
   oDlg:AddToGrid( oSayName, 2, 1, 2 )

   // GET (Input field) for Name
   oGetName := TGet():New( 0, 0, 100, 32, "", oDlg )
   oDlg:AddToGrid( oGetName, 2, 3, 4 )

   // SAY (Label) for Age
   oSayAge := TSay():New( 0, 0, "Alter:", oDlg )
   oDlg:AddToGrid( oSayAge, 3, 1, 2 )

   // GET (Input field) for Age
   oGetAge := TGet():New( 0, 0, 100, 32, "", oDlg )
   oDlg:AddToGrid( oGetAge, 3, 3, 4 )

   // Buttons
   oBtnOk := TButton():New( 0, 0, "&Ok", oDlg, { || MsgInfo("Ok clicked!") }, 100, 32 )
   oDlg:AddToGrid( oBtnOk, 4, 1, 3 )

   oBtnCancel := TButton():New( 0, 0, "&Cancel", oDlg, { || oDlg:End() }, 100, 32 )
   oDlg:AddToGrid( oBtnCancel, 4, 4, 3 )

   // Assign grid system to the dialog
   oDlg:bResized := { || oDlg:ResizeControls( oDlg:nWidth(), oDlg:nHeight() ) }

   // Show the dialog
   ACTIVATE DIALOG oDlg CENTERED

   RETURN NIL
   
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by Otto]]> 2025-01-16T01:48:19-07:00 2025-01-16T01:48:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276926#p276926

Code: Select all | Expand

#include "FiveWin.ch"

// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )

// Hauptprogramm
FUNCTION Main()
  
      LOCAL oDlg, oGrid
      LOCAL oBtnOk, oBtnCancel

      // Dialogfenster erstellen
      DEFINE DIALOG oDlg ;
         TITLE "FiveWin Bootstrap Test" ;
         SIZE 800, 600 ;
         TRUEPIXEL ;
         STYLE WS_THICKFRAME

      oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

      // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
      oGrid := FWGrid():New( 12, 10 )

      // Buttons hinzufügen
      oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
      oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

      oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
      oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

      // Grid-System dem Dialog zuweisen
      oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

      // Dialogfenster anzeigen
      ACTIVATE DIALOG oDlg ;
         CENTERED

  
   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl
   LOCAL nPrevY := ::nGutter  // Startposition für die erste Zeile
   LOCAL nBreakpoint := 400   // Schwellenwert für das Stapeln der Schalter

   // Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Schalter vertikal
   IF nWidth < nBreakpoint
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nWidth - 2 * ::nGutter  // Volle Breite minus Gutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter  // Linksbündig
            nY := nPrevY     // Verwende die vorherige Y-Position

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )

            nPrevY += nControlHeight + ::nGutter  // Aktualisiere die Y-Position für das nächste Steuerelement
         ENDIF
      NEXT
   ELSE
      // Normales Grid-Layout (Schalter nebeneinander)
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter  // Alle Schalter in derselben Zeile

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )
         ENDIF
      NEXT
   ENDIF
   RETURN Self

// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

]]>

Code: Select all | Expand

#include "FiveWin.ch"

// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )

// Hauptprogramm
FUNCTION Main()
  
      LOCAL oDlg, oGrid
      LOCAL oBtnOk, oBtnCancel

      // Dialogfenster erstellen
      DEFINE DIALOG oDlg ;
         TITLE "FiveWin Bootstrap Test" ;
         SIZE 800, 600 ;
         TRUEPIXEL ;
         STYLE WS_THICKFRAME

      oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

      // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
      oGrid := FWGrid():New( 12, 10 )

      // Buttons hinzufügen
      oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
      oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

      oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
      oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
      oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

      // Grid-System dem Dialog zuweisen
      oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

      // Dialogfenster anzeigen
      ACTIVATE DIALOG oDlg ;
         CENTERED

  
   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl
   LOCAL nPrevY := ::nGutter  // Startposition für die erste Zeile
   LOCAL nBreakpoint := 400   // Schwellenwert für das Stapeln der Schalter

   // Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Schalter vertikal
   IF nWidth < nBreakpoint
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nWidth - 2 * ::nGutter  // Volle Breite minus Gutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter  // Linksbündig
            nY := nPrevY     // Verwende die vorherige Y-Position

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )

            nPrevY += nControlHeight + ::nGutter  // Aktualisiere die Y-Position für das nächste Steuerelement
         ENDIF
      NEXT
   ELSE
      // Normales Grid-Layout (Schalter nebeneinander)
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter  // Alle Schalter in derselben Zeile

            aControl[1]:SetPos( nY, nX )
            aControl[1]:SetSize( nControlWidth, nControlHeight )
         ENDIF
      NEXT
   ENDIF
   RETURN Self

// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by Otto]]> 2025-01-16T06:16:02-07:00 2025-01-16T06:16:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276928#p276928
Image


Code: Select all | Expand

 
#include "FiveWin.ch"
#ifdef __XHARBOUR__
       /* Hash item functions */
       #xtranslate hb_Hash( [<x,...>] )            => Hash( <x> )
       #xtranslate hb_HHasKey( [<x,...>] )         => HHasKey( <x> )
       #xtranslate hb_HPos( [<x,...>] )            => HGetPos( <x> )
       #xtranslate hb_HGet( [<x,...>] )            => HGet( <x> )
       #xtranslate hb_HSet( [<x,...>] )            => HSet( <x> )
       #xtranslate hb_HDel( [<x,...>] )            => HDel( <x> )
       #xtranslate hb_HKeyAt( [<x,...>] )          => HGetKeyAt( <x> )
       #xtranslate hb_HValueAt( [<x,...>] )        => HGetValueAt( <x> )
       #xtranslate hb_HValueAt( [<x,...>] )        => HSetValueAt( <x> )
       #xtranslate hb_HPairAt( [<x,...>] )         => HGetPairAt( <x> )
       #xtranslate hb_HDelAt( [<x,...>] )          => HDelAt( <x> )
       #xtranslate hb_HKeys( [<x,...>] )           => HGetKeys( <x> )
       #xtranslate hb_HValues( [<x,...>] )         => HGetValues( <x> )
       #xtranslate hb_HFill( [<x,...>] )           => HFill( <x> )
       #xtranslate hb_HClone( [<x,...>] )          => HClone( <x> )
       #xtranslate hb_HCopy( [<x,...>] )           => HCopy( <x> )
       #xtranslate hb_HMerge( [<x,...>] )          => HMerge( <x> )
       #xtranslate hb_HEval( [<x,...>] )           => HEval( <x> )
       #xtranslate hb_HScan( [<x,...>] )           => HScan( <x> )
       #xtranslate hb_HSetCaseMatch( [<x,...>] )   => HSetCaseMatch( <x> )
       #xtranslate hb_HCaseMatch( [<x,...>] )      => HGetCaseMatch( <x> )
       #xtranslate hb_HSetAutoAdd( [<x,...>] )     => HSetAutoAdd( <x> )
       #xtranslate hb_HAutoAdd( [<x,...>] )        => HGetAutoAdd( <x> )
       #xtranslate hb_HAllocate( [<x,...>] )       => HAllocate( <x> )
       #xtranslate hb_HDefault( [<x,...>] )        => HDefault( <x> )
    #else
       /* Hash item functions */
       #xtranslate Hash( [<x,...>] )           => hb_Hash( <x> )
       #xtranslate HHasKey( [<x,...>] )        => hb_HHasKey( <x> )
       #xtranslate HGetPos( [<x,...>] )        => hb_HPos( <x> )
       #xtranslate HGet( [<x,...>] )           => hb_HGet( <x> )
       #xtranslate HSet( [<x,...>] )           => hb_HSet( <x> )
       #xtranslate HDel( [<x,...>] )           => hb_HDel( <x> )
       #xtranslate HGetKeyAt( [<x,...>] )      => hb_HKeyAt( <x> )
       #xtranslate HGetValueAt( [<x,...>] )    => hb_HValueAt( <x> )
       #xtranslate HSetValueAt( [<x,...>] )    => hb_HValueAt( <x> )
       #xtranslate HGetPairAt( [<x,...>] )     => hb_HPairAt( <x> )
       #xtranslate HDelAt( [<x,...>] )         => hb_HDelAt( <x> )
       #xtranslate HGetKeys( [<x,...>] )       => hb_HKeys( <x> )
       #xtranslate HGetValues( [<x,...>] )     => hb_HValues( <x> )
       #xtranslate HFill( [<x,...>] )          => hb_HFill( <x> )
       #xtranslate HClone( [<x,...>] )         => hb_HClone( <x> )
       #xtranslate HCopy( [<x,...>] )          => hb_HCopy( <x> )
       #xtranslate HMerge( [<x,...>] )         => hb_HMerge( <x> )
       #xtranslate HEval( [<x,...>] )          => hb_HEval( <x> )
       #xtranslate HScan( [<x,...>] )          => hb_HScan( <x> )
       #xtranslate HSetCaseMatch( [<x,...>] )  => hb_HSetCaseMatch( <x> )
       #xtranslate HGetCaseMatch( [<x,...>] )  => hb_HCaseMatch( <x> )
       #xtranslate HSetAutoAdd( [<x,...>] )    => hb_HSetAutoAdd( <x> )
       #xtranslate HGetAutoAdd( [<x,...>] )    => hb_HAutoAdd( <x> )
       #xtranslate HAllocate( [<x,...>] )      => hb_HAllocate( <x> )
       #xtranslate HDefault( [<x,...>] )       => hb_HDefault( <x> )
       #xtranslate HSetPartition( [<x,...>] )  =>

       /* Associative hash array functions */
       #xtranslate haAGetKeyAt( [<x,...>] )    => hb_HKeyAt( <x> )
       #xtranslate haAGetValueAt( [<x,...>] )  => hb_HValueAt( <x> )
       #xtranslate haADelAt( [<x,...>] )       => hb_HDelAt( <x> )
       #xtranslate haAGetPos( [<x,...>] )      => hb_HPos( <x> )
       #xtranslate haAGetRealPos( <x>, <y> )   => iif( HB_ISNUMERIC( <y> ) .AND. <y> >= 1 .AND. ;
                                                       Int( <y> ) <= Len( <x> ), Int( <y> ), 0 )
       #xtranslate HGetVaaPos( <x> )           => {| h | ;;
                                                    LOCAL a := Array( Len( h ), v ;;
                                                    FOR EACH v IN a ;;
                                                       v := v:__enumIndex() ;;
                                                    NEXT ;;
                                                    RETURN a ; }:eval( <x> )
       #xtranslate HGetAACompatibility( <x> )  => hb_HKeepOrder( <x> )
       #xtranslate HSetAACompatibility( [<x,...>] ) => {| h | ;;
                                                       hb_HKeepOrder( h ) ;;
                                                       RETURN .T. ; }:eval( <x> )

    #endif





// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
#DEFINE DARK_GET_BG RGB( 80, 80, 80 )
#DEFINE DARK_GET_FG RGB( 255, 255, 255 )

// Hauptprogramm

static oDlg
FUNCTION Main()
  
   LOCAL  oGrid
   LOCAL oBtnOk, oBtnCancel
   LOCAL oSayTitle, oSayName, oGetName, oSayEmail, oGetEmail
   LOCAL cName := "", cEmail := ""

   // Dialogfenster erstellen
   DEFINE DIALOG oDlg ;
      TITLE "FiveWin Bootstrap Test" ;
      SIZE 800, 600 ;
      TRUEPIXEL ;
      STYLE WS_THICKFRAME

   oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

   // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
   oGrid := FWGrid():New( 12, 10 )

   // Titel SAY (responsiv)
   oSayTitle := TSay():New( 10, 10, { || "Bootstrap grid like system" }, oDlg )
   oSayTitle:SetColor( DARK_TEXT, DARK_BACKGROUND )
   oSayTitle:SetFont( TFont():New( "Arial", 0, 24 ) )  // Große Schriftgröße für den Titel
   oGrid:AddControl( oSayTitle, 1, 1, 12 )  // Titel über die gesamte Breite
 

	
	// SAY und GET für Name
	oSayName := TSay():New( 50, 10, { || "Name:" }, oDlg )
	oSayName:SetColor( DARK_TEXT, DARK_BACKGROUND )
	oSayName:SetFont( TFont():New( "Arial", 0, 18 ) )
	oGrid:AddControl( oSayName, 2, 1, 2 )
	
	// Name-Get rein über TGet():New()
	oGetName := TGet():New( 50, 100, { || cName }, oDlg )
	oGetName:SetSize( 200, 32 )
	oGetName:SetColor( DARK_GET_FG, DARK_GET_BG )
	oGrid:AddControl( oGetName, 2, 3, 6 )
	
	// SAY und GET für E-Mail
	oSayEmail := TSay():New( 90, 10, { || "E-Mail:" }, oDlg )
	oSayEmail:SetColor( DARK_TEXT, DARK_BACKGROUND )
	oSayEmail:SetFont( TFont():New( "Arial", 0, 18 ) )
	oGrid:AddControl( oSayEmail, 3, 1, 2 )
	
	// E-Mail-Get (Korrektur: { || cEmail } statt { || cName }, andere Zeile)
	oGetEmail := TGet():New( 90, 100, { || cEmail }, oDlg )
	oGetEmail:SetSize( 200, 32 )
	oGetEmail:SetColor( DARK_GET_FG, DARK_GET_BG )
	oGrid:AddControl( oGetEmail, 3, 3, 6 )

 
   
   
   
   

   // Buttons hinzufügen
   oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 4, 1, 3 )
   oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
   oGrid:AddControl( oBtnOk:oButton, 4, 1, 3 )

   oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 4, 4, 3 )
   oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
   oGrid:AddControl( oBtnCancel:oButton, 4, 4, 3 )

   // Grid-System dem Dialog zuweisen
   oDlg:bResized := ( { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) } )

   // Dialogfenster anzeigen
   ACTIVATE DIALOG oDlg ;
      CENTERED

   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self


METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl
   LOCAL nPrevY := ::nGutter  // Startposition für die erste Zeile
   LOCAL nBreakpoint := 600   // Schwellenwert für das Stapeln der Controls
   LOCAL hRows := Hash()      // Initialisiere hRows als Hash
   LOCAL nRowKey, aRowControls
	LOCAL aKeys  
        

   // Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Controls vertikal
   IF nWidth < nBreakpoint
      // Hilfsarray: wir gruppieren Controls nach Row

      // Schritt 1: alle Controls entsprechend ihrer nRow einsortieren
      FOR EACH aControl IN ::aControls
         IF !HB_HHasKey( hRows, aControl[2] )
            hRows[ aControl[2] ] := {}  // Initialisiere eine leere Array-Liste für jede Zeile
         ENDIF
         AAdd( hRows[ aControl[2] ], aControl )
      NEXT

      // Schritt 2: pro Row einen "Block" untereinander anzeigen
       
			aKeys := HB_HKeys( hRows )
			ASort( aKeys )            // sortierte Reihenfolge
			FOR EACH nRowKey IN aKeys // jetzt garantiert Row 1,2,3,...

     
          aRowControls := hRows[ nRowKey ]

          // Sortiere die Controls innerhalb jeder Zeile nach ihrer Spaltenposition (nCol)
          ASort( aRowControls,,, { |a, b| a[3] < b[3] } )
          FOR EACH aControl IN aRowControls
          NEXT

          FOR EACH aControl IN aRowControls
             nControlWidth := nWidth - 2 * ::nGutter  // Volle Breite minus Gutter
             nControlHeight := 32  // Standardhöhe
             nX := ::nGutter  // Linksbündig

             // Titel: Schriftgröße drastisch verkleinern
             IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
                aControl[1]:SetFont( TFont():New( "Arial", 0, 16 ) )  // Kleinere Schriftgröße
                aControl[1]:SetPos( nPrevY, nX )
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile
             ENDIF

             // SAY: Schriftgröße drastisch verkleinern
             IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
                aControl[1]:SetFont( TFont():New( "Arial", 0, 12 ) )  // Kleinere Schriftgröße
                aControl[1]:SetPos( nPrevY, nX )
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für GET
             ENDIF

             // GET: In der darunterliegenden Zeile
             IF aControl[1]:ClassName() == "TGET"
              //  aControl[1]:SetPos( nPrevY, nX )
                
              
              
              aControl[1]:nTop  := nPrevY
              aControl[1]:nLeft  := nX
     
              
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für das nächste SAY
             ENDIF

             // Buttons: Untereinander, Cancel linksbündig
             IF aControl[1]:ClassName() == "TBUTTON"
                aControl[1]:SetPos( nPrevY, nX )
                
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für den nächsten Button
             ENDIF

             // Erzwinge eine Aktualisierung des Controls
             aControl[1]:Refresh()
          NEXT
      NEXT
   ELSE
      // Normales Grid-Layout (SAY und GET nebeneinander, Buttons nebeneinander)
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

            // Titel: Schriftgröße zurücksetzen
            IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
               aControl[1]:SetFont( TFont():New( "Arial", 0, 26 ) )  // Große Schriftgröße
            ENDIF

            // SAY: Schriftgröße zurücksetzen
            IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
               aControl[1]:SetFont( TFont():New( "Arial", 0, 18 ) )  // Normale Schriftgröße
            ENDIF
            
             IF aControl[1]:ClassName() == "TGET"
              	aControl[1]:nTop  := nY
              aControl[1]:nLeft  := nX
             ELSE
             	aControl[1]:SetPos( nY, nX )
             ENDIF
            
            
            aControl[1]:SetSize( nControlWidth, nControlHeight )
            aControl[1]:Refresh()
         ENDIF
      NEXT
   ENDIF
   RETURN Self


   
// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self
]]>

Image


Code: Select all | Expand

 
#include "FiveWin.ch"
#ifdef __XHARBOUR__
       /* Hash item functions */
       #xtranslate hb_Hash( [<x,...>] )            => Hash( <x> )
       #xtranslate hb_HHasKey( [<x,...>] )         => HHasKey( <x> )
       #xtranslate hb_HPos( [<x,...>] )            => HGetPos( <x> )
       #xtranslate hb_HGet( [<x,...>] )            => HGet( <x> )
       #xtranslate hb_HSet( [<x,...>] )            => HSet( <x> )
       #xtranslate hb_HDel( [<x,...>] )            => HDel( <x> )
       #xtranslate hb_HKeyAt( [<x,...>] )          => HGetKeyAt( <x> )
       #xtranslate hb_HValueAt( [<x,...>] )        => HGetValueAt( <x> )
       #xtranslate hb_HValueAt( [<x,...>] )        => HSetValueAt( <x> )
       #xtranslate hb_HPairAt( [<x,...>] )         => HGetPairAt( <x> )
       #xtranslate hb_HDelAt( [<x,...>] )          => HDelAt( <x> )
       #xtranslate hb_HKeys( [<x,...>] )           => HGetKeys( <x> )
       #xtranslate hb_HValues( [<x,...>] )         => HGetValues( <x> )
       #xtranslate hb_HFill( [<x,...>] )           => HFill( <x> )
       #xtranslate hb_HClone( [<x,...>] )          => HClone( <x> )
       #xtranslate hb_HCopy( [<x,...>] )           => HCopy( <x> )
       #xtranslate hb_HMerge( [<x,...>] )          => HMerge( <x> )
       #xtranslate hb_HEval( [<x,...>] )           => HEval( <x> )
       #xtranslate hb_HScan( [<x,...>] )           => HScan( <x> )
       #xtranslate hb_HSetCaseMatch( [<x,...>] )   => HSetCaseMatch( <x> )
       #xtranslate hb_HCaseMatch( [<x,...>] )      => HGetCaseMatch( <x> )
       #xtranslate hb_HSetAutoAdd( [<x,...>] )     => HSetAutoAdd( <x> )
       #xtranslate hb_HAutoAdd( [<x,...>] )        => HGetAutoAdd( <x> )
       #xtranslate hb_HAllocate( [<x,...>] )       => HAllocate( <x> )
       #xtranslate hb_HDefault( [<x,...>] )        => HDefault( <x> )
    #else
       /* Hash item functions */
       #xtranslate Hash( [<x,...>] )           => hb_Hash( <x> )
       #xtranslate HHasKey( [<x,...>] )        => hb_HHasKey( <x> )
       #xtranslate HGetPos( [<x,...>] )        => hb_HPos( <x> )
       #xtranslate HGet( [<x,...>] )           => hb_HGet( <x> )
       #xtranslate HSet( [<x,...>] )           => hb_HSet( <x> )
       #xtranslate HDel( [<x,...>] )           => hb_HDel( <x> )
       #xtranslate HGetKeyAt( [<x,...>] )      => hb_HKeyAt( <x> )
       #xtranslate HGetValueAt( [<x,...>] )    => hb_HValueAt( <x> )
       #xtranslate HSetValueAt( [<x,...>] )    => hb_HValueAt( <x> )
       #xtranslate HGetPairAt( [<x,...>] )     => hb_HPairAt( <x> )
       #xtranslate HDelAt( [<x,...>] )         => hb_HDelAt( <x> )
       #xtranslate HGetKeys( [<x,...>] )       => hb_HKeys( <x> )
       #xtranslate HGetValues( [<x,...>] )     => hb_HValues( <x> )
       #xtranslate HFill( [<x,...>] )          => hb_HFill( <x> )
       #xtranslate HClone( [<x,...>] )         => hb_HClone( <x> )
       #xtranslate HCopy( [<x,...>] )          => hb_HCopy( <x> )
       #xtranslate HMerge( [<x,...>] )         => hb_HMerge( <x> )
       #xtranslate HEval( [<x,...>] )          => hb_HEval( <x> )
       #xtranslate HScan( [<x,...>] )          => hb_HScan( <x> )
       #xtranslate HSetCaseMatch( [<x,...>] )  => hb_HSetCaseMatch( <x> )
       #xtranslate HGetCaseMatch( [<x,...>] )  => hb_HCaseMatch( <x> )
       #xtranslate HSetAutoAdd( [<x,...>] )    => hb_HSetAutoAdd( <x> )
       #xtranslate HGetAutoAdd( [<x,...>] )    => hb_HAutoAdd( <x> )
       #xtranslate HAllocate( [<x,...>] )      => hb_HAllocate( <x> )
       #xtranslate HDefault( [<x,...>] )       => hb_HDefault( <x> )
       #xtranslate HSetPartition( [<x,...>] )  =>

       /* Associative hash array functions */
       #xtranslate haAGetKeyAt( [<x,...>] )    => hb_HKeyAt( <x> )
       #xtranslate haAGetValueAt( [<x,...>] )  => hb_HValueAt( <x> )
       #xtranslate haADelAt( [<x,...>] )       => hb_HDelAt( <x> )
       #xtranslate haAGetPos( [<x,...>] )      => hb_HPos( <x> )
       #xtranslate haAGetRealPos( <x>, <y> )   => iif( HB_ISNUMERIC( <y> ) .AND. <y> >= 1 .AND. ;
                                                       Int( <y> ) <= Len( <x> ), Int( <y> ), 0 )
       #xtranslate HGetVaaPos( <x> )           => {| h | ;;
                                                    LOCAL a := Array( Len( h ), v ;;
                                                    FOR EACH v IN a ;;
                                                       v := v:__enumIndex() ;;
                                                    NEXT ;;
                                                    RETURN a ; }:eval( <x> )
       #xtranslate HGetAACompatibility( <x> )  => hb_HKeepOrder( <x> )
       #xtranslate HSetAACompatibility( [<x,...>] ) => {| h | ;;
                                                       hb_HKeepOrder( h ) ;;
                                                       RETURN .T. ; }:eval( <x> )

    #endif





// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
#DEFINE DARK_GET_BG RGB( 80, 80, 80 )
#DEFINE DARK_GET_FG RGB( 255, 255, 255 )

// Hauptprogramm

static oDlg
FUNCTION Main()
  
   LOCAL  oGrid
   LOCAL oBtnOk, oBtnCancel
   LOCAL oSayTitle, oSayName, oGetName, oSayEmail, oGetEmail
   LOCAL cName := "", cEmail := ""

   // Dialogfenster erstellen
   DEFINE DIALOG oDlg ;
      TITLE "FiveWin Bootstrap Test" ;
      SIZE 800, 600 ;
      TRUEPIXEL ;
      STYLE WS_THICKFRAME

   oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )

   // Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
   oGrid := FWGrid():New( 12, 10 )

   // Titel SAY (responsiv)
   oSayTitle := TSay():New( 10, 10, { || "Bootstrap grid like system" }, oDlg )
   oSayTitle:SetColor( DARK_TEXT, DARK_BACKGROUND )
   oSayTitle:SetFont( TFont():New( "Arial", 0, 24 ) )  // Große Schriftgröße für den Titel
   oGrid:AddControl( oSayTitle, 1, 1, 12 )  // Titel über die gesamte Breite
 

	
	// SAY und GET für Name
	oSayName := TSay():New( 50, 10, { || "Name:" }, oDlg )
	oSayName:SetColor( DARK_TEXT, DARK_BACKGROUND )
	oSayName:SetFont( TFont():New( "Arial", 0, 18 ) )
	oGrid:AddControl( oSayName, 2, 1, 2 )
	
	// Name-Get rein über TGet():New()
	oGetName := TGet():New( 50, 100, { || cName }, oDlg )
	oGetName:SetSize( 200, 32 )
	oGetName:SetColor( DARK_GET_FG, DARK_GET_BG )
	oGrid:AddControl( oGetName, 2, 3, 6 )
	
	// SAY und GET für E-Mail
	oSayEmail := TSay():New( 90, 10, { || "E-Mail:" }, oDlg )
	oSayEmail:SetColor( DARK_TEXT, DARK_BACKGROUND )
	oSayEmail:SetFont( TFont():New( "Arial", 0, 18 ) )
	oGrid:AddControl( oSayEmail, 3, 1, 2 )
	
	// E-Mail-Get (Korrektur: { || cEmail } statt { || cName }, andere Zeile)
	oGetEmail := TGet():New( 90, 100, { || cEmail }, oDlg )
	oGetEmail:SetSize( 200, 32 )
	oGetEmail:SetColor( DARK_GET_FG, DARK_GET_BG )
	oGrid:AddControl( oGetEmail, 3, 3, 6 )

 
   
   
   
   

   // Buttons hinzufügen
   oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 4, 1, 3 )
   oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
   oGrid:AddControl( oBtnOk:oButton, 4, 1, 3 )

   oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 4, 4, 3 )
   oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
   oGrid:AddControl( oBtnCancel:oButton, 4, 4, 3 )

   // Grid-System dem Dialog zuweisen
   oDlg:bResized := ( { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) } )

   // Dialogfenster anzeigen
   ACTIVATE DIALOG oDlg ;
      CENTERED

   RETURN NIL

// Grid-System
CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter

   METHOD New( nColumns, nGutter )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
ENDCLASS

METHOD New( nColumns, nGutter ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self


METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl
   LOCAL nPrevY := ::nGutter  // Startposition für die erste Zeile
   LOCAL nBreakpoint := 600   // Schwellenwert für das Stapeln der Controls
   LOCAL hRows := Hash()      // Initialisiere hRows als Hash
   LOCAL nRowKey, aRowControls
	LOCAL aKeys  
        

   // Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Controls vertikal
   IF nWidth < nBreakpoint
      // Hilfsarray: wir gruppieren Controls nach Row

      // Schritt 1: alle Controls entsprechend ihrer nRow einsortieren
      FOR EACH aControl IN ::aControls
         IF !HB_HHasKey( hRows, aControl[2] )
            hRows[ aControl[2] ] := {}  // Initialisiere eine leere Array-Liste für jede Zeile
         ENDIF
         AAdd( hRows[ aControl[2] ], aControl )
      NEXT

      // Schritt 2: pro Row einen "Block" untereinander anzeigen
       
			aKeys := HB_HKeys( hRows )
			ASort( aKeys )            // sortierte Reihenfolge
			FOR EACH nRowKey IN aKeys // jetzt garantiert Row 1,2,3,...

     
          aRowControls := hRows[ nRowKey ]

          // Sortiere die Controls innerhalb jeder Zeile nach ihrer Spaltenposition (nCol)
          ASort( aRowControls,,, { |a, b| a[3] < b[3] } )
          FOR EACH aControl IN aRowControls
          NEXT

          FOR EACH aControl IN aRowControls
             nControlWidth := nWidth - 2 * ::nGutter  // Volle Breite minus Gutter
             nControlHeight := 32  // Standardhöhe
             nX := ::nGutter  // Linksbündig

             // Titel: Schriftgröße drastisch verkleinern
             IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
                aControl[1]:SetFont( TFont():New( "Arial", 0, 16 ) )  // Kleinere Schriftgröße
                aControl[1]:SetPos( nPrevY, nX )
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile
             ENDIF

             // SAY: Schriftgröße drastisch verkleinern
             IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
                aControl[1]:SetFont( TFont():New( "Arial", 0, 12 ) )  // Kleinere Schriftgröße
                aControl[1]:SetPos( nPrevY, nX )
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für GET
             ENDIF

             // GET: In der darunterliegenden Zeile
             IF aControl[1]:ClassName() == "TGET"
              //  aControl[1]:SetPos( nPrevY, nX )
                
              
              
              aControl[1]:nTop  := nPrevY
              aControl[1]:nLeft  := nX
     
              
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für das nächste SAY
             ENDIF

             // Buttons: Untereinander, Cancel linksbündig
             IF aControl[1]:ClassName() == "TBUTTON"
                aControl[1]:SetPos( nPrevY, nX )
                
                aControl[1]:SetSize( nControlWidth, nControlHeight )
                nPrevY += nControlHeight + ::nGutter  // Nächste Zeile für den nächsten Button
             ENDIF

             // Erzwinge eine Aktualisierung des Controls
             aControl[1]:Refresh()
          NEXT
      NEXT
   ELSE
      // Normales Grid-Layout (SAY und GET nebeneinander, Buttons nebeneinander)
      FOR EACH aControl IN ::aControls
         IF aControl[1] != NIL
            nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
            nControlHeight := 32  // Standardhöhe
            nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
            nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

            // Titel: Schriftgröße zurücksetzen
            IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
               aControl[1]:SetFont( TFont():New( "Arial", 0, 26 ) )  // Große Schriftgröße
            ENDIF

            // SAY: Schriftgröße zurücksetzen
            IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
               aControl[1]:SetFont( TFont():New( "Arial", 0, 18 ) )  // Normale Schriftgröße
            ENDIF
            
             IF aControl[1]:ClassName() == "TGET"
              	aControl[1]:nTop  := nY
              aControl[1]:nLeft  := nX
             ELSE
             	aControl[1]:SetPos( nY, nX )
             ENDIF
            
            
            aControl[1]:SetSize( nControlWidth, nControlHeight )
            aControl[1]:Refresh()
         ENDIF
      NEXT
   ENDIF
   RETURN Self


   
// Vordefinierte Klassen
CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by csincuir]]> 2025-01-16T07:34:02-07:00 2025-01-16T07:34:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276930#p276930 I don't know if you have thought about changing the color theme, I don't really like the dark theme, so I made this change to your development to change the theme, suddenly you adapt it to your work:

Code: Select all | Expand

#include "FiveWin.ch"

#DEFINE DARK_THEME  {;
   "background" => RGB( 40, 40, 40 ),;
   "text"       => RGB( 255, 255, 255 ),;
   "button_bg"  => RGB( 60, 60, 60 ),;
   "button_fg"  => RGB( 255, 255, 255 );
}

#DEFINE LIGHT_THEME {;
   "background" => RGB( 255, 255, 255 ),;
   "text"       => RGB( 0, 0, 0 ),;
   "button_bg"  => RGB( 240, 240, 240 ),;
   "button_fg"  => RGB( 0, 0, 0 );
}

FUNCTION Main()
   LOCAL oDlg, oGrid
   LOCAL oBtnOk, oBtnCancel, oBtnToggleTheme

   DEFINE DIALOG oDlg ;
      TITLE "FiveWin Bootstrap Test" ;
      SIZE 800, 600 ;
      TRUEPIXEL ;
      STYLE WS_THICKFRAME

   oGrid := FWGrid():New( 12, 10, oDlg )

   oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
   oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

   oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
   oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

   oBtnToggleTheme := FWButton():New( "Toggle Theme", { || oGrid:ToggleTheme() }, oDlg, 2, 1, 3 )
   oGrid:AddControl( oBtnToggleTheme:oButton, 2, 1, 3 )

   oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

   // Aplicar el tema oscuro por defecto
   oGrid:SetTheme( LIGHT_THEME )
   oGrid:ToggleTheme()

   ACTIVATE DIALOG oDlg ;
      CENTERED

RETURN NIL

CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter
   DATA oDlg

   METHOD New( nColumns, nGutter, oDlg )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
   METHOD SetTheme( aTheme )
   METHOD ToggleTheme()
ENDCLASS

METHOD New( nColumns, nGutter, oDlg ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   ::oDlg := oDlg
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
         nControlHeight := 32
         nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
         nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

         aControl[1]:SetPos( nY, nX )
         aControl[1]:SetSize( nControlWidth, nControlHeight )
      ENDIF
   NEXT
   RETURN Self

METHOD SetTheme( aTheme ) CLASS FWGrid
   LOCAL aControl

   // Cambiar el color de fondo de la ventana
   ::oDlg:SetColor( aTheme["text"], aTheme["background"] )

   // Aplicar el tema a todos los controles
   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         IF aControl[1]:ClassName() == "TBUTTON"  // Si es un botón
            aControl[1]:SetColor( aTheme["button_fg"], aTheme["button_bg"] )
         ENDIF
         // Aquí puedes agregar más condiciones para otros tipos de controles
      ENDIF
   NEXT
   
   ::oDlg:Refresh()
   
   RETURN Self

METHOD ToggleTheme() CLASS FWGrid
   STATIC lDarkTheme := .T.

   IF lDarkTheme
      ::SetTheme( LIGHT_THEME )
   ELSE
      ::SetTheme( DARK_THEME )
   ENDIF

   lDarkTheme := !lDarkTheme

   RETURN Self

CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
   METHOD SetTheme( aTheme )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

METHOD SetTheme( aTheme ) CLASS FWButton
   ::SetColor( aTheme["button_fg"], aTheme["button_bg"] )
   RETURN Self
Best regards.

Carlos]]>
I don't know if you have thought about changing the color theme, I don't really like the dark theme, so I made this change to your development to change the theme, suddenly you adapt it to your work:

Code: Select all | Expand

#include "FiveWin.ch"

#DEFINE DARK_THEME  {;
   "background" => RGB( 40, 40, 40 ),;
   "text"       => RGB( 255, 255, 255 ),;
   "button_bg"  => RGB( 60, 60, 60 ),;
   "button_fg"  => RGB( 255, 255, 255 );
}

#DEFINE LIGHT_THEME {;
   "background" => RGB( 255, 255, 255 ),;
   "text"       => RGB( 0, 0, 0 ),;
   "button_bg"  => RGB( 240, 240, 240 ),;
   "button_fg"  => RGB( 0, 0, 0 );
}

FUNCTION Main()
   LOCAL oDlg, oGrid
   LOCAL oBtnOk, oBtnCancel, oBtnToggleTheme

   DEFINE DIALOG oDlg ;
      TITLE "FiveWin Bootstrap Test" ;
      SIZE 800, 600 ;
      TRUEPIXEL ;
      STYLE WS_THICKFRAME

   oGrid := FWGrid():New( 12, 10, oDlg )

   oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
   oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )

   oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
   oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )

   oBtnToggleTheme := FWButton():New( "Toggle Theme", { || oGrid:ToggleTheme() }, oDlg, 2, 1, 3 )
   oGrid:AddControl( oBtnToggleTheme:oButton, 2, 1, 3 )

   oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }

   // Aplicar el tema oscuro por defecto
   oGrid:SetTheme( LIGHT_THEME )
   oGrid:ToggleTheme()

   ACTIVATE DIALOG oDlg ;
      CENTERED

RETURN NIL

CLASS FWGrid
   DATA aControls
   DATA nColumns
   DATA nGutter
   DATA oDlg

   METHOD New( nColumns, nGutter, oDlg )
   METHOD AddControl( oControl, nRow, nCol, nColSpan )
   METHOD Resize( nWidth, nHeight )
   METHOD SetTheme( aTheme )
   METHOD ToggleTheme()
ENDCLASS

METHOD New( nColumns, nGutter, oDlg ) CLASS FWGrid
   ::aControls := {}
   ::nColumns := nColumns
   ::nGutter := nGutter
   ::oDlg := oDlg
   RETURN Self

METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
   AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
   RETURN Self

METHOD Resize( nWidth, nHeight ) CLASS FWGrid
   LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
   LOCAL nControlWidth, nControlHeight, nX, nY
   LOCAL aControl

   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
         nControlHeight := 32
         nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
         nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)

         aControl[1]:SetPos( nY, nX )
         aControl[1]:SetSize( nControlWidth, nControlHeight )
      ENDIF
   NEXT
   RETURN Self

METHOD SetTheme( aTheme ) CLASS FWGrid
   LOCAL aControl

   // Cambiar el color de fondo de la ventana
   ::oDlg:SetColor( aTheme["text"], aTheme["background"] )

   // Aplicar el tema a todos los controles
   FOR EACH aControl IN ::aControls
      IF aControl[1] != NIL
         IF aControl[1]:ClassName() == "TBUTTON"  // Si es un botón
            aControl[1]:SetColor( aTheme["button_fg"], aTheme["button_bg"] )
         ENDIF
         // Aquí puedes agregar más condiciones para otros tipos de controles
      ENDIF
   NEXT
   
   ::oDlg:Refresh()
   
   RETURN Self

METHOD ToggleTheme() CLASS FWGrid
   STATIC lDarkTheme := .T.

   IF lDarkTheme
      ::SetTheme( LIGHT_THEME )
   ELSE
      ::SetTheme( DARK_THEME )
   ENDIF

   lDarkTheme := !lDarkTheme

   RETURN Self

CLASS FWButton
   DATA oButton

   METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
   METHOD SetColor( nTextColor, nBgColor )
   METHOD SetTheme( aTheme )
ENDCLASS

METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
   ::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
   RETURN Self

METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
   ::oButton:SetColor( nTextColor, nBgColor )
   RETURN Self

METHOD SetTheme( aTheme ) CLASS FWButton
   ::SetColor( aTheme["button_fg"], aTheme["button_bg"] )
   RETURN Self
Best regards.

Carlos]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by Antonio Linares]]> 2025-01-16T09:33:57-07:00 2025-01-16T09:33:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276932#p276932
If you use FWH Class TWebView2 then you can use standard Bootstrap and HTML from a FWH app :)]]>

If you use FWH Class TWebView2 then you can use standard Bootstrap and HTML from a FWH app :)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by Otto]]> 2025-01-16T09:59:38-07:00 2025-01-16T09:59:38-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276935#p276935 thank you.
I will try it out right away. I will also test a few more controls.
It is currently just a concept test.
Best regards,
Otto]]>
thank you.
I will try it out right away. I will also test a few more controls.
It is currently just a concept test.
Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Bootstrap for FiveWin :: Reply by Otto]]> 2025-01-16T10:04:19-07:00 2025-01-16T10:04:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45311&p=276936#p276936 Thank you. We have already switched some screens to WebView2. However, I'm still not sure if WebView2 is worth the effort or if it might be better to go straight for mod_harbour or a microservice with FiveWin.
At the moment, I’m leaning more towards that.

Best regards,
Otto]]>
Thank you. We have already switched some screens to WebView2. However, I'm still not sure if WebView2 is worth the effort or if it might be better to go straight for mod_harbour or a microservice with FiveWin.
At the moment, I’m leaning more towards that.

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Agent AI to document code :: Author Antonio Linares]]> 2025-01-16T10:48:50-07:00 2025-01-16T10:48:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276940#p276940

Code: Select all | Expand

#include "FiveWin.ch"

REQUEST DBFCDX

function Main()

   local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
   local oChat  := TDeepSeek():New(), aFile
   local cPrompt := "document this code, explaining what this Class is about," + ;
                    " listing all the DATAs and METHODs," + ;
                    " and providing a brief description of each of them. Code:"

   DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
   USE classes

   for each aFile in aFiles
      MsgRun( "documenting " + aFile[ 1 ],;
              "please wait...", { || oChat:Send( cPrompt + ;
              hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) 

      DbAppend()
      classes->name := aFile[ 1 ]
      classes->docs := oChat:GetValue()
   next
   
   GO TOP
   XBrowse()

return nil
]]>

Code: Select all | Expand

#include "FiveWin.ch"

REQUEST DBFCDX

function Main()

   local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
   local oChat  := TDeepSeek():New(), aFile
   local cPrompt := "document this code, explaining what this Class is about," + ;
                    " listing all the DATAs and METHODs," + ;
                    " and providing a brief description of each of them. Code:"

   DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
   USE classes

   for each aFile in aFiles
      MsgRun( "documenting " + aFile[ 1 ],;
              "please wait...", { || oChat:Send( cPrompt + ;
              hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) 

      DbAppend()
      classes->name := aFile[ 1 ]
      classes->docs := oChat:GetValue()
   next
   
   GO TOP
   XBrowse()

return nil
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Agent AI to document code :: Reply by Otto]]> 2025-01-16T12:35:27-07:00 2025-01-16T12:35:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276945#p276945 and the challenge afterward is to manage this information.

I have been working on a comprehensive DMS for a long time. That’s why I often contribute opinions suggesting that the filesystem serves as a database and some form of DBFs as content directories.
I cannot imagine that the data volumes generated by AI will work in the future by being imported into SQL and analyzed through SQL queries.

Best regards,
Otto]]>
and the challenge afterward is to manage this information.

I have been working on a comprehensive DMS for a long time. That’s why I often contribute opinions suggesting that the filesystem serves as a database and some form of DBFs as content directories.
I cannot imagine that the data volumes generated by AI will work in the future by being imported into SQL and analyzed through SQL queries.

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Agent AI to document code :: Reply by Lailton]]> 2025-01-16T20:03:40-07:00 2025-01-16T20:03:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276958#p276958
:shock:
Antonio Linares wrote: Thu Jan 16, 2025 5:48 pm agentdoc.prg

Code: Select all | Expand

#include "FiveWin.ch"

REQUEST DBFCDX

function Main()

   local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
   local oChat  := TDeepSeek():New(), aFile
   local cPrompt := "document this code, explaining what this Class is about," + ;
                    " listing all the DATAs and METHODs," + ;
                    " and providing a brief description of each of them. Code:"

   DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
   USE classes

   for each aFile in aFiles
      MsgRun( "documenting " + aFile[ 1 ],;
              "please wait...", { || oChat:Send( cPrompt + ;
              hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) 

      DbAppend()
      classes->name := aFile[ 1 ]
      classes->docs := oChat:GetValue()
   next
   
   GO TOP
   XBrowse()

return nil
]]>

:shock:
Antonio Linares wrote: Thu Jan 16, 2025 5:48 pm agentdoc.prg

Code: Select all | Expand

#include "FiveWin.ch"

REQUEST DBFCDX

function Main()

   local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
   local oChat  := TDeepSeek():New(), aFile
   local cPrompt := "document this code, explaining what this Class is about," + ;
                    " listing all the DATAs and METHODs," + ;
                    " and providing a brief description of each of them. Code:"

   DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
   USE classes

   for each aFile in aFiles
      MsgRun( "documenting " + aFile[ 1 ],;
              "please wait...", { || oChat:Send( cPrompt + ;
              hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) 

      DbAppend()
      classes->name := aFile[ 1 ]
      classes->docs := oChat:GetValue()
   next
   
   GO TOP
   XBrowse()

return nil
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Agent AI to document code :: Reply by Antonio Linares]]> 2025-01-17T01:24:40-07:00 2025-01-17T01:24:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276961#p276961

Image]]>


Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Agent AI to document code :: Reply by Antonio Linares]]> 2025-01-17T16:15:21-07:00 2025-01-17T16:15:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276993#p276993 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: Agent AI to document code :: Reply by Antonio Linares]]> 2025-01-17T16:16:50-07:00 2025-01-17T16:16:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45313&p=276994#p276994 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by leandro]]> 2025-01-17T18:17:55-07:00 2025-01-17T18:17:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277001#p277001
Antonio Linares wrote: Mon Jun 03, 2024 11:20 am Use this Harbour 64: https://github.com/FiveTechSoft/harbour ... 240530.zip

go64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 test64.hbp -comp=msvc64
@endlocal
test.exe
test64.hbp

Code: Select all | Expand

-gui

-Ic:\fwh64\include

test.prg

-Lc:\fwh64\lib

-lFiveH64
-lFiveHC64

-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt 
-luxtheme

-ldflag=/NODEFAULTLIB:libucrt 
-ldflag=/NODEFAULTLIB:msvcrt

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

test.rc
 
test.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oBmpTiled, oWnd, oMsgBar

   DEFINE BITMAP oBmpTiled RESOURCE "background"

   DEFINE WINDOW oWnd MENU BuildMenu() TITLE "My app"

   BuildBar( oWnd )

   DEFINE MSGBAR oMsgBar OF oWnd PROMPT "My app" NOINSET

   ACTIVATE WINDOW oWnd MAXIMIZED ;
      ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )

   oBmpTiled:End()

return nil

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Files"
   ENDMENU

return oMenu  

function BuildBar( oWnd )

   local oBar

   DEFINE BUTTONBAR oBar OF oWnd 3D SIZE 70, 70

return nil
test.rc

Code: Select all | Expand

background BITMAP c:\fwh64\bitmaps\backgrnd\iosbg.bmp
Hola buenas noches, estamos intentando generar un ejecutable basico con visual studio, con las opciones que mencionó Antonio en el post anterior, pero al intentar generar el test.exe, salen los siguientes errores:

Code: Select all | Expand

C:\cmplar_mv_64>go64

C:\cmplar_mv_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Harbour 3.2.0dev (r2407221137)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling '.\PRG\test.prg'...
Lines 5054, Functions/Procedures 3
Generating C source output to 'C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c'... Done.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2061: error de sintaxis: identificador '__attribute__'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4218: se ha utilizado una extensión no estándar: se debe especificar al menos una clase de almacenamiento o un tipo
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ','
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): error C2054: se esperaba '(' a continuación de '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2082: nueva definición del parámetro formal '__cpuid'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(66): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2082: nueva definición del parámetro formal '__cpuidex'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(69): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2082: nueva definición del parámetro formal '__emul'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(73): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2082: nueva definición del parámetro formal '__emulu'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(76): error C2082: nueva definición del parámetro formal '__getcallerseflags'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(77): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2082: nueva definición del parámetro formal '__halt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(79): error C2082: nueva definición del parámetro formal '__inbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(80): error C2082: nueva definición del parámetro formal '__inbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(81): error C2085: '__incfsbyte': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(82): error C2085: '__incfsdword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(83): error C2085: '__incfsword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(84): error C2082: nueva definición del parámetro formal '__indword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(85): error C2082: nueva definición del parámetro formal '__indwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(86): error C2082: nueva definición del parámetro formal '__invlpg'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(87): error C2082: nueva definición del parámetro formal '__inword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(88): error C2082: nueva definición del parámetro formal '__inwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(89): error C2082: nueva definición del parámetro formal '__lidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(90): error C2082: nueva definición del parámetro formal '__ll_lshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(91): error C2082: nueva definición del parámetro formal '__ll_rshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(92): error C2082: nueva definición del parámetro formal '__lzcnt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(93): error C2082: nueva definición del parámetro formal '__lzcnt16'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(94): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2082: nueva definición del parámetro formal '__movsb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(96): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2082: nueva definición del parámetro formal '__movsd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(98): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2082: nueva definición del parámetro formal '__movsw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(100): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2082: nueva definición del parámetro formal '__nop'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(102): error C2082: nueva definición del parámetro formal '__nvreg_restore_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(103): error C2082: nueva definición del parámetro formal '__nvreg_save_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(104): error C2082: nueva definición del parámetro formal '__outbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(105): error C2082: nueva definición del parámetro formal '__outbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(106): error C2082: nueva definición del parámetro formal '__outdword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(107): error C2082: nueva definición del parámetro formal '__outdwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(108): error C2082: nueva definición del parámetro formal '__outword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(109): error C2082: nueva definición del parámetro formal '__outwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(110): error C2082: nueva definición del parámetro formal '__readcr0'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(111): error C2082: nueva definición del parámetro formal '__readcr2'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(112): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2082: nueva definición del parámetro formal '__readcr3'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(114): error C2082: nueva definición del parámetro formal '__readcr4'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(115): error C2082: nueva definición del parámetro formal '__readcr8'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(116): error C2082: nueva definición del parámetro formal '__readdr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(125): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2082: nueva definición del parámetro formal '__readmsr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(127): error C2082: nueva definición del parámetro formal '__readpmc'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(128): error C2082: nueva definición del parámetro formal '__segmentlimit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(129): error C2082: nueva definición del parámetro formal '__sidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(131): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2082: nueva definición del parámetro formal '__stosb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(134): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2082: nueva definición del parámetro formal '__stosd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(136): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2082: nueva definición del parámetro formal '__stosw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(138): error C2082: nueva definición del parámetro formal '__svm_clgi'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(139): error C2082: nueva definición del parámetro formal '__svm_invlpga'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): error C2082: nueva definición del parámetro formal '__svm_skinit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): fatal error C1003: el recuento de errores supera 100; se detiene la compilación
hbmk2[test64]: Error: Running C/C++ compiler. 2
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk  -W4 -wd4127 -FoC:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\ -Ic:\har_msvc22_64\include -Ic:\fwh64_2409\include -Ic:\har_msvc22_64\contrib\xhb -Ic:\har_msvc22_64\contrib\hbct -Ic:\har_msvc22_64\contrib\hbtip -Ic:\har_msvc22_64\contrib\hbfship -Ic:\har_msvc22_64\contrib\hbxpp -Ic:\har_msvc22_64\contrib\hbwin -Ic:\har_msvc22_64\contrib\hbmzip -Ic:\har_msvc22_64\contrib\hbfoxpro C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c
"test.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\cmplar_mv_64>

Lo raro es que estamos intentando compilar con msvc y hace un llamado a borland, pero no hemos configurado nada en el bat, ni en el archivo hbp, que apunte al borland, alguien sabe a qué se debe?

Gracias de antemano]]>
Antonio Linares wrote: Mon Jun 03, 2024 11:20 am Use this Harbour 64: https://github.com/FiveTechSoft/harbour ... 240530.zip

go64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 test64.hbp -comp=msvc64
@endlocal
test.exe
test64.hbp

Code: Select all | Expand

-gui

-Ic:\fwh64\include

test.prg

-Lc:\fwh64\lib

-lFiveH64
-lFiveHC64

-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt 
-luxtheme

-ldflag=/NODEFAULTLIB:libucrt 
-ldflag=/NODEFAULTLIB:msvcrt

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

test.rc
 
test.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oBmpTiled, oWnd, oMsgBar

   DEFINE BITMAP oBmpTiled RESOURCE "background"

   DEFINE WINDOW oWnd MENU BuildMenu() TITLE "My app"

   BuildBar( oWnd )

   DEFINE MSGBAR oMsgBar OF oWnd PROMPT "My app" NOINSET

   ACTIVATE WINDOW oWnd MAXIMIZED ;
      ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )

   oBmpTiled:End()

return nil

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Files"
   ENDMENU

return oMenu  

function BuildBar( oWnd )

   local oBar

   DEFINE BUTTONBAR oBar OF oWnd 3D SIZE 70, 70

return nil
test.rc

Code: Select all | Expand

background BITMAP c:\fwh64\bitmaps\backgrnd\iosbg.bmp
Hola buenas noches, estamos intentando generar un ejecutable basico con visual studio, con las opciones que mencionó Antonio en el post anterior, pero al intentar generar el test.exe, salen los siguientes errores:

Code: Select all | Expand

C:\cmplar_mv_64>go64

C:\cmplar_mv_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Harbour 3.2.0dev (r2407221137)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling '.\PRG\test.prg'...
Lines 5054, Functions/Procedures 3
Generating C source output to 'C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c'... Done.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2061: error de sintaxis: identificador '__attribute__'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4218: se ha utilizado una extensión no estándar: se debe especificar al menos una clase de almacenamiento o un tipo
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ','
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): error C2054: se esperaba '(' a continuación de '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2082: nueva definición del parámetro formal '__cpuid'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(66): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2082: nueva definición del parámetro formal '__cpuidex'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(69): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2082: nueva definición del parámetro formal '__emul'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(73): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2082: nueva definición del parámetro formal '__emulu'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(76): error C2082: nueva definición del parámetro formal '__getcallerseflags'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(77): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2082: nueva definición del parámetro formal '__halt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(79): error C2082: nueva definición del parámetro formal '__inbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(80): error C2082: nueva definición del parámetro formal '__inbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(81): error C2085: '__incfsbyte': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(82): error C2085: '__incfsdword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(83): error C2085: '__incfsword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(84): error C2082: nueva definición del parámetro formal '__indword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(85): error C2082: nueva definición del parámetro formal '__indwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(86): error C2082: nueva definición del parámetro formal '__invlpg'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(87): error C2082: nueva definición del parámetro formal '__inword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(88): error C2082: nueva definición del parámetro formal '__inwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(89): error C2082: nueva definición del parámetro formal '__lidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(90): error C2082: nueva definición del parámetro formal '__ll_lshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(91): error C2082: nueva definición del parámetro formal '__ll_rshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(92): error C2082: nueva definición del parámetro formal '__lzcnt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(93): error C2082: nueva definición del parámetro formal '__lzcnt16'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(94): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2082: nueva definición del parámetro formal '__movsb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(96): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2082: nueva definición del parámetro formal '__movsd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(98): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2082: nueva definición del parámetro formal '__movsw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(100): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2082: nueva definición del parámetro formal '__nop'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(102): error C2082: nueva definición del parámetro formal '__nvreg_restore_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(103): error C2082: nueva definición del parámetro formal '__nvreg_save_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(104): error C2082: nueva definición del parámetro formal '__outbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(105): error C2082: nueva definición del parámetro formal '__outbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(106): error C2082: nueva definición del parámetro formal '__outdword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(107): error C2082: nueva definición del parámetro formal '__outdwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(108): error C2082: nueva definición del parámetro formal '__outword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(109): error C2082: nueva definición del parámetro formal '__outwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(110): error C2082: nueva definición del parámetro formal '__readcr0'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(111): error C2082: nueva definición del parámetro formal '__readcr2'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(112): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2082: nueva definición del parámetro formal '__readcr3'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(114): error C2082: nueva definición del parámetro formal '__readcr4'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(115): error C2082: nueva definición del parámetro formal '__readcr8'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(116): error C2082: nueva definición del parámetro formal '__readdr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(125): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2082: nueva definición del parámetro formal '__readmsr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(127): error C2082: nueva definición del parámetro formal '__readpmc'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(128): error C2082: nueva definición del parámetro formal '__segmentlimit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(129): error C2082: nueva definición del parámetro formal '__sidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(131): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2082: nueva definición del parámetro formal '__stosb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(134): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2082: nueva definición del parámetro formal '__stosd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(136): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2082: nueva definición del parámetro formal '__stosw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(138): error C2082: nueva definición del parámetro formal '__svm_clgi'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(139): error C2082: nueva definición del parámetro formal '__svm_invlpga'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): error C2082: nueva definición del parámetro formal '__svm_skinit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): fatal error C1003: el recuento de errores supera 100; se detiene la compilación
hbmk2[test64]: Error: Running C/C++ compiler. 2
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk  -W4 -wd4127 -FoC:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\ -Ic:\har_msvc22_64\include -Ic:\fwh64_2409\include -Ic:\har_msvc22_64\contrib\xhb -Ic:\har_msvc22_64\contrib\hbct -Ic:\har_msvc22_64\contrib\hbtip -Ic:\har_msvc22_64\contrib\hbfship -Ic:\har_msvc22_64\contrib\hbxpp -Ic:\har_msvc22_64\contrib\hbwin -Ic:\har_msvc22_64\contrib\hbmzip -Ic:\har_msvc22_64\contrib\hbfoxpro C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c
"test.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\cmplar_mv_64>

Lo raro es que estamos intentando compilar con msvc y hace un llamado a borland, pero no hemos configurado nada en el bat, ni en el archivo hbp, que apunte al borland, alguien sabe a qué se debe?

Gracias de antemano]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by Antonio Linares]]> 2025-01-18T03:12:59-07:00 2025-01-18T03:12:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277004#p277004
Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...

El fallo se origina en esta llamada:
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk ...

Por alguna razón le esta dando el path de los includes de Borland]]>

Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...

El fallo se origina en esta llamada:
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk ...

Por alguna razón le esta dando el path de los includes de Borland]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by leandro]]> 2025-01-18T03:37:21-07:00 2025-01-18T03:37:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277006#p277006
El hbmk2 viene incluido dentro de una versión de harbour, que descargamos desde este link

https://github.com/FiveTechSoft/harbour ... 240814.zip

Podrías confirmar porfa si ese está bien, gracias de antemano.
Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...
Eso ya lo había intentando varias veces, hasta cambie el nombre del prg y del rc, pensando en que era eso.]]>

El hbmk2 viene incluido dentro de una versión de harbour, que descargamos desde este link

https://github.com/FiveTechSoft/harbour ... 240814.zip

Podrías confirmar porfa si ese está bien, gracias de antemano.
Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...
Eso ya lo había intentando varias veces, hasta cambie el nombre del prg y del rc, pensando en que era eso.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by Antonio Linares]]> 2025-01-18T10:12:25-07:00 2025-01-18T10:12:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277010#p277010
Pienso que se puede deber a la estructura de carpetas como tengas instalado Harbour:

Lo tienes asi ?

c:\harbour\bin\win\msvc64\hbmk2.exe]]>

Pienso que se puede deber a la estructura de carpetas como tengas instalado Harbour:

Lo tienes asi ?

c:\harbour\bin\win\msvc64\hbmk2.exe]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by leandro]]> 2025-01-18T13:24:04-07:00 2025-01-18T13:24:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277013#p277013
Volvimos a descargar el harbour y logramos superar el inconveniente.

Ya compilamos la app, se genera el ejecutable y está trabajando parcialmente, hay varias cosas que no andan como debe ser, antes funcionaba con borland y xharbour, pero... voy a crear un post nuevo para informar sobre la situación.]]>

Volvimos a descargar el harbour y logramos superar el inconveniente.

Ya compilamos la app, se genera el ejecutable y está trabajando parcialmente, hay varias cosas que no andan como debe ser, antes funcionaba con borland y xharbour, pero... voy a crear un post nuevo para informar sobre la situación.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Build your FWH app using hbmk2.exe and MSVC 32&64 :: Reply by Antonio Linares]]> 2025-01-19T12:17:57-07:00 2025-01-19T12:17:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41671&p=277037#p277037 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Open Excel with Add-in :: Author Marc Vanzegbroeck]]> 2025-01-17T07:09:51-07:00 2025-01-17T07:09:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45317&p=276964#p276964
I don't have problems with opening, editing or saving excel-files.

Now I wanted to open an excel that is installed on a PC with an Add-in that update the file.
I want to make a program that log all the changes.

Open and showing the excel is no problem, the only problem is that the Add-in is not loaded. Even the Add-in menu isn't showing.
Is there a special way to open an excel with all the Add-in's?

Thank you.]]>

I don't have problems with opening, editing or saving excel-files.

Now I wanted to open an excel that is installed on a PC with an Add-in that update the file.
I want to make a program that log all the changes.

Open and showing the excel is no problem, the only problem is that the Add-in is not loaded. Even the Add-in menu isn't showing.
Is there a special way to open an excel with all the Add-in's?

Thank you.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Open Excel with Add-in :: Reply by Natter]]> 2025-01-18T05:32:35-07:00 2025-01-18T05:32:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45317&p=277007#p277007 ribbon xml editor. You can use it to form the office ribbon yourself. I, however, did it only for Word]]> ribbon xml editor. You can use it to form the office ribbon yourself. I, however, did it only for Word]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: Open Excel with Add-in :: Reply by Marc Vanzegbroeck]]> 2025-01-20T00:47:07-07:00 2025-01-20T00:47:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45317&p=277052#p277052
oExcel:Workbooks:Open ('C:\Program Files (x86)\Honeywell\Experion PKS\Client\Xldataex\mede.xla')]]>

oExcel:Workbooks:Open ('C:\Program Files (x86)\Honeywell\Experion PKS\Client\Xldataex\mede.xla')]]>
<![CDATA[FiveWin for Harbour/xHarbour :: problem with Decript function :: Author Silvio.Falconi]]> 2025-01-19T09:05:30-07:00 2025-01-19T09:05:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45324&p=277031#p277031
Image

then I not understood how it save the password on field on archive

cPassw:=Encrypt(cPassw1)
oUtente:PassW :=cPassw
oUtente:save()

but when I have to convert it again to do the login check it tells me that the passwords do not match

cPasw:=Alltrim(Decrypt(oUtenti:PassW))

IF cPasw==cPass //cPass is the value insert by user
lRet:=lCont:=.T.]]>

Image

then I not understood how it save the password on field on archive

cPassw:=Encrypt(cPassw1)
oUtente:PassW :=cPassw
oUtente:save()

but when I have to convert it again to do the login check it tells me that the passwords do not match

cPasw:=Alltrim(Decrypt(oUtenti:PassW))

IF cPasw==cPass //cPass is the value insert by user
lRet:=lCont:=.T.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: problem with Decript function :: Reply by Antonio Linares]]> 2025-01-19T12:14:31-07:00 2025-01-19T12:14:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45324&p=277036#p277036
Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )]]>

Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: problem with Decript function :: Reply by Silvio.Falconi]]> 2025-01-20T01:20:48-07:00 2025-01-20T01:20:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45324&p=277053#p277053
Antonio Linares wrote: Sun Jan 19, 2025 7:14 pm Dear Silvio,

Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )

I allready tested

Image

aòlso with cPasw = Decrypt( AllTrim( oUtenti:PassW ) )]]>
Antonio Linares wrote: Sun Jan 19, 2025 7:14 pm Dear Silvio,

Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )

I allready tested

Image

aòlso with cPasw = Decrypt( AllTrim( oUtenti:PassW ) )]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: problem with Decript function :: Reply by Antonio Linares]]> 2025-01-20T02:12:14-07:00 2025-01-20T02:12:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45324&p=277057#p277057
The field may have more spaces that the encripted string thats why we need to alltrim before

To verify that those functions work fine, try this:

MsgInfo( Decrypt( Encrypt( "Hello" ) ) )]]>

The field may have more spaces that the encripted string thats why we need to alltrim before

To verify that those functions work fine, try this:

MsgInfo( Decrypt( Encrypt( "Hello" ) ) )]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Check language of Excel :: Author Marc Vanzegbroeck]]> 2025-01-20T01:40:39-07:00 2025-01-20T01:40:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45326&p=277055#p277055
How can I check the language of excel?
The problem is that when I add a function in the Dutch version, I have to use ";" between the parameters in a function, and "," in English version.
Until now I didn't had the problem because it was always generated in the Dutch version. When loading the excel-file on a PC with English version, it is automatically converted.

Now I want to generate the files also on English versions...]]>

How can I check the language of excel?
The problem is that when I add a function in the Dutch version, I have to use ";" between the parameters in a function, and "," in English version.
Until now I didn't had the problem because it was always generated in the Dutch version. When loading the excel-file on a PC with English version, it is automatically converted.

Now I want to generate the files also on English versions...]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Check language of Excel :: Reply by Antonio Linares]]> 2025-01-20T02:33:15-07:00 2025-01-20T02:33:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45326&p=277059#p277059
Copy and paste your question to chatgpt :)]]>

Copy and paste your question to chatgpt :)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Check language of Excel :: Reply by Marc Vanzegbroeck]]> 2025-01-20T02:47:38-07:00 2025-01-20T02:47:38-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45326&p=277060#p277060 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: search a image :: Author Silvio.Falconi]]> 2025-01-20T02:23:42-07:00 2025-01-20T02:23:42-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45327&p=277058#p277058
@ 152, 10 COMBOBOX aGet[1] VAR cAzienda ITEMS aAziende SIZE 370,90 PIXEL OF oDlg;
ON CHANGE ChangeComboBoxItem(aGet[1], oBmp01, oAziende)

Code: Select all | Expand


FUNCTION ChangeComboBoxItem(oComboBox, oBmp01, oAziende)
    LOCAL cSelectedItem := oComboBox:GetText() 
    LOCAL cDir01, cImagePath


    IF oAziende:Seek(cSelectedItem)
        cDir01 := oAziende:Dir01

        cImagePath := ".\"+cDir01 + "\immagini\logo.bmp"

        // Verifica se il file immagine esiste
        IF File(cImagePath)
            oBmp01:LoadBmp(cImagePath)
        ELSE
            MsgInfo("Immagine non trovata: " + cImagePath, "Errore")
        ENDIF
    ELSE
        MsgInfo("Elemento non trovato nel database: " + cSelectedItem, "Errore")
    ENDIF

    RETURN NIL

If found the dir01 as Dat2016 then not found the image (File(cImagePath)) but the image is on that folder DAT2016\immagini\logo.bmp

where is the error ?]]>

@ 152, 10 COMBOBOX aGet[1] VAR cAzienda ITEMS aAziende SIZE 370,90 PIXEL OF oDlg;
ON CHANGE ChangeComboBoxItem(aGet[1], oBmp01, oAziende)

Code: Select all | Expand


FUNCTION ChangeComboBoxItem(oComboBox, oBmp01, oAziende)
    LOCAL cSelectedItem := oComboBox:GetText() 
    LOCAL cDir01, cImagePath


    IF oAziende:Seek(cSelectedItem)
        cDir01 := oAziende:Dir01

        cImagePath := ".\"+cDir01 + "\immagini\logo.bmp"

        // Verifica se il file immagine esiste
        IF File(cImagePath)
            oBmp01:LoadBmp(cImagePath)
        ELSE
            MsgInfo("Immagine non trovata: " + cImagePath, "Errore")
        ENDIF
    ELSE
        MsgInfo("Elemento non trovato nel database: " + cSelectedItem, "Errore")
    ENDIF

    RETURN NIL

If found the dir01 as Dat2016 then not found the image (File(cImagePath)) but the image is on that folder DAT2016\immagini\logo.bmp

where is the error ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: search a image :: Reply by Antonio Linares]]> 2025-01-20T04:57:18-07:00 2025-01-20T04:57:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45327&p=277063#p277063 <![CDATA[FiveWin for Harbour/xHarbour :: Re: search a image :: Reply by Silvio.Falconi]]> 2025-01-20T05:26:21-07:00 2025-01-20T05:26:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45327&p=277065#p277065
Antonio Linares wrote: Mon Jan 20, 2025 11:57 am What is the final value for cImagePath ?
Image]]>
Antonio Linares wrote: Mon Jan 20, 2025 11:57 am What is the final value for cImagePath ?
Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: search a image :: Reply by Silvio.Falconi]]> 2025-01-20T05:27:51-07:00 2025-01-20T05:27:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45327&p=277066#p277066 it was login.bmp no logo.bmp
sorry I'm not feeling well these days]]>
it was login.bmp no logo.bmp
sorry I'm not feeling well these days]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: search a image :: Reply by Antonio Linares]]> 2025-01-20T05:49:12-07:00 2025-01-20T05:49:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45327&p=277070#p277070 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: talk to your database using natural language :: Author Antonio Linares]]> 2025-01-11T23:50:16-07:00 2025-01-11T23:50:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=276869#p276869
So we are going to implement the same funcionality using FWH and FWH AI Classes.

This is a true AI agent and it is a great example of what AI power can do for you :)

Stay tunned... :wink:]]>

So we are going to implement the same funcionality using FWH and FWH AI Classes.

This is a true AI agent and it is a great example of what AI power can do for you :)

Stay tunned... :wink:]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by Otto]]> 2025-01-12T01:20:00-07:00 2025-01-12T01:20:00-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=276871#p276871
we use a simple method since we don't have the expertise that you do. However, even with this, we achieve good results.
Yesterday, I looked at your example in the AI section. I then thought that if JSON or CSV databases are suggested for such examples, a modernized DBF could experience a revival here.

According to AI, the following improvements should be made:

Potential Improvements to the DBF Format
To make DBF more competitive in the context of AI, the following enhancements could be introduced:

Support for Larger Datasets:
Raising file size and field number limits to keep up with modern requirements.
Compression:
Integrated support for compression to save storage space.
Advanced Data Types:
Support for complex data types such as JSON, arrays, or BLOBs.
Timestamps and Logging:
Automatic logging of changes or accesses, similar to relational databases.
Encryption:
Support for native encryption to protect sensitive data.
DBF could have advantages over CSV and MySQL in the AI context, especially in scenarios like:

Smaller, local applications.
Simple data structures.
Systems with limited resources.

With some modern adaptations, DBF could be considered a lightweight and robust alternative, particularly for specialized AI applications. The format has potential if it is systematically modernized.


I have built a very convenient converter with PHP2DBF.

DBF2JSON Converter: Interactive DBF Query and JSON Transformation Tool


You simply enter the database path and name, the fields that should go into the JSON, and then let ChatGPT create the query function for you, e.g.:



For example, I could say: Only output bookings from August 25, 2024, and rename the field to "Reservation Date." Add the weekday to it.

You then enter the function created by ChatGPT into the designated text field and say "Convert JSON."

And you will receive the final JSON output.


Image


How does it continue?
I then ask ChatGPT further, for example:

Can you now create a nicely designed arrival list using Bootstrap and Awesomefont, with a table and a field for manual check-off? Please read the data from the JSON file anreisen.json. We have 34 rooms. There are 13 regular guests and those arriving, as listed in the JSON. Also, make me a chart for it.

The unoccupied rooms must be displayed in the chart. The chart should be a maximum of 300 pixels high.

I get the HTML code and already have the report ready. I will then post my previous development in terms of HTML reports.

Image




Best regards,

Otto]]>

we use a simple method since we don't have the expertise that you do. However, even with this, we achieve good results.
Yesterday, I looked at your example in the AI section. I then thought that if JSON or CSV databases are suggested for such examples, a modernized DBF could experience a revival here.

According to AI, the following improvements should be made:

Potential Improvements to the DBF Format
To make DBF more competitive in the context of AI, the following enhancements could be introduced:

Support for Larger Datasets:
Raising file size and field number limits to keep up with modern requirements.
Compression:
Integrated support for compression to save storage space.
Advanced Data Types:
Support for complex data types such as JSON, arrays, or BLOBs.
Timestamps and Logging:
Automatic logging of changes or accesses, similar to relational databases.
Encryption:
Support for native encryption to protect sensitive data.
DBF could have advantages over CSV and MySQL in the AI context, especially in scenarios like:

Smaller, local applications.
Simple data structures.
Systems with limited resources.

With some modern adaptations, DBF could be considered a lightweight and robust alternative, particularly for specialized AI applications. The format has potential if it is systematically modernized.


I have built a very convenient converter with PHP2DBF.

DBF2JSON Converter: Interactive DBF Query and JSON Transformation Tool


You simply enter the database path and name, the fields that should go into the JSON, and then let ChatGPT create the query function for you, e.g.:



For example, I could say: Only output bookings from August 25, 2024, and rename the field to "Reservation Date." Add the weekday to it.

You then enter the function created by ChatGPT into the designated text field and say "Convert JSON."

And you will receive the final JSON output.


Image


How does it continue?
I then ask ChatGPT further, for example:

Can you now create a nicely designed arrival list using Bootstrap and Awesomefont, with a table and a field for manual check-off? Please read the data from the JSON file anreisen.json. We have 34 rooms. There are 13 regular guests and those arriving, as listed in the JSON. Also, make me a chart for it.

The unoccupied rooms must be displayed in the chart. The chart should be a maximum of 300 pixels high.

I get the HTML code and already have the report ready. I will then post my previous development in terms of HTML reports.

Image




Best regards,

Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by Antonio Linares]]> 2025-01-12T02:22:55-07:00 2025-01-12T02:22:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=276872#p276872
Using the simple technique we can talk to any database using natural language! :D

agentdb.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   local dummy := FW_SetUnicode( .T. )
   local cDatabase := "foros_antiguos"
   local oCn   := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
   local aTables, cTable
   local hDatabase := { => }, cJson

   if oCn == nil
      MsgAlert( "Error connecting to database" )
      return nil 
   endif   

   aTables = oCn:ListBaseTables()

   for each cTable in aTables
      hDatabase[ cTable ] = oCn:ListColumns( cTable ) 
   next   

   oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
               " give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
               hb_jsonEncode( hDatabase ) )
   XBrowser( oCn:Execute( oChat:GetValue() ) )

   oChat:End()

return nil   
Image]]>

Using the simple technique we can talk to any database using natural language! :D

agentdb.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   local dummy := FW_SetUnicode( .T. )
   local cDatabase := "foros_antiguos"
   local oCn   := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
   local aTables, cTable
   local hDatabase := { => }, cJson

   if oCn == nil
      MsgAlert( "Error connecting to database" )
      return nil 
   endif   

   aTables = oCn:ListBaseTables()

   for each cTable in aTables
      hDatabase[ cTable ] = oCn:ListColumns( cTable ) 
   next   

   oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
               " give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
               hb_jsonEncode( hDatabase ) )
   XBrowser( oCn:Execute( oChat:GetValue() ) )

   oChat:End()

return nil   
Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by Otto]]> 2025-01-12T02:46:05-07:00 2025-01-12T02:46:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=276874#p276874 thank you. Can you show this for dbf?
Best regards,
Otto]]>
thank you. Can you show this for dbf?
Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by Antonio Linares]]> 2025-01-12T04:08:26-07:00 2025-01-12T04:08:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=276875#p276875
You have to provide all the DBFs structures info to an AI API and then provide the right prompt for it.

That simple :)]]>

You have to provide all the DBFs structures info to an AI API and then provide the right prompt for it.

That simple :)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by TomH]]> 2025-01-20T05:42:22-07:00 2025-01-20T05:42:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=277067#p277067
https://github.com/Canner/WrenAI]]>

https://github.com/Canner/WrenAI]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: talk to your database using natural language :: Reply by Antonio Linares]]> 2025-01-20T05:50:50-07:00 2025-01-20T05:50:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45299&p=277071#p277071 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: How to convert LIB from .NET dll file :: Author richard-service]]> 2025-01-18T23:26:39-07:00 2025-01-18T23:26:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45323&p=277022#p277022
I have a .NET dll file
How to convert to LIB file for Harbour/xHarbour?

Thanks a lot.]]>

I have a .NET dll file
How to convert to LIB file for Harbour/xHarbour?

Thanks a lot.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: How to convert LIB from .NET dll file :: Reply by Antonio Linares]]> 2025-01-19T12:12:22-07:00 2025-01-19T12:12:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45323&p=277035#p277035
Yes, it's possible to use a .NET DLL from a C application, although it requires specific steps since they are different environments. There are two main approaches:

COM Interop

First, you need to expose the .NET DLL as a COM component
Register the .NET assembly using regasm.exe
Then you can use the functionality from C through the COM interface

C++/CLI as a bridge

Create an intermediate DLL using C++/CLI that serves as a "wrapper"
This DLL can communicate with both native C code and .NET code
The C application calls the wrapper DLL, which in turn calls the .NET DLL

Here's a basic example using the C++/CLI approach:

Code: Select all | Expand

// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once

// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);

// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"

int CallDotNetFunction(int param) {
    // Call the class/method from the .NET DLL
    MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
    return instance->MyMethod(param);
}

Code: Select all | Expand

// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
    HMODULE hDll = LoadLibrary("Wrapper.dll");
    CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
    
    int result = func(42);
    
    FreeLibrary(hDll);
    return 0;
}
]]>

Yes, it's possible to use a .NET DLL from a C application, although it requires specific steps since they are different environments. There are two main approaches:

COM Interop

First, you need to expose the .NET DLL as a COM component
Register the .NET assembly using regasm.exe
Then you can use the functionality from C through the COM interface

C++/CLI as a bridge

Create an intermediate DLL using C++/CLI that serves as a "wrapper"
This DLL can communicate with both native C code and .NET code
The C application calls the wrapper DLL, which in turn calls the .NET DLL

Here's a basic example using the C++/CLI approach:

Code: Select all | Expand

// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once

// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);

// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"

int CallDotNetFunction(int param) {
    // Call the class/method from the .NET DLL
    MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
    return instance->MyMethod(param);
}

Code: Select all | Expand

// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
    HMODULE hDll = LoadLibrary("Wrapper.dll");
    CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
    
    int result = func(42);
    
    FreeLibrary(hDll);
    return 0;
}
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: How to convert LIB from .NET dll file :: Reply by richard-service]]> 2025-01-20T21:52:54-07:00 2025-01-20T21:52:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45323&p=277088#p277088
Antonio Linares wrote: Sun Jan 19, 2025 7:12 pm Dear Richard,

Yes, it's possible to use a .NET DLL from a C application, although it requires specific steps since they are different environments. There are two main approaches:

COM Interop

First, you need to expose the .NET DLL as a COM component
Register the .NET assembly using regasm.exe
Then you can use the functionality from C through the COM interface

C++/CLI as a bridge

Create an intermediate DLL using C++/CLI that serves as a "wrapper"
This DLL can communicate with both native C code and .NET code
The C application calls the wrapper DLL, which in turn calls the .NET DLL

Here's a basic example using the C++/CLI approach:

Code: Select all | Expand

// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once

// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);

// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"

int CallDotNetFunction(int param) {
    // Call the class/method from the .NET DLL
    MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
    return instance->MyMethod(param);
}

Code: Select all | Expand

// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
    HMODULE hDll = LoadLibrary("Wrapper.dll");
    CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
    
    int result = func(42);
    
    FreeLibrary(hDll);
    return 0;
}
Dear Antonio,

I'll try it again.
Thank you.]]>
Antonio Linares wrote: Sun Jan 19, 2025 7:12 pm Dear Richard,

Yes, it's possible to use a .NET DLL from a C application, although it requires specific steps since they are different environments. There are two main approaches:

COM Interop

First, you need to expose the .NET DLL as a COM component
Register the .NET assembly using regasm.exe
Then you can use the functionality from C through the COM interface

C++/CLI as a bridge

Create an intermediate DLL using C++/CLI that serves as a "wrapper"
This DLL can communicate with both native C code and .NET code
The C application calls the wrapper DLL, which in turn calls the .NET DLL

Here's a basic example using the C++/CLI approach:

Code: Select all | Expand

// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once

// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);

// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"

int CallDotNetFunction(int param) {
    // Call the class/method from the .NET DLL
    MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
    return instance->MyMethod(param);
}

Code: Select all | Expand

// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
    HMODULE hDll = LoadLibrary("Wrapper.dll");
    CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
    
    int result = func(42);
    
    FreeLibrary(hDll);
    return 0;
}
Dear Antonio,

I'll try it again.
Thank you.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: xbrowse, bkeydown and number :: Author JoséQuintas]]> 2025-01-08T08:13:05-07:00 2025-01-08T08:13:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45289&p=276830#p276830

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
What to do about this?]]>

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
What to do about this?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, bkeydown and number :: Reply by nageswaragunupudi]]> 2025-01-21T09:56:32-07:00 2025-01-21T09:56:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45289&p=277098#p277098 Browse or any control/window.]]> Browse or any control/window.]]> <![CDATA[FiveWin for Harbour/xHarbour :: xbrowse, bkeydown and number :: Author JoséQuintas]]> 2025-01-08T08:13:14-07:00 2025-01-08T08:13:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45290&p=276831#p276831

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
Is it expected ?

Note:
1 from normal keyboard returns 49
1 from numeric keyboard returns 97]]>

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
Is it expected ?

Note:
1 from normal keyboard returns 49
1 from numeric keyboard returns 97]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, bkeydown and number :: Reply by karinha]]> 2025-01-08T09:55:20-07:00 2025-01-08T09:55:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45290&p=276833#p276833

Code: Select all | Expand

// C:\FWH..\SAMPLES\TECLAS.PRG

#Include "FiveWin.Ch"

FUNCTION Main()

   LOCAL oWnd

   DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"

   oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }

   oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }

   ACTIVATE WINDOW oWnd

RETURN NIL
Regards, saludos.]]>

Code: Select all | Expand

// C:\FWH..\SAMPLES\TECLAS.PRG

#Include "FiveWin.Ch"

FUNCTION Main()

   LOCAL oWnd

   DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"

   oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }

   oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }

   ACTIVATE WINDOW oWnd

RETURN NIL
Regards, saludos.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, bkeydown and number :: Reply by nageswaragunupudi]]> 2025-01-21T10:01:32-07:00 2025-01-21T10:01:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45290&p=277099#p277099 <![CDATA[FiveWin for Harbour/xHarbour :: Request Xbrowse Feature :: Author Silvio.Falconi]]> 2025-01-22T01:19:43-07:00 2025-01-22T01:19:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45333&p=277112#p277112

Code: Select all | Expand

@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder  SIZE 150,400 PIXEL OF oDlg
the command

Code: Select all | Expand

@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
      ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
                  oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
                  oBrw:SetFocus() ) ;
      SIZE 70,400 PIXEL OF oDlg

in a single combobox i.e. have for example

in addition to the fields in which to search, there is also the possibility of searching with the "Starting With" and "Containing" options


so for example in the case of the customer archive having a combobox like this

FIRST
LAST
separator
"Starting With"
"Containing"


perhaps this possibility could be added with an automatic command of the type

@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 150,400 PIXEL OF oDlg AUTOWILD

and xbrowse will automatically fill in the options "Starting With" and "Containing" in the ITems od Combobox]]>

Code: Select all | Expand

@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder  SIZE 150,400 PIXEL OF oDlg
the command

Code: Select all | Expand

@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
      ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
                  oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
                  oBrw:SetFocus() ) ;
      SIZE 70,400 PIXEL OF oDlg

in a single combobox i.e. have for example

in addition to the fields in which to search, there is also the possibility of searching with the "Starting With" and "Containing" options


so for example in the case of the customer archive having a combobox like this

FIRST
LAST
separator
"Starting With"
"Containing"


perhaps this possibility could be added with an automatic command of the type

@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 150,400 PIXEL OF oDlg AUTOWILD

and xbrowse will automatically fill in the options "Starting With" and "Containing" in the ITems od Combobox]]>
<![CDATA[FiveWin for Harbour/xHarbour :: new Class TDeepSeek in next FWH 24.12 :: Author Antonio Linares]]> 2025-01-11T23:28:57-07:00 2025-01-11T23:28:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=276867#p276867
DeepSeek is much cheaper than OpenAI and it offers the same AI quality.
You have to register in DeepSeek site and get your API key. Then from a cmd window do:
set DEEPSEEK_API_KEY=sk-...

sample of use:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   
   oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )

   ? oChat:GetValue()

   oChat:End()

return nil   
]]>

DeepSeek is much cheaper than OpenAI and it offers the same AI quality.
You have to register in DeepSeek site and get your API key. Then from a cmd window do:
set DEEPSEEK_API_KEY=sk-...

sample of use:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   
   oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )

   ? oChat:GetValue()

   oChat:End()

return nil   
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Antonio Linares]]> 2025-01-12T12:55:33-07:00 2025-01-12T12:55:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=276882#p276882

Code: Select all | Expand

// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

CLASS TDeepSeek
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "deepseek-chat"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TDeepSeek

    if Empty( cKey )
       ::cKey = GetEnv( "DEEPSEEK_API_KEY" )
    else
       ::cKey = cKey   
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.deepseek.com/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TDeepSeek

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TDeepSeek

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       TRY 
          uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
       CATCH
          uValue = uValue[ "error" ][ "message" ]
       END   
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TDeepSeek 

   local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

   aHeaders := { "Content-Type: application/json", ;
                 "Authorization: Bearer " + ::cKey }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

   hRequest[ "model" ] = ::cModel
   hMessage1[ "role" ] = "system"
   hMessage1[ "content" ] = "You are a helpfull assistant."
   hMessage2[ "role" ] = "user"
   hMessage2[ "content" ] = cPrompt
   hRequest[ "messages" ] = { hMessage1, hMessage2 }
   hRequest[ "stream" ] = .F.

   cJson = hb_jsonEncode( hRequest )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
   ::nError = curl_easy_perform( ::hCurl )
   curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

   if ::nError == HB_CURLE_OK
      ::cResponse = curl_easy_dl_buff_get( ::hCurl )
   else
      ::cResponse := "Error code " + Str( ::nError )
   endif
    
return ::cResponse

//----------------------------------------------------------------------------//
]]>

Code: Select all | Expand

// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

CLASS TDeepSeek
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "deepseek-chat"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TDeepSeek

    if Empty( cKey )
       ::cKey = GetEnv( "DEEPSEEK_API_KEY" )
    else
       ::cKey = cKey   
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.deepseek.com/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TDeepSeek

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TDeepSeek

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       TRY 
          uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
       CATCH
          uValue = uValue[ "error" ][ "message" ]
       END   
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TDeepSeek 

   local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

   aHeaders := { "Content-Type: application/json", ;
                 "Authorization: Bearer " + ::cKey }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

   hRequest[ "model" ] = ::cModel
   hMessage1[ "role" ] = "system"
   hMessage1[ "content" ] = "You are a helpfull assistant."
   hMessage2[ "role" ] = "user"
   hMessage2[ "content" ] = cPrompt
   hRequest[ "messages" ] = { hMessage1, hMessage2 }
   hRequest[ "stream" ] = .F.

   cJson = hb_jsonEncode( hRequest )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
   ::nError = curl_easy_perform( ::hCurl )
   curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

   if ::nError == HB_CURLE_OK
      ::cResponse = curl_easy_dl_buff_get( ::hCurl )
   else
      ::cResponse := "Error code " + Str( ::nError )
   endif
    
return ::cResponse

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Ari]]> 2025-01-16T10:16:12-07:00 2025-01-16T10:16:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=276937#p276937
Gracias por compartir TDeepSeek.

Me gustaría obtener una Light para comunicarme con la API REST con certificado y CURL. según el código a continuación. ¿Tienes alguna experiencia sobre cómo hacerlo?

Code: Select all | Expand

#include "fivewin.ch"
#include "hbcurl.ch"

* ========================================================================
Function Teste()
* ========================================================================
  local cURL := "https://cfqasvir.it-cpi019-rt.cfapps.us10-002.hana.ondemand.com/http/PurchaseOrder/v1?CodeERP=4510160192"
  local cCurl
  local nError
  local cResponse

  cCurl := curl_easy_init()
  curl_easy_setopt( cCurl, HB_CURLOPT_PROTOCOLS, HB_CURLPROTO_HTTPS)
  curl_easy_setopt( cCurl, HB_CURLOPT_URL                   , cURL       )
  curl_easy_setopt( cCurl, HB_CURLOPT_DL_BUFF_SETUP                )  
  curl_easy_setopt( cCurl, HB_CURLOPT_HTTPHEADER      , {"Content-Type: application/json"})                                                         
  curl_easy_setopt( cCurl, HB_CURLOPT_CUSTOMREQUEST   ,'GET'       )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERTPASSWD   , "Key_fornec_Int_69133353"                    )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERT         , "C:\sis\fsql901\Key_fornec_Int_69133353.pem" )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLKEY          , "C:\sis\fsql901\Key_fornec_Int_69133353.key" )
   
  nError := curl_easy_perform( cCurl )
    
  if nError == HB_CURLE_OK
     cResponse := curl_easy_dl_buff_get( cCurl )
  else
     cResponse := "Error code: " + curl_easy_strerror(nError)
  endif
    
  Msg( cResponse )
  
  curl_easy_cleanup(cCurl)

return nil

resposta : Status 401 não autorized
]]>

Gracias por compartir TDeepSeek.

Me gustaría obtener una Light para comunicarme con la API REST con certificado y CURL. según el código a continuación. ¿Tienes alguna experiencia sobre cómo hacerlo?

Code: Select all | Expand

#include "fivewin.ch"
#include "hbcurl.ch"

* ========================================================================
Function Teste()
* ========================================================================
  local cURL := "https://cfqasvir.it-cpi019-rt.cfapps.us10-002.hana.ondemand.com/http/PurchaseOrder/v1?CodeERP=4510160192"
  local cCurl
  local nError
  local cResponse

  cCurl := curl_easy_init()
  curl_easy_setopt( cCurl, HB_CURLOPT_PROTOCOLS, HB_CURLPROTO_HTTPS)
  curl_easy_setopt( cCurl, HB_CURLOPT_URL                   , cURL       )
  curl_easy_setopt( cCurl, HB_CURLOPT_DL_BUFF_SETUP                )  
  curl_easy_setopt( cCurl, HB_CURLOPT_HTTPHEADER      , {"Content-Type: application/json"})                                                         
  curl_easy_setopt( cCurl, HB_CURLOPT_CUSTOMREQUEST   ,'GET'       )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERTPASSWD   , "Key_fornec_Int_69133353"                    )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERT         , "C:\sis\fsql901\Key_fornec_Int_69133353.pem" )
  curl_easy_setopt( cCurl, HB_CURLOPT_SSLKEY          , "C:\sis\fsql901\Key_fornec_Int_69133353.key" )
   
  nError := curl_easy_perform( cCurl )
    
  if nError == HB_CURLE_OK
     cResponse := curl_easy_dl_buff_get( cCurl )
  else
     cResponse := "Error code: " + curl_easy_strerror(nError)
  endif
    
  Msg( cResponse )
  
  curl_easy_cleanup(cCurl)

return nil

resposta : Status 401 não autorized
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Antonio Linares]]> 2025-01-16T11:13:28-07:00 2025-01-16T11:13:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=276942#p276942
En _ preguntar a varias IAs: chatgpt, claude, copilot, deepseek, es la mejor opción]]>

En _ preguntar a varias IAs: chatgpt, claude, copilot, deepseek, es la mejor opción]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Ari]]> 2025-01-16T11:39:49-07:00 2025-01-16T11:39:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=276943#p276943
¿Preguntaré?]]>

¿Preguntaré?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Antonio Linares]]> 2025-01-21T13:19:38-07:00 2025-01-21T13:19:38-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=277102#p277102 DeepSeek R1

To use it from FWH Class TDeepSeek we have to specify model="deepseek-reasoner"

By default we are using

DATA cModel INIT "deepseek-chat"

so in order to use it we have to change this:

DATA cModel INIT "deepseek-reasoner"

Prices: (the cheapest of all and the best AI)
💰 $0.14 / million input tokens (cache hit)
💰 $0.55 / million input tokens (cache miss)
💰 $2.19 / million output tokens]]>
DeepSeek R1

To use it from FWH Class TDeepSeek we have to specify model="deepseek-reasoner"

By default we are using

DATA cModel INIT "deepseek-chat"

so in order to use it we have to change this:

DATA cModel INIT "deepseek-reasoner"

Prices: (the cheapest of all and the best AI)
💰 $0.14 / million input tokens (cache hit)
💰 $0.55 / million input tokens (cache miss)
💰 $2.19 / million output tokens]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: new Class TDeepSeek in next FWH 24.12 :: Reply by Antonio Linares]]> 2025-01-22T10:40:11-07:00 2025-01-22T10:40:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45297&p=277128#p277128 https://platform.deepseek.com/ to pay five USD using PayPal]]> https://platform.deepseek.com/ to pay five USD using PayPal]]> <![CDATA[FiveWin for Harbour/xHarbour :: Thanks for posts :: Author Otto]]> 2025-01-23T00:22:36-07:00 2025-01-23T00:22:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45338&p=277142#p277142 Maybe it would be a good idea to activate the "Thanks for posts" feature in the new version of the forum.
Best regards,
Otto]]>
Maybe it would be a good idea to activate the "Thanks for posts" feature in the new version of the forum.
Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Thanks for posts :: Reply by Antonio Linares]]> 2025-01-23T00:44:50-07:00 2025-01-23T00:44:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45338&p=277143#p277143
good morning,

Do you mean "likes" ? :)

Not sure if there is a phpbb extension for it. We need to search it.]]>

good morning,

Do you mean "likes" ? :)

Not sure if there is a phpbb extension for it. We need to search it.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Thanks for posts :: Reply by Antonio Linares]]> 2025-01-23T00:48:41-07:00 2025-01-23T00:48:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45338&p=277145#p277145 https://www.phpbb.com/customise/db/exte ... r_posts_2/

Is this the one that you mean ?]]>
https://www.phpbb.com/customise/db/exte ... r_posts_2/

Is this the one that you mean ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Thanks for posts :: Reply by Antonio Linares]]> 2025-01-23T13:02:37-07:00 2025-01-23T13:02:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45338&p=277162#p277162

Image]]>


Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: New "like / thanks" option in the forums ! :: Author Antonio Linares]]> 2025-01-23T13:03:59-07:00 2025-01-23T13:03:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45339&p=277163#p277163

Image]]>


Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Implementing SetDarkTheme() for next FWH :: Author Antonio Linares]]> 2025-01-22T23:20:07-07:00 2025-01-22T23:20:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45337&p=277141#p277141
We do appreciate your feedback :)

Image]]>

We do appreciate your feedback :)

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Implementing SetDarkTheme() for next FWH :: Reply by leandro]]> 2025-01-23T07:52:36-07:00 2025-01-23T07:52:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45337&p=277159#p277159
Desde nuestro punto de vista, pinta bien :D :D :D :D

1- Puede no ser tan dark, ósea se puede establecer un color que elijamos, tirando un poco más a gris?
2- Va a aplicar para todos los objetos, incluyendo los ButtonBar y las RibbonBar?

De momento esas son nuestras inquietudes

Image]]>

Desde nuestro punto de vista, pinta bien :D :D :D :D

1- Puede no ser tan dark, ósea se puede establecer un color que elijamos, tirando un poco más a gris?
2- Va a aplicar para todos los objetos, incluyendo los ButtonBar y las RibbonBar?

De momento esas son nuestras inquietudes

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Implementing SetDarkTheme() for next FWH :: Reply by Antonio Linares]]> 2025-01-23T13:10:39-07:00 2025-01-23T13:10:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45337&p=277166#p277166 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: xbrowse, dbf and codeblock :: Author JoséQuintas]]> 2025-01-22T18:49:59-07:00 2025-01-22T18:49:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277139#p277139 Image

Using DBF.
When define a codeblock for skip, xbrowse update fail.

Code: Select all | Expand

   @ 70, 10 XBROWSE xControl ;
      DATASOURCE Alias() ;
      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
      OF xDlg ;
      ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )

   WITH OBJECT xControl
      :SetRdd()
      :bGoTop    := { || ( nSelect )->( FazBrowseTop() ) }
      :bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
      :bSkip     := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
      //:bBof      := { || Bof() }
      //:bEof      := { || Eof() }
      //:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
   ENDWITH
   ...
   STATIC FUNCTION FazBrowseSkip( nSkip )

   LOCAL nSkipped := 0

   IF Empty( nSkip  )
      RETURN 0
   ENDIF
   IF nSkip > 0
      DO WHILE nSkipped < nSkip
         SKIP
         IF Eof()
            SKIP -1
            EXIT
         ENDIF
         nSkipped++
      ENDDO
   ELSE
      DO WHILE nSkipped > nSkip
         SKIP -1
         IF Bof()
            SKIP
            EXIT
         ENDIF
         nSkipped--
      ENDDO
   ENDIF

   RETURN nSkipped
   
]]>
Image

Using DBF.
When define a codeblock for skip, xbrowse update fail.

Code: Select all | Expand

   @ 70, 10 XBROWSE xControl ;
      DATASOURCE Alias() ;
      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
      OF xDlg ;
      ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )

   WITH OBJECT xControl
      :SetRdd()
      :bGoTop    := { || ( nSelect )->( FazBrowseTop() ) }
      :bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
      :bSkip     := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
      //:bBof      := { || Bof() }
      //:bEof      := { || Eof() }
      //:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
   ENDWITH
   ...
   STATIC FUNCTION FazBrowseSkip( nSkip )

   LOCAL nSkipped := 0

   IF Empty( nSkip  )
      RETURN 0
   ENDIF
   IF nSkip > 0
      DO WHILE nSkipped < nSkip
         SKIP
         IF Eof()
            SKIP -1
            EXIT
         ENDIF
         nSkipped++
      ENDDO
   ELSE
      DO WHILE nSkipped > nSkip
         SKIP -1
         IF Bof()
            SKIP
            EXIT
         ENDIF
         nSkipped--
      ENDDO
   ENDIF

   RETURN nSkipped
   
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by nageswaragunupudi]]> 2025-01-22T22:32:54-07:00 2025-01-22T22:32:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277140#p277140

Code: Select all | Expand

   @ 70, 10 XBROWSE xControl ;
      DATASOURCE Alias() ;
      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
      OF xDlg ;
      ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.

Please do not write our own navigation codeblocks.

Also, another small note:

Code: Select all | Expand

      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
You can simply write

Code: Select all | Expand

 SIZE -24,-100 PIXEL
This works even when the dialog is resized

Finally, end with

Code: Select all | Expand

xControl:CreateFromCode()
]]>

Code: Select all | Expand

   @ 70, 10 XBROWSE xControl ;
      DATASOURCE Alias() ;
      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
      OF xDlg ;
      ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.

Please do not write our own navigation codeblocks.

Also, another small note:

Code: Select all | Expand

      SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
You can simply write

Code: Select all | Expand

 SIZE -24,-100 PIXEL
This works even when the dialog is resized

Finally, end with

Code: Select all | Expand

xControl:CreateFromCode()
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by JoséQuintas]]> 2025-01-23T05:28:06-07:00 2025-01-23T05:28:06-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277147#p277147
nageswaragunupudi wrote: Thu Jan 23, 2025 5:32 am XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.
Please do not write our own navigation codeblocks.
Yes, for a standard navigation.
What to do when I need a not default navigation for dbf?
I think codeblocks are available on xbrowse to do things like this, in same way as harbour tbrowse.
Am I wrong ?]]>
nageswaragunupudi wrote: Thu Jan 23, 2025 5:32 am XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.
Please do not write our own navigation codeblocks.
Yes, for a standard navigation.
What to do when I need a not default navigation for dbf?
I think codeblocks are available on xbrowse to do things like this, in same way as harbour tbrowse.
Am I wrong ?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by nageswaragunupudi]]> 2025-01-23T06:25:16-07:00 2025-01-23T06:25:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277149#p277149

Code: Select all | Expand

::bGoTop    := {|| ( ::cAlias )->( DbGoTop() ) }
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) }
::bSkip     := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
::bBof      := {|| ( ::cAlias )->( Bof() ) }
::bEof      := {|| ( ::cAlias )->( Eof() ) }
::bBookMark := {| n | iif( n == nil
                          ( ::cAlias )->( RecNo() )
                          ( ::cAlias )->( DbGoto( n );
                         ) ) }

::bKeyNo    := {| n | iif( n == nil
                         ( ::cAlias )->( OrdKeyNo() )
                         ( ::cAlias )->( OrdKeyGoto( n );
                         ) ) }
::bKeyCount := {|| ( ::cAlias )->( If( eof() .and. bof(), 0, OrdKeyCount() ) ) }
Note: There are minor variations for SQLRDD, ADS, Large DBFCDX

If we need a different navigational behavior, we need to change these codeblocks consistent with each other.]]>

Code: Select all | Expand

::bGoTop    := {|| ( ::cAlias )->( DbGoTop() ) }
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) }
::bSkip     := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
::bBof      := {|| ( ::cAlias )->( Bof() ) }
::bEof      := {|| ( ::cAlias )->( Eof() ) }
::bBookMark := {| n | iif( n == nil
                          ( ::cAlias )->( RecNo() )
                          ( ::cAlias )->( DbGoto( n );
                         ) ) }

::bKeyNo    := {| n | iif( n == nil
                         ( ::cAlias )->( OrdKeyNo() )
                         ( ::cAlias )->( OrdKeyGoto( n );
                         ) ) }
::bKeyCount := {|| ( ::cAlias )->( If( eof() .and. bof(), 0, OrdKeyCount() ) ) }
Note: There are minor variations for SQLRDD, ADS, Large DBFCDX

If we need a different navigational behavior, we need to change these codeblocks consistent with each other.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by JoséQuintas]]> 2025-01-23T07:17:17-07:00 2025-01-23T07:17:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277154#p277154

Code: Select all | Expand

   WITH OBJECT xControl
      :SetRdd()
      :bGoTop    := {|| ( :cAlias )->( DbGoTop() ) }
      :bGoBottom := {|| ( :cAlias )->( DbGoBottom() ) }
      :bSkip     := {| n | ( :cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
      :bBof      := {|| ( :cAlias )->( Bof() ) }
      :bEof      := {|| ( :cAlias )->( Eof() ) }
      :bBookMark := {| n | iif( n == nil,;
         ( :cAlias )->( RecNo() ),;
         ( :cAlias )->( DbGoto( n );
         ) ) }

      //:bGoTop    := { || ( nSelect )->( FazBrowseTop() ) }
      //:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
      //:bSkip     := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
      //:bBof      := { || Bof() }
      //:bEof      := { || Eof() }
      //:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
   ENDWITH
   
With same codeblocks, it is expected same result.

Will test again, may be harbour behaviour about WITH OBJECT construction/execution
I discover about this some months ago, after began to use fivewin.]]>

Code: Select all | Expand

   WITH OBJECT xControl
      :SetRdd()
      :bGoTop    := {|| ( :cAlias )->( DbGoTop() ) }
      :bGoBottom := {|| ( :cAlias )->( DbGoBottom() ) }
      :bSkip     := {| n | ( :cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
      :bBof      := {|| ( :cAlias )->( Bof() ) }
      :bEof      := {|| ( :cAlias )->( Eof() ) }
      :bBookMark := {| n | iif( n == nil,;
         ( :cAlias )->( RecNo() ),;
         ( :cAlias )->( DbGoto( n );
         ) ) }

      //:bGoTop    := { || ( nSelect )->( FazBrowseTop() ) }
      //:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
      //:bSkip     := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
      //:bBof      := { || Bof() }
      //:bEof      := { || Eof() }
      //:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
   ENDWITH
   
With same codeblocks, it is expected same result.

Will test again, may be harbour behaviour about WITH OBJECT construction/execution
I discover about this some months ago, after began to use fivewin.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by nageswaragunupudi]]> 2025-01-23T07:25:25-07:00 2025-01-23T07:25:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277155#p277155 The codeblock bSkip uses the function:
nSkipped := DbSkipper( nRecs ) // xHarbour
nSkipped := __DbSkipper( nRecs ) // Harbour

The functionality is similar to this function

Code: Select all | Expand

function MyDbfSkipper( nRecs )

   local nKeyFrom := OrdKeyNo()
   
   DBSKIP( nRecs )
   if Eof()
      DbGoBottom()
   elseif Bof(
      DbGoTop()
   endif
   
return OrdKeyNo() - nKeyFrom
]]>
The codeblock bSkip uses the function:
nSkipped := DbSkipper( nRecs ) // xHarbour
nSkipped := __DbSkipper( nRecs ) // Harbour

The functionality is similar to this function

Code: Select all | Expand

function MyDbfSkipper( nRecs )

   local nKeyFrom := OrdKeyNo()
   
   DBSKIP( nRecs )
   if Eof()
      DbGoBottom()
   elseif Bof(
      DbGoTop()
   endif
   
return OrdKeyNo() - nKeyFrom
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by JoséQuintas]]> 2025-01-23T07:42:04-07:00 2025-01-23T07:42:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277158#p277158 It is it !
Harbour behaviour using WITH OBJECT !
Check this code:

Code: Select all | Expand

#include "hbclass.ch"

PROCEDURE Main()

   LOCAL a, b, x

   SetMode(30,100)
   CLS

   a := AnyClass():New()
   b := AnyClass():New()

   WITH OBJECT a
      :Value := 10
      x := { || :Value } // created here, seems a:Value
   ENDWITH
   WITH OBJECT b
      ? a:Value
      ? b:Value
      ? eval( x ) // executed here, results b:Value
   ENDWITH
   Inkey(0)

   RETURN

CREATE CLASS AnyClass

   VAR Value INIT 0

   ENDCLASS
seems that result will be 10, 10, 0
but result is 10, 0, 0

x is created inside WITH a, but do not have defined object, it is not a:value
when used inside WITH b, x return b:value not a:value
The same occurs when define codeblocks for xbrowse.

Solution is to use full name.
WITH OBJECT need caution when creating codeblock.
I forgot about this.

This works ok, with full name.

Code: Select all | Expand


   WITH OBJECT xControl
      xControl:SetRdd()
      xControl:bGoTop    := {|| ( xControl:cAlias )->( DbGoTop() ) }
      xControl:bGoBottom := {|| ( xControl:cAlias )->( DbGoBottom() ) }
      xControl:bSkip     := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
      xControl:bBof      := {|| ( xControl:cAlias )->( Bof() ) }
      xControl:bEof      := {|| ( xControl:cAlias )->( Eof() ) }
      xControl:bBookMark := {| n | iif( n == nil,;
         ( xControl:cAlias )->( RecNo() ),;
         ( xControl:cAlias )->( DbGoto( n );
         ) ) }
]]>
It is it !
Harbour behaviour using WITH OBJECT !
Check this code:

Code: Select all | Expand

#include "hbclass.ch"

PROCEDURE Main()

   LOCAL a, b, x

   SetMode(30,100)
   CLS

   a := AnyClass():New()
   b := AnyClass():New()

   WITH OBJECT a
      :Value := 10
      x := { || :Value } // created here, seems a:Value
   ENDWITH
   WITH OBJECT b
      ? a:Value
      ? b:Value
      ? eval( x ) // executed here, results b:Value
   ENDWITH
   Inkey(0)

   RETURN

CREATE CLASS AnyClass

   VAR Value INIT 0

   ENDCLASS
seems that result will be 10, 10, 0
but result is 10, 0, 0

x is created inside WITH a, but do not have defined object, it is not a:value
when used inside WITH b, x return b:value not a:value
The same occurs when define codeblocks for xbrowse.

Solution is to use full name.
WITH OBJECT need caution when creating codeblock.
I forgot about this.

This works ok, with full name.

Code: Select all | Expand


   WITH OBJECT xControl
      xControl:SetRdd()
      xControl:bGoTop    := {|| ( xControl:cAlias )->( DbGoTop() ) }
      xControl:bGoBottom := {|| ( xControl:cAlias )->( DbGoBottom() ) }
      xControl:bSkip     := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
      xControl:bBof      := {|| ( xControl:cAlias )->( Bof() ) }
      xControl:bEof      := {|| ( xControl:cAlias )->( Eof() ) }
      xControl:bBookMark := {| n | iif( n == nil,;
         ( xControl:cAlias )->( RecNo() ),;
         ( xControl:cAlias )->( DbGoto( n );
         ) ) }
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by JoséQuintas]]> 2025-01-23T08:32:01-07:00 2025-01-23T08:32:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277160#p277160
May be this expains why a external database works, and internal may not.
As example using mysql.

Internal

Code: Select all | Expand

WITH OBJECT xbrowse
   :bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH   
External

Code: Select all | Expand

WITH OBJECT xBrowse
   :bGoTop := RS:MoveNext() // use right object, RS
ENDWITH
I had same problem using ADO, but I forgot about this.
Not easy to remember issues on not common situations.
May be interesting to include about this on documentation of xbrowse, and on source code too.

Code: Select all | Expand

   // Code-blocks for navitation
   // Caution: Use allways full name for codeblocks, WITH OBJECT may fail

   DATA bGoTop,;     // codeblock for going to first row
        bGoBottom,;  // codeblock for going to last row
        bSkip,;      // codeblock for skiping rows, it receives the number of rows
]]>

May be this expains why a external database works, and internal may not.
As example using mysql.

Internal

Code: Select all | Expand

WITH OBJECT xbrowse
   :bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH   
External

Code: Select all | Expand

WITH OBJECT xBrowse
   :bGoTop := RS:MoveNext() // use right object, RS
ENDWITH
I had same problem using ADO, but I forgot about this.
Not easy to remember issues on not common situations.
May be interesting to include about this on documentation of xbrowse, and on source code too.

Code: Select all | Expand

   // Code-blocks for navitation
   // Caution: Use allways full name for codeblocks, WITH OBJECT may fail

   DATA bGoTop,;     // codeblock for going to first row
        bGoBottom,;  // codeblock for going to last row
        bSkip,;      // codeblock for skiping rows, it receives the number of rows
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by JoséQuintas]]> 2025-01-24T05:44:29-07:00 2025-01-24T05:44:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277180#p277180

Code: Select all | Expand

      xControl:bSkip     := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
Xbrowse requires to skip NIL records.
When xbrowse requires NIL records, it is needed to change to 1.

Code: Select all | Expand

METHOD Skip( n ) CLASS TXBrowse

   local nStart
   local nSkipped := 0

   if !::lClosed
      TRY
         if Empty( ::aFilter )
            nSkipped := Eval( ::bSkip, n, Self )
         else
            nStart      := ::nFltRow
            ::GoFltRow( ::nFltRow + IfNil( n, 1 ) )
            nSkipped    := ::nFltRow - nStart
         endif
      CATCH
         ::nLen      := 0
         ::lClosed   := .t.
      END
   endif

return nSkipped
Looking to method skip, one more test about Nil

Could be changed to

Code: Select all | Expand

hb_Default( @n, 1 )
If needed for xharbour:

Code: Select all | Expand

FUNCTION hb_Default( a, b )
   IF valType( a ) != ValType( b )
       a := b
     ENDIF
     RETURN Nil
New source

Code: Select all | Expand

METHOD Skip( n ) CLASS TXBrowse

   local nStart
   local nSkipped := 0

   if !::lClosed
      TRY
         hb_Default( @n, 1 )
         if Empty( ::aFilter )
            nSkipped := Eval( ::bSkip, n, Self )
         else
            nStart      := ::nFltRow
            ::GoFltRow( ::nFltRow + n )
            nSkipped    := ::nFltRow - nStart
         endif
      CATCH
         ::nLen      := 0
         ::lClosed   := .t.
      END
   endif

return nSkipped
Not sure if it is needed the TRY/CATCH.
This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)]]>

Code: Select all | Expand

      xControl:bSkip     := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
Xbrowse requires to skip NIL records.
When xbrowse requires NIL records, it is needed to change to 1.

Code: Select all | Expand

METHOD Skip( n ) CLASS TXBrowse

   local nStart
   local nSkipped := 0

   if !::lClosed
      TRY
         if Empty( ::aFilter )
            nSkipped := Eval( ::bSkip, n, Self )
         else
            nStart      := ::nFltRow
            ::GoFltRow( ::nFltRow + IfNil( n, 1 ) )
            nSkipped    := ::nFltRow - nStart
         endif
      CATCH
         ::nLen      := 0
         ::lClosed   := .t.
      END
   endif

return nSkipped
Looking to method skip, one more test about Nil

Could be changed to

Code: Select all | Expand

hb_Default( @n, 1 )
If needed for xharbour:

Code: Select all | Expand

FUNCTION hb_Default( a, b )
   IF valType( a ) != ValType( b )
       a := b
     ENDIF
     RETURN Nil
New source

Code: Select all | Expand

METHOD Skip( n ) CLASS TXBrowse

   local nStart
   local nSkipped := 0

   if !::lClosed
      TRY
         hb_Default( @n, 1 )
         if Empty( ::aFilter )
            nSkipped := Eval( ::bSkip, n, Self )
         else
            nStart      := ::nFltRow
            ::GoFltRow( ::nFltRow + n )
            nSkipped    := ::nFltRow - nStart
         endif
      CATCH
         ::nLen      := 0
         ::lClosed   := .t.
      END
   endif

return nSkipped
Not sure if it is needed the TRY/CATCH.
This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: xbrowse, dbf and codeblock :: Reply by nageswaragunupudi]]> 2025-01-24T19:13:14-07:00 2025-01-24T19:13:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45336&p=277192#p277192
1)
seems that result will be 10, 10, 0
but result is 10, 0, 0
Looking at the code, any programmer should expect the result to be 10,0,0 and in fact the result is 10,0,0.

2)
WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Please check again. XBrowse program does not have any such defective code.

In contrast,

Code: Select all | Expand

::bGoTop := { || ::oRs:MoveFirst() }
This works perfectly.

Not only XBrowse, there is no module in FWH using such defective code.

3)
May be interesting to include about this on documentation of xbrowse, and on source code too.
// Code-blocks for navitation
// Caution: Use allways full name for codeblocks, WITH OBJECT may fail[/quote]

This is nothing specific to xBrowse or Fivewin. This is what every (x)Harbour programmer is expected to know.

4)
This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)
XBrowse never fails on Skip().
We do not expect any programmer to use non numeric values.

5)
We appreciate that a function like hb_default is safer than IfNil.

6)
we see xbrowse fail
To the best of our knowledge and experience, xbrowse never fails on such issues.
If you find that XBrowse is failing at times, you may like to help FWH and our community by providing a sample program to demonstrate such a failure.

Thanks again for your interest and time to help improve xbrowse.]]>

1)
seems that result will be 10, 10, 0
but result is 10, 0, 0
Looking at the code, any programmer should expect the result to be 10,0,0 and in fact the result is 10,0,0.

2)
WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Please check again. XBrowse program does not have any such defective code.

In contrast,

Code: Select all | Expand

::bGoTop := { || ::oRs:MoveFirst() }
This works perfectly.

Not only XBrowse, there is no module in FWH using such defective code.

3)
May be interesting to include about this on documentation of xbrowse, and on source code too.
// Code-blocks for navitation
// Caution: Use allways full name for codeblocks, WITH OBJECT may fail[/quote]

This is nothing specific to xBrowse or Fivewin. This is what every (x)Harbour programmer is expected to know.

4)
This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)
XBrowse never fails on Skip().
We do not expect any programmer to use non numeric values.

5)
We appreciate that a function like hb_default is safer than IfNil.

6)
we see xbrowse fail
To the best of our knowledge and experience, xbrowse never fails on such issues.
If you find that XBrowse is failing at times, you may like to help FWH and our community by providing a sample program to demonstrate such a failure.

Thanks again for your interest and time to help improve xbrowse.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: multi-column popup menu :: Author Natter]]> 2025-01-22T02:15:44-07:00 2025-01-22T02:15:44-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277113#p277113 (there is COLUNS option in TMenu class, but I didn't find any examples of using it :( )]]> (there is COLUNS option in TMenu class, but I didn't find any examples of using it :( )]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Antonio Linares]]> 2025-01-22T03:38:36-07:00 2025-01-22T03:38:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277116#p277116
We are checking it...]]>

We are checking it...]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by nageswaragunupudi]]> 2025-01-22T08:57:54-07:00 2025-01-22T08:57:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277125#p277125

Code: Select all | Expand

function ColPopUp()

   local oPop

   MENU oPop POPUP 2007 ;
      SELECT "STATES" ;  // alias
      COLUMNS 1, 2 ;
      HEADERS "One", "Two"

   ENDMENU

return oPop
Image]]>

Code: Select all | Expand

function ColPopUp()

   local oPop

   MENU oPop POPUP 2007 ;
      SELECT "STATES" ;  // alias
      COLUMNS 1, 2 ;
      HEADERS "One", "Two"

   ENDMENU

return oPop
Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by cnavarro]]> 2025-01-22T10:53:21-07:00 2025-01-22T10:53:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277129#p277129

Code: Select all | Expand

//----------------------------------------------------------------------------//
//   Author: Cristobal Navarro
//   Sample demo Features MENUS, using databases and arrays
//----------------------------------------------------------------------------//

#include "FiveWin.ch"

Static oWnd
Static oFontMnu

function Main()

   local oMenu

   DEFINE FONT oFontMnu NAME "Segoe UI Symbol" SIZE 0, -14
   
   DbUseArea( .T., , "Customer.dbf" )
   DbUseArea( .T., , "utf8_01.dbf" )
   DbUseArea( .T., , "states.dbf" )
   //DbGoto( 3 )
   DEFINE WINDOW oWnd TITLE "Test Menu From Databases and Arrays: " MENU MenuDatabase() ;
      FROM 20, 40 TO 650, 1200 PIXEL

   oWnd:bRClicked  := { | nR, nC | MenuDatabase( .T., .F., nR, nC ) }
   CtrlMove( oWnd )

   ACTIVATE WINDOW oWnd ON INIT MenuDatabase( .F., .T., , ) MAXIMIZED

   RELEASE oFontMnu

return nil

//----------------------------------------------------------------------------//

Function MenuDatabase( lPopup, lSys, nR, nC )

   local oMenu
   DEFAULT lPopup  := .F.
   DEFAULT lSys    := .F.

   if !lPopup
      if !lSys
         MENU oMenu 2013 ;
            COLORMENU METRO_STEEL, CLR_WHITE ;
            COLORLEFT CLR_WHITE, METRO_STEEL ;
            COLORRIGHT CLR_WHITE, METRO_STEEL ;
            COLORSELECT CLR_HCYAN, CLR_HCYAN, Rgb( 0, 0, 1 ) ; //CLR_WHITE, CLR_WHITE, CLR_BLUE ;
            COLORSEPARATOR CLR_RED ;
            COLORBOX CLR_WHITE
      else
         REDEFINE SYSMENU oMenu OF oWnd 2013 ;
            COLORMENU METRO_STEEL, CLR_WHITE ;
            COLORLEFT CLR_WHITE, METRO_STEEL ;
            COLORRIGHT CLR_WHITE, METRO_STEEL ;
            COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
            COLORSEPARATOR CLR_RED ;
            COLORBOX CLR_WHITE
         
         SEPARATOR
      endif
   else
      MENU oMenu 2013 POPUP FONT oFontMnu ;
         COLORMENU METRO_STEEL, CLR_WHITE ;
         COLORLEFT CLR_WHITE, METRO_STEEL ;
         COLORRIGHT CLR_WHITE, METRO_STEEL ;
         COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
         COLORSEPARATOR CLR_RED ;
         COLORBOX CLR_WHITE
   endif
   if lPopup
      MENUITEM "Databases and Arrays Test and Font" SEPARATOR OF oMenu BOLD //ITALIC
      SEPARATOR
   endif
   MENUITEM Alias( 1 ) // COLORMENU CLR_RED, CLR_YELLOW
      MENU SELECT Alias( 1 ) LIMIT 16 COLUMNS 1, 4, 5
      ENDMENU
   MENUITEM Alias( 2 )
      MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3
      ENDMENU
   MENUITEM Alias( 3 )
      MENU SELECT Alias( 3 ) LIMIT -1 COLUMNS 2
      ENDMENU
   MENUITEM Alias( 2 ) + "_EXPAND"
      MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3 EXPAND
      ENDMENU
   MENUITEM Upper( "FieldNames_" ) + Alias( 1 )
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 2, 1, 3 //, 4
      ENDMENU
   MENUITEM Upper( "FieldNames_" ) + Alias( 1 ) + "_EXPAND"
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 ;
         EXPAND NOFORM HEADERS "Name", "Type", "Length", "Decs"
      ENDMENU
   MENUITEM Upper( "FieldNames" ) + "_EXPAND_FORM_ACTIONS"
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 EXPAND ;
         HEADERS "Name", "Type", "Length", "Decs" ACTION { | oI | MyAction( oI ) }
         //LEFTWIDTH if( lSys, 24, 1 ) ;
         //LOGOMENU "..\bitmaps\fivetechv.png" ;
      ENDMENU
   MENUITEM "EXIT" ACTION oWnd:End() WHEN ( !lPopup .and. !lSys )
   if lPopup
      ENDMENU
      if nC < oWnd:nRight - 400
         ACTIVATE MENU oMenu AT nR, nC OF oWnd  // Limit zone for show menu
      else
         oMenu:End()    // Release Menus created
      endif
   else
      if lSys
         SEPARATOR
         MENUITEM "Reset Menu"  ACTION oMenu:Reset()
         ENDSYSMENU
      else
         ENDMENU
      endif
   endif

Return oMenu

//----------------------------------------------------------------------------//

Function MyAction( oI )
     //oI:SetCheck(.T.)
     ? "Object Item: ", oI, ;
       "Position into Menu Parent: ", oI:nPos, ;
       "oItem cPrompt:", oI:cPrompt, ;
       "oItem Id: ", oI:nId, ;
       "Object Menu Parent of Item: ", oI:oMenu, ;
       "Position of Menu Parent: ", oI:oMenu:nPos
     ? "Object Menu Principal: ", Valtype( GetaMenusAux()[ 1 ] ), GetaMenusAux()[ 1 ]:lMenuBar
     ? "Items of Menu Principal: ", Len( GetaMenusAux()[ 1 ]:aMenuItems )
     ? "Menu Parent of Menu of Item Selected", GetParentAuxMenus( oI:oMenu ), ;
       "Items of this Menu: ", Len( GetParentAuxMenus( oI:oMenu ):aMenuItems ), ;
       "Separators, they are also counted"
     ? "Len Items Menu 5: ", Len( GetaMenusAux()[ 5 ]:aMenuItems )
     ? "Total Menus Create: ", Len( GetaMenusAux() )

Return nil

//----------------------------------------------------------------------------//

Function CtrlMove( oDlg )

   local oFontWD2
   local nRow      := oDlg:nBottom - 150
   local nCol      := oDlg:nRight  - 350
   local nSize     := 32
   local oSay

   @ nRow - 64, 20 GROUP TO nRow + 54, oDlg:nRight - 460 OF oDlg PIXEL PROMPT "  Notes:  "
   @ nRow - 64, oDlg:nRight - 450 GROUP TO nRow + 54, oDlg:nRight - 80 OF oDlg PIXEL PROMPT "  Menu " + Alias( 1 ) + " Changes: "
   @ nRow - 24, 80 SAY " - Press RIGHT BUTTON of Mouse for Test Menu POPUP: [ MAX -> oWnd:nRight - 400 ]" ;
      PIXEL OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
   @ nRow + 12, 80 SAY " - Press over ICON Application for Test SYSMENU" PIXEL ;
      OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
   @ nRow - 24, nCol - nSize - 24 SAY oSay PROMPT " Controls for movement: " + Alias( 1 ) PIXEL ;
      OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 230, 22

   oFontWD2 := TFont():New( 'Wingdings 3', 0, -21, .f., .f., 0, 0, 400, .f., .f., .f., 2,3, 2, 1,, 18 )
   @ nRow, nCol BTNBMP PROMPT Chr( HexToDec( "72" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT  ; //BITMAP aBmp[ 1 ]
      TOOLTIP FWString( "Top" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATTop() )
   @ nRow, nCol + nSize * 1 + 1 BTNBMP PROMPT Chr( HexToDec( "76" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Move Up" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( Retrocede() )
   @ nRow, nCol + nSize * 2 + 2 BTNBMP PROMPT Chr( HexToDec( "77" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Move Down" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( Avanza() )
   @ nRow, nCol + nSize * 3 + 3 BTNBMP PROMPT Chr( HexToDec( "73" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Bottom" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( ATBottom() )
   oFontWD2:End()
   AEval( oDlg:aControls, { |o| If( o:ClassName() == "TBTNBMP", ( o:SetColor( CLR_WHITE, METRO_OLIVE ), o:nRound := 0 ), nil ) } )
Return nil

//----------------------------------------------------------------------------//

Function Avanza( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   //? oWnd:oMenu:hMenu, Len( GetaMenusAux()[ 1 ]:aMenuItems ), GetaMenusAux()[ 2 ]:aMenuItems[ 4 ]:cPrompt
   //? GetaMenusAux()[ 1 ]:aMenuItems[ 1 ]:bAction:hMenu, oMnu:hMenu
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * oMnu:nPage ) + 1 ) )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage++
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

Function Retrocede( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * ( oMnu:nPage - 2 ) ) + 1 ) )
         if ( Alias( nAr ) )->( !Bof() )
            oMnu:nPage--
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Bof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip( 1 ) )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )   

Return nil

//----------------------------------------------------------------------------//

Function ATTop( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTop() )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage := 1
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

Function ATBottom( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( Alias( 1 ) )->( LastRec() ) - oMnu:nLimit + 1 ) )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage := if( ( ( Alias( nAr ) )->( LastRec() ) % oMnu:nLimit ) = 0, ;
                              ( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ), ;
                              Int( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ) + 1 )
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

]]>

Code: Select all | Expand

//----------------------------------------------------------------------------//
//   Author: Cristobal Navarro
//   Sample demo Features MENUS, using databases and arrays
//----------------------------------------------------------------------------//

#include "FiveWin.ch"

Static oWnd
Static oFontMnu

function Main()

   local oMenu

   DEFINE FONT oFontMnu NAME "Segoe UI Symbol" SIZE 0, -14
   
   DbUseArea( .T., , "Customer.dbf" )
   DbUseArea( .T., , "utf8_01.dbf" )
   DbUseArea( .T., , "states.dbf" )
   //DbGoto( 3 )
   DEFINE WINDOW oWnd TITLE "Test Menu From Databases and Arrays: " MENU MenuDatabase() ;
      FROM 20, 40 TO 650, 1200 PIXEL

   oWnd:bRClicked  := { | nR, nC | MenuDatabase( .T., .F., nR, nC ) }
   CtrlMove( oWnd )

   ACTIVATE WINDOW oWnd ON INIT MenuDatabase( .F., .T., , ) MAXIMIZED

   RELEASE oFontMnu

return nil

//----------------------------------------------------------------------------//

Function MenuDatabase( lPopup, lSys, nR, nC )

   local oMenu
   DEFAULT lPopup  := .F.
   DEFAULT lSys    := .F.

   if !lPopup
      if !lSys
         MENU oMenu 2013 ;
            COLORMENU METRO_STEEL, CLR_WHITE ;
            COLORLEFT CLR_WHITE, METRO_STEEL ;
            COLORRIGHT CLR_WHITE, METRO_STEEL ;
            COLORSELECT CLR_HCYAN, CLR_HCYAN, Rgb( 0, 0, 1 ) ; //CLR_WHITE, CLR_WHITE, CLR_BLUE ;
            COLORSEPARATOR CLR_RED ;
            COLORBOX CLR_WHITE
      else
         REDEFINE SYSMENU oMenu OF oWnd 2013 ;
            COLORMENU METRO_STEEL, CLR_WHITE ;
            COLORLEFT CLR_WHITE, METRO_STEEL ;
            COLORRIGHT CLR_WHITE, METRO_STEEL ;
            COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
            COLORSEPARATOR CLR_RED ;
            COLORBOX CLR_WHITE
         
         SEPARATOR
      endif
   else
      MENU oMenu 2013 POPUP FONT oFontMnu ;
         COLORMENU METRO_STEEL, CLR_WHITE ;
         COLORLEFT CLR_WHITE, METRO_STEEL ;
         COLORRIGHT CLR_WHITE, METRO_STEEL ;
         COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
         COLORSEPARATOR CLR_RED ;
         COLORBOX CLR_WHITE
   endif
   if lPopup
      MENUITEM "Databases and Arrays Test and Font" SEPARATOR OF oMenu BOLD //ITALIC
      SEPARATOR
   endif
   MENUITEM Alias( 1 ) // COLORMENU CLR_RED, CLR_YELLOW
      MENU SELECT Alias( 1 ) LIMIT 16 COLUMNS 1, 4, 5
      ENDMENU
   MENUITEM Alias( 2 )
      MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3
      ENDMENU
   MENUITEM Alias( 3 )
      MENU SELECT Alias( 3 ) LIMIT -1 COLUMNS 2
      ENDMENU
   MENUITEM Alias( 2 ) + "_EXPAND"
      MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3 EXPAND
      ENDMENU
   MENUITEM Upper( "FieldNames_" ) + Alias( 1 )
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 2, 1, 3 //, 4
      ENDMENU
   MENUITEM Upper( "FieldNames_" ) + Alias( 1 ) + "_EXPAND"
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 ;
         EXPAND NOFORM HEADERS "Name", "Type", "Length", "Decs"
      ENDMENU
   MENUITEM Upper( "FieldNames" ) + "_EXPAND_FORM_ACTIONS"
      MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 EXPAND ;
         HEADERS "Name", "Type", "Length", "Decs" ACTION { | oI | MyAction( oI ) }
         //LEFTWIDTH if( lSys, 24, 1 ) ;
         //LOGOMENU "..\bitmaps\fivetechv.png" ;
      ENDMENU
   MENUITEM "EXIT" ACTION oWnd:End() WHEN ( !lPopup .and. !lSys )
   if lPopup
      ENDMENU
      if nC < oWnd:nRight - 400
         ACTIVATE MENU oMenu AT nR, nC OF oWnd  // Limit zone for show menu
      else
         oMenu:End()    // Release Menus created
      endif
   else
      if lSys
         SEPARATOR
         MENUITEM "Reset Menu"  ACTION oMenu:Reset()
         ENDSYSMENU
      else
         ENDMENU
      endif
   endif

Return oMenu

//----------------------------------------------------------------------------//

Function MyAction( oI )
     //oI:SetCheck(.T.)
     ? "Object Item: ", oI, ;
       "Position into Menu Parent: ", oI:nPos, ;
       "oItem cPrompt:", oI:cPrompt, ;
       "oItem Id: ", oI:nId, ;
       "Object Menu Parent of Item: ", oI:oMenu, ;
       "Position of Menu Parent: ", oI:oMenu:nPos
     ? "Object Menu Principal: ", Valtype( GetaMenusAux()[ 1 ] ), GetaMenusAux()[ 1 ]:lMenuBar
     ? "Items of Menu Principal: ", Len( GetaMenusAux()[ 1 ]:aMenuItems )
     ? "Menu Parent of Menu of Item Selected", GetParentAuxMenus( oI:oMenu ), ;
       "Items of this Menu: ", Len( GetParentAuxMenus( oI:oMenu ):aMenuItems ), ;
       "Separators, they are also counted"
     ? "Len Items Menu 5: ", Len( GetaMenusAux()[ 5 ]:aMenuItems )
     ? "Total Menus Create: ", Len( GetaMenusAux() )

Return nil

//----------------------------------------------------------------------------//

Function CtrlMove( oDlg )

   local oFontWD2
   local nRow      := oDlg:nBottom - 150
   local nCol      := oDlg:nRight  - 350
   local nSize     := 32
   local oSay

   @ nRow - 64, 20 GROUP TO nRow + 54, oDlg:nRight - 460 OF oDlg PIXEL PROMPT "  Notes:  "
   @ nRow - 64, oDlg:nRight - 450 GROUP TO nRow + 54, oDlg:nRight - 80 OF oDlg PIXEL PROMPT "  Menu " + Alias( 1 ) + " Changes: "
   @ nRow - 24, 80 SAY " - Press RIGHT BUTTON of Mouse for Test Menu POPUP: [ MAX -> oWnd:nRight - 400 ]" ;
      PIXEL OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
   @ nRow + 12, 80 SAY " - Press over ICON Application for Test SYSMENU" PIXEL ;
      OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
   @ nRow - 24, nCol - nSize - 24 SAY oSay PROMPT " Controls for movement: " + Alias( 1 ) PIXEL ;
      OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 230, 22

   oFontWD2 := TFont():New( 'Wingdings 3', 0, -21, .f., .f., 0, 0, 400, .f., .f., .f., 2,3, 2, 1,, 18 )
   @ nRow, nCol BTNBMP PROMPT Chr( HexToDec( "72" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT  ; //BITMAP aBmp[ 1 ]
      TOOLTIP FWString( "Top" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATTop() )
   @ nRow, nCol + nSize * 1 + 1 BTNBMP PROMPT Chr( HexToDec( "76" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Move Up" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( Retrocede() )
   @ nRow, nCol + nSize * 2 + 2 BTNBMP PROMPT Chr( HexToDec( "77" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Move Down" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( Avanza() )
   @ nRow, nCol + nSize * 3 + 3 BTNBMP PROMPT Chr( HexToDec( "73" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
      TOOLTIP FWString( "Bottom" ) + " " + Alias( 1 ) FONT oFontWD2  ACTION ( ATBottom() )
   oFontWD2:End()
   AEval( oDlg:aControls, { |o| If( o:ClassName() == "TBTNBMP", ( o:SetColor( CLR_WHITE, METRO_OLIVE ), o:nRound := 0 ), nil ) } )
Return nil

//----------------------------------------------------------------------------//

Function Avanza( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   //? oWnd:oMenu:hMenu, Len( GetaMenusAux()[ 1 ]:aMenuItems ), GetaMenusAux()[ 2 ]:aMenuItems[ 4 ]:cPrompt
   //? GetaMenusAux()[ 1 ]:aMenuItems[ 1 ]:bAction:hMenu, oMnu:hMenu
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * oMnu:nPage ) + 1 ) )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage++
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

Function Retrocede( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * ( oMnu:nPage - 2 ) ) + 1 ) )
         if ( Alias( nAr ) )->( !Bof() )
            oMnu:nPage--
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Bof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip( 1 ) )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )   

Return nil

//----------------------------------------------------------------------------//

Function ATTop( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTop() )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage := 1
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

Function ATBottom( nAr )

   local nRec    := ( Alias( 1 ) )->( RecNo() )
   local nPos    := 0
   local x
   local oMnu    := GetaMenusAux()[ 2 ]
   local n
   local aItems  := {}
   DEFAULT nAr   := 1
   if !Empty( oMnu )
      if oMnu:nLimit > 0
         ( Alias( nAr ) )->( DbGoTo( ( Alias( 1 ) )->( LastRec() ) - oMnu:nLimit + 1 ) )
         if ( Alias( nAr ) )->( !Eof() )
            oMnu:nPage := if( ( ( Alias( nAr ) )->( LastRec() ) % oMnu:nLimit ) = 0, ;
                              ( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ), ;
                              Int( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ) + 1 )
            aItems   := oMnu:aMenuItems
            x        := 0
            Do While ( Alias( nAr ) )->( !Eof() )
                x++
                if x > oMnu:nLimit
                   Exit
                endif
                For n = 1 to Len( oMnu:aCols )
                   aItems[ x +  ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
                Next n
                ( Alias( nAr ) )->( DbSkip() )
            Enddo
         endif
      endif
   endif
   ( Alias( nAr ) )->( DbGoTo( nRec ) )

Return nil

//----------------------------------------------------------------------------//

]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Natter]]> 2025-01-23T01:26:22-07:00 2025-01-23T01:26:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277146#p277146

Code: Select all | Expand

fld:={1,2}

  MENU oPop POPUP 2015  COLUMNS fld ;
    MENUITEM oCl  PROMPT {"one", "two"}
  ENDMENU
Thanks for your help. I tried to make a simple example. Everything works, but the menu has only 1 column that shows the glued values “one ‘+’two” What am I doing wrong?]]>

Code: Select all | Expand

fld:={1,2}

  MENU oPop POPUP 2015  COLUMNS fld ;
    MENUITEM oCl  PROMPT {"one", "two"}
  ENDMENU
Thanks for your help. I tried to make a simple example. Everything works, but the menu has only 1 column that shows the glued values “one ‘+’two” What am I doing wrong?]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Natter]]> 2025-01-23T11:39:11-07:00 2025-01-23T11:39:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277161#p277161 <![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Ariel]]> 2025-01-23T14:31:27-07:00 2025-01-23T14:31:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277168#p277168 <![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by cnavarro]]> 2025-01-23T18:33:47-07:00 2025-01-23T18:33:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277171#p277171
Natter wrote: Thu Jan 23, 2025 6:39 pm The array works fine. Why do some kind of initial column and separator between the columns appear ? Is it possible to get rid of them ?
Please run this sample and tell me your opinion

Code: Select all | Expand

//----------------------------------------------------------------------------//
#include "Fivewin.ch"
//----------------------------------------------------------------------------//

Function Main()

   local oWnd

   DEFINE WINDOW oWnd TITLE "Test Menu MultiColumn: " ;
      FROM 20, 40 TO 650, 1200 PIXEL

   oWnd:bRClicked  := { | nR, nC | MyPopMnu( oWnd, nR, nC ) }

   ACTIVATE WINDOW oWnd

Return nil

//----------------------------------------------------------------------------//

Function MyPopMnu( oWnd, nR, nC )

   local oPop

   MENU oPop POPUP 2015
      MENUITEM "Array" 
      MENU SELECT { { "one1", "two1" }, { "one2", "two2" } }  COLUMNS 1, 2 HEADERS "Col-1", "Col-2"
      ENDMENU
   ENDMENU
   ACTIVATE MENU oPop  AT nR, nC OF oWnd

Return oPop

//----------------------------------------------------------------------------//

]]>
Natter wrote: Thu Jan 23, 2025 6:39 pm The array works fine. Why do some kind of initial column and separator between the columns appear ? Is it possible to get rid of them ?
Please run this sample and tell me your opinion

Code: Select all | Expand

//----------------------------------------------------------------------------//
#include "Fivewin.ch"
//----------------------------------------------------------------------------//

Function Main()

   local oWnd

   DEFINE WINDOW oWnd TITLE "Test Menu MultiColumn: " ;
      FROM 20, 40 TO 650, 1200 PIXEL

   oWnd:bRClicked  := { | nR, nC | MyPopMnu( oWnd, nR, nC ) }

   ACTIVATE WINDOW oWnd

Return nil

//----------------------------------------------------------------------------//

Function MyPopMnu( oWnd, nR, nC )

   local oPop

   MENU oPop POPUP 2015
      MENUITEM "Array" 
      MENU SELECT { { "one1", "two1" }, { "one2", "two2" } }  COLUMNS 1, 2 HEADERS "Col-1", "Col-2"
      ENDMENU
   ENDMENU
   ACTIVATE MENU oPop  AT nR, nC OF oWnd

Return oPop

//----------------------------------------------------------------------------//

]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Natter]]> 2025-01-24T02:23:48-07:00 2025-01-24T02:23:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277173#p277173 <![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by cnavarro]]> 2025-01-24T16:56:50-07:00 2025-01-24T16:56:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277191#p277191
Image]]>

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: multi-column popup menu :: Reply by Natter]]> 2025-01-25T02:08:53-07:00 2025-01-25T02:08:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45334&p=277193#p277193
https://cloud.mail.ru/public/jnLg/3ETyhvUcV]]>

https://cloud.mail.ru/public/jnLg/3ETyhvUcV]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: New FWH 24.09 :: Reply by karinha]]> 2025-01-25T11:04:52-07:00 2025-01-25T11:04:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=44966&p=277202#p277202 <![CDATA[FiveWin for Harbour/xHarbour :: Using new Class TDeepSeek for documenting :: Author Antonio Linares]]> 2025-01-17T15:33:09-07:00 2025-01-17T15:33:09-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276974#p276974
### Class Documentation: `TAutoGet`

#### Overview
The `TAutoGet` class is a specialized version of the `TGet` class, designed to provide an auto-complete or drop-down list functionality for text input fields. It allows users to select from a list of predefined options as they type, enhancing user experience by reducing the need for manual input.

#### Inheritance
- **Parent Class**: `TGet`
- **Child Classes**: None

#### Data Members (Attributes)

1. **`aGradList`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for the list background.

2. **`aGradItem`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for individual items in the list.

3. **`nClrLine`**
- **Type**: Custom (Numeric)
- **Description**: Stores the color code for the line separating items in the list.

4. **`nClrText`**
- **Type**: Numeric
- **Description**: Stores the color code for the text in the list.

5. **`nClrSel`**
- **Type**: Numeric
- **Description**: Stores the color code for the selected item in the list.

6. **`uDataSource`**
- **Type**: Variant
- **Description**: Holds the data source for the list items (e.g., an array or hash).

7. **`uOrgData`**
- **Type**: Variant
- **Description**: Stores the original data source before any filtering or modification.

8. **`nDataType`**
- **Type**: Numeric
- **Description**: Indicates the type of data source (e.g., array, hash).

9. **`cField`**
- **Type**: Character
- **Description**: Specifies the field or key to be used from the data source.

10. **`oList`**
- **Type**: Object (TGetList)
- **Description**: Reference to the drop-down list object.

11. **`bCreateList`**
- **Type**: Block (Code Block)
- **Description**: Code block that defines how the list is created or filtered.

12. **`bCloseList`**
- **Type**: Block (Code Block)
- **Description**: Code block that defines actions to be taken when the list is closed.

13. **`nLHeight`**
- **Type**: Numeric
- **Description**: Specifies the height of the drop-down list.

#### Methods

1. **`New()`**
- **Description**: Constructor method for initializing a new `TAutoGet` object.
- **Parameters**:
- `nRow`, `nCol`: Position of the control.
- `bSetGet`: Code block for getting/setting the value.
- `oWnd`: Parent window.
- `nWidth`, `nHeight`: Dimensions of the control.
- `cPict`: Picture clause for formatting.
- `bValid`: Validation code block.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `oFont`: Font object.
- `lDesign`: Design mode flag.
- `oCursor`: Cursor object.
- `lPixel`: Pixel mode flag.
- `cMsg`: Tooltip message.
- `lUpdate`: Update flag.
- `bWhen`: Condition code block.
- `lCenter`, `lRight`: Alignment flags.
- `bChanged`: Change event code block.
- `lReadOnly`: Read-only flag.
- `lPassword`: Password mode flag.
- `lNoBorder`: Borderless flag.
- `nHelpId`: Help ID.
- `lSpinner`: Spinner flag.
- `bUp`, `bDown`, `bMin`, `bMax`: Code blocks for spinner actions.
- `bAction`: Action code block.
- `cBmpName`: Bitmap name.
- `cVarName`: Variable name.
- `cCueText`: Cue text.
- `uDataSrc`: Data source.
- `Flds`: Field or key to use.
- `nLHeight`: List height.
- `bCreateList`: Code block for creating the list.
- `aGradList`, `aGradItem`: Gradient information.
- `nClrLine`, `nClrText`, `nClrSel`: Color codes.
- **Returns**: Self (the initialized object).

2. **`ReDefine()`**
- **Description**: Re-defines an existing `TAutoGet` object with new properties.
- **Parameters**: Similar to `New()`.
- **Returns**: Self (the redefined object).

3. **`CloseList()`**
- **Description**: Closes the drop-down list.
- **Returns**: None.

4. **`CreateList()`**
- **Description**: Creates and displays the drop-down list.
- **Returns**: None.

5. **`KeyChar()`**
- **Description**: Handles key press events to open the list.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: None.

6. **`KeyDown()`**
- **Description**: Handles key down events for navigation within the list.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: Numeric (status code).

7. **`OpenList()`**
- **Description**: Opens the drop-down list based on user input.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: Numeric (status code).

8. **`LostFocus()`**
- **Description**: Handles the event when the control loses focus.
- **Parameters**: `hWndLost`.
- **Returns**: Result from the parent class's `LostFocus` method.

9. **`MouseWheel()`**
- **Description**: Handles mouse wheel events for scrolling the list.
- **Parameters**: `nKeys`, `nDelta`, `nXPos`, `nYPos`.
- **Returns**: None.

10. **`SetList()`**
- **Description**: Sets the data source and field for the list.
- **Parameters**: `uDataSource`, `cField`.
- **Returns**: None.

11. **`ValidList()`**
- **Description**: Checks if the list is valid and open.
- **Returns**: Logical (`.T.` if valid, `.F.` otherwise).

### Class Documentation: `TGetList`

#### Overview
The `TGetList` class is a helper class used by `TAutoGet` to manage the drop-down list. It handles the display, navigation, and selection of items in the list.

#### Inheritance
- **Parent Class**: `TControl`
- **Child Classes**: None

#### Data Members (Attributes)

1. **`aGradList`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for the list background.

2. **`aGradItem`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for individual items in the list.

3. **`nClrLine`**
- **Type**: Custom (Numeric)
- **Description**: Stores the color code for the line separating items in the list.

4. **`nClrText`**
- **Type**: Numeric
- **Description**: Stores the color code for the text in the list.

5. **`nClrSel`**
- **Type**: Numeric
- **Description**: Stores the color code for the selected item in the list.

6. **`uOrgValue`**
- **Type**: Variant
- **Description**: Stores the original value before any selection.

7. **`bKeyCount`**
- **Type**: Block (Code Block)
- **Description**: Code block that returns the number of items in the list.

8. **`bData`**
- **Type**: Block (Code Block)
- **Description**: Code block that retrieves data for a specific item.

9. **`lSBVisible`**
- **Type**: Logical
- **Description**: Indicates if the scrollbar is visible.

10. **`nDataType`**
- **Type**: Numeric
- **Description**: Indicates the type of data source (e.g., array, hash).

11. **`nRowHeight`**
- **Type**: Numeric
- **Description**: Height of each row in the list.

12. **`nMaxHeight`**
- **Type**: Numeric
- **Description**: Maximum height of the list.

13. **`oGet`**
- **Type**: Object (TAutoGet)
- **Description**: Reference to the parent `TAutoGet` object.

14. **`nFirstRow`**
- **Type**: Numeric
- **Description**: Index of the first visible row in the list.

15. **`nRecNo`**
- **Type**: Numeric
- **Description**: Current record number in the data source.

16. **`nRowAt`**
- **Type**: Numeric
- **Description**: Index of the currently selected row.

#### Methods

1. **`New()`**
- **Description**: Constructor method for initializing a new `TGetList` object.
- **Parameters**:
- `nTop`, `nLeft`: Position of the list.
- `oWnd`: Parent window.
- `nWidth`, `nHeight`: Dimensions of the list.
- `oGet`: Reference to the parent `TAutoGet` object.
- `aGradItem`, `aGradList`: Gradient information.
- `nClrLine`, `nClrText`, `nClrSel`: Color codes.
- **Returns**: Self (the initialized object).

2. **`Adjust()`**
- **Description**: Adjusts the size and position of the list.
- **Returns**: None.

3. **`KeyCount()`**
- **Description**: Returns the number of items in the list.
- **Returns**: Numeric (count of items).

4. **`Display()`**
- **Description**: Handles the display of the list.
- **Returns**: Numeric (status code).

5. **`EraseBkGnd()`**
- **Description**: Handles background erasure.
- **Returns**: Numeric (status code).

6. **`GetRowAt()`**
- **Description**: Returns the row index at a given position.
- **Parameters**: `nRow`.
- **Returns**: Numeric (row index).

7. **`GoDown()`**
- **Description**: Moves the selection down in the list.
- **Returns**: None.

8. **`GoUp()`**
- **Description**: Moves the selection up in the list.
- **Returns**: None.

9. **`HandleEvent()`**
- **Description**: Handles various events for the list.
- **Parameters**: `nMsg`, `nWParam`, `nLParam`.
- **Returns**: Result from the parent class's `HandleEvent` method.

10. **`LButtonUp()`**
- **Description**: Handles left mouse button up events.
- **Parameters**: `nRow`, `nCol`.
- **Returns**: None.

11. **`MouseLeave()`**
- **Description**: Handles mouse leave events.
- **Returns**: None.

12. **`MouseMove()`**
- **Description**: Handles mouse move events.
- **Parameters**: `nRow`, `nCol`, `nFlags`.
- **Returns**: Result from the parent class's `MouseMove` method.

13. **`Paint()`**
- **Description**: Handles the painting of the list.
- **Returns**: None.

14. **`PaintData()`**
- **Description**: Paints individual items in the list.
- **Parameters**: `hDC`, `nAtItem`.
- **Returns**: None.

15. **`SetList()`**
- **Description**: Sets the data source and field for the list.
- **Parameters**: `uDataSource`, `cField`.
- **Returns**: None.

16. **`RowCount()`**
- **Description**: Returns the number of visible rows in the list.
- **Returns**: Numeric (count of visible rows).

### Additional Functions

1. **`FontHeight()`**
- **Description**: Calculates the height of the font used in the list.
- **Parameters**: `oObj`, `oFont`.
- **Returns**: Numeric (font height).

2. **`IsRecordSet()`**
- **Description**: Checks if the given object is a recordset (unused in the provided code).
- **Parameters**: `o`.
- **Returns**: Logical (`.T.` if the object is a recordset, `.F.` otherwise).

### Summary
The `TAutoGet` and `TGetList` classes work together to provide a user-friendly auto-complete or drop-down list functionality. `TAutoGet` manages the input field and interactions, while `TGetList` handles the display and navigation of the list items. The classes are highly customizable, allowing for different data sources, colors, and gradients to be used.
]]>
### Class Documentation: `TAutoGet`

#### Overview
The `TAutoGet` class is a specialized version of the `TGet` class, designed to provide an auto-complete or drop-down list functionality for text input fields. It allows users to select from a list of predefined options as they type, enhancing user experience by reducing the need for manual input.

#### Inheritance
- **Parent Class**: `TGet`
- **Child Classes**: None

#### Data Members (Attributes)

1. **`aGradList`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for the list background.

2. **`aGradItem`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for individual items in the list.

3. **`nClrLine`**
- **Type**: Custom (Numeric)
- **Description**: Stores the color code for the line separating items in the list.

4. **`nClrText`**
- **Type**: Numeric
- **Description**: Stores the color code for the text in the list.

5. **`nClrSel`**
- **Type**: Numeric
- **Description**: Stores the color code for the selected item in the list.

6. **`uDataSource`**
- **Type**: Variant
- **Description**: Holds the data source for the list items (e.g., an array or hash).

7. **`uOrgData`**
- **Type**: Variant
- **Description**: Stores the original data source before any filtering or modification.

8. **`nDataType`**
- **Type**: Numeric
- **Description**: Indicates the type of data source (e.g., array, hash).

9. **`cField`**
- **Type**: Character
- **Description**: Specifies the field or key to be used from the data source.

10. **`oList`**
- **Type**: Object (TGetList)
- **Description**: Reference to the drop-down list object.

11. **`bCreateList`**
- **Type**: Block (Code Block)
- **Description**: Code block that defines how the list is created or filtered.

12. **`bCloseList`**
- **Type**: Block (Code Block)
- **Description**: Code block that defines actions to be taken when the list is closed.

13. **`nLHeight`**
- **Type**: Numeric
- **Description**: Specifies the height of the drop-down list.

#### Methods

1. **`New()`**
- **Description**: Constructor method for initializing a new `TAutoGet` object.
- **Parameters**:
- `nRow`, `nCol`: Position of the control.
- `bSetGet`: Code block for getting/setting the value.
- `oWnd`: Parent window.
- `nWidth`, `nHeight`: Dimensions of the control.
- `cPict`: Picture clause for formatting.
- `bValid`: Validation code block.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `oFont`: Font object.
- `lDesign`: Design mode flag.
- `oCursor`: Cursor object.
- `lPixel`: Pixel mode flag.
- `cMsg`: Tooltip message.
- `lUpdate`: Update flag.
- `bWhen`: Condition code block.
- `lCenter`, `lRight`: Alignment flags.
- `bChanged`: Change event code block.
- `lReadOnly`: Read-only flag.
- `lPassword`: Password mode flag.
- `lNoBorder`: Borderless flag.
- `nHelpId`: Help ID.
- `lSpinner`: Spinner flag.
- `bUp`, `bDown`, `bMin`, `bMax`: Code blocks for spinner actions.
- `bAction`: Action code block.
- `cBmpName`: Bitmap name.
- `cVarName`: Variable name.
- `cCueText`: Cue text.
- `uDataSrc`: Data source.
- `Flds`: Field or key to use.
- `nLHeight`: List height.
- `bCreateList`: Code block for creating the list.
- `aGradList`, `aGradItem`: Gradient information.
- `nClrLine`, `nClrText`, `nClrSel`: Color codes.
- **Returns**: Self (the initialized object).

2. **`ReDefine()`**
- **Description**: Re-defines an existing `TAutoGet` object with new properties.
- **Parameters**: Similar to `New()`.
- **Returns**: Self (the redefined object).

3. **`CloseList()`**
- **Description**: Closes the drop-down list.
- **Returns**: None.

4. **`CreateList()`**
- **Description**: Creates and displays the drop-down list.
- **Returns**: None.

5. **`KeyChar()`**
- **Description**: Handles key press events to open the list.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: None.

6. **`KeyDown()`**
- **Description**: Handles key down events for navigation within the list.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: Numeric (status code).

7. **`OpenList()`**
- **Description**: Opens the drop-down list based on user input.
- **Parameters**: `nKey`, `nFlags`.
- **Returns**: Numeric (status code).

8. **`LostFocus()`**
- **Description**: Handles the event when the control loses focus.
- **Parameters**: `hWndLost`.
- **Returns**: Result from the parent class's `LostFocus` method.

9. **`MouseWheel()`**
- **Description**: Handles mouse wheel events for scrolling the list.
- **Parameters**: `nKeys`, `nDelta`, `nXPos`, `nYPos`.
- **Returns**: None.

10. **`SetList()`**
- **Description**: Sets the data source and field for the list.
- **Parameters**: `uDataSource`, `cField`.
- **Returns**: None.

11. **`ValidList()`**
- **Description**: Checks if the list is valid and open.
- **Returns**: Logical (`.T.` if valid, `.F.` otherwise).

### Class Documentation: `TGetList`

#### Overview
The `TGetList` class is a helper class used by `TAutoGet` to manage the drop-down list. It handles the display, navigation, and selection of items in the list.

#### Inheritance
- **Parent Class**: `TControl`
- **Child Classes**: None

#### Data Members (Attributes)

1. **`aGradList`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for the list background.

2. **`aGradItem`**
- **Type**: Custom (Array)
- **Description**: Stores gradient information for individual items in the list.

3. **`nClrLine`**
- **Type**: Custom (Numeric)
- **Description**: Stores the color code for the line separating items in the list.

4. **`nClrText`**
- **Type**: Numeric
- **Description**: Stores the color code for the text in the list.

5. **`nClrSel`**
- **Type**: Numeric
- **Description**: Stores the color code for the selected item in the list.

6. **`uOrgValue`**
- **Type**: Variant
- **Description**: Stores the original value before any selection.

7. **`bKeyCount`**
- **Type**: Block (Code Block)
- **Description**: Code block that returns the number of items in the list.

8. **`bData`**
- **Type**: Block (Code Block)
- **Description**: Code block that retrieves data for a specific item.

9. **`lSBVisible`**
- **Type**: Logical
- **Description**: Indicates if the scrollbar is visible.

10. **`nDataType`**
- **Type**: Numeric
- **Description**: Indicates the type of data source (e.g., array, hash).

11. **`nRowHeight`**
- **Type**: Numeric
- **Description**: Height of each row in the list.

12. **`nMaxHeight`**
- **Type**: Numeric
- **Description**: Maximum height of the list.

13. **`oGet`**
- **Type**: Object (TAutoGet)
- **Description**: Reference to the parent `TAutoGet` object.

14. **`nFirstRow`**
- **Type**: Numeric
- **Description**: Index of the first visible row in the list.

15. **`nRecNo`**
- **Type**: Numeric
- **Description**: Current record number in the data source.

16. **`nRowAt`**
- **Type**: Numeric
- **Description**: Index of the currently selected row.

#### Methods

1. **`New()`**
- **Description**: Constructor method for initializing a new `TGetList` object.
- **Parameters**:
- `nTop`, `nLeft`: Position of the list.
- `oWnd`: Parent window.
- `nWidth`, `nHeight`: Dimensions of the list.
- `oGet`: Reference to the parent `TAutoGet` object.
- `aGradItem`, `aGradList`: Gradient information.
- `nClrLine`, `nClrText`, `nClrSel`: Color codes.
- **Returns**: Self (the initialized object).

2. **`Adjust()`**
- **Description**: Adjusts the size and position of the list.
- **Returns**: None.

3. **`KeyCount()`**
- **Description**: Returns the number of items in the list.
- **Returns**: Numeric (count of items).

4. **`Display()`**
- **Description**: Handles the display of the list.
- **Returns**: Numeric (status code).

5. **`EraseBkGnd()`**
- **Description**: Handles background erasure.
- **Returns**: Numeric (status code).

6. **`GetRowAt()`**
- **Description**: Returns the row index at a given position.
- **Parameters**: `nRow`.
- **Returns**: Numeric (row index).

7. **`GoDown()`**
- **Description**: Moves the selection down in the list.
- **Returns**: None.

8. **`GoUp()`**
- **Description**: Moves the selection up in the list.
- **Returns**: None.

9. **`HandleEvent()`**
- **Description**: Handles various events for the list.
- **Parameters**: `nMsg`, `nWParam`, `nLParam`.
- **Returns**: Result from the parent class's `HandleEvent` method.

10. **`LButtonUp()`**
- **Description**: Handles left mouse button up events.
- **Parameters**: `nRow`, `nCol`.
- **Returns**: None.

11. **`MouseLeave()`**
- **Description**: Handles mouse leave events.
- **Returns**: None.

12. **`MouseMove()`**
- **Description**: Handles mouse move events.
- **Parameters**: `nRow`, `nCol`, `nFlags`.
- **Returns**: Result from the parent class's `MouseMove` method.

13. **`Paint()`**
- **Description**: Handles the painting of the list.
- **Returns**: None.

14. **`PaintData()`**
- **Description**: Paints individual items in the list.
- **Parameters**: `hDC`, `nAtItem`.
- **Returns**: None.

15. **`SetList()`**
- **Description**: Sets the data source and field for the list.
- **Parameters**: `uDataSource`, `cField`.
- **Returns**: None.

16. **`RowCount()`**
- **Description**: Returns the number of visible rows in the list.
- **Returns**: Numeric (count of visible rows).

### Additional Functions

1. **`FontHeight()`**
- **Description**: Calculates the height of the font used in the list.
- **Parameters**: `oObj`, `oFont`.
- **Returns**: Numeric (font height).

2. **`IsRecordSet()`**
- **Description**: Checks if the given object is a recordset (unused in the provided code).
- **Parameters**: `o`.
- **Returns**: Logical (`.T.` if the object is a recordset, `.F.` otherwise).

### Summary
The `TAutoGet` and `TGetList` classes work together to provide a user-friendly auto-complete or drop-down list functionality. `TAutoGet` manages the input field and interactions, while `TGetList` handles the display and navigation of the list items. The classes are highly customizable, allowing for different data sources, colors, and gradients to be used.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:35:30-07:00 2025-01-17T15:35:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276975#p276975
### Class Documentation: `TActiveX`

#### Overview
The `TActiveX` class is part of the FiveWin library, designed to support ActiveX controls in Windows applications. It provides a framework for embedding and interacting with ActiveX controls within a FiveWin application. The class handles the creation, management, and interaction with ActiveX controls, including property access, method invocation, and event handling.

#### Class Hierarchy
- **Parent Class**: `TControl`
- **Child Classes**: `THActiveX`

#### Class Data Members (CLASSDATA)
- **`lRegistered`**: A logical flag indicating whether the ActiveX control has been registered.

#### Data Members (DATA)
- **`hActiveX`**: Handle to the ActiveX control.
- **`cProgID`**: The ProgID (Programmatic Identifier) of the ActiveX control.
- **`cString`**: A string representation of the ActiveX control's CLSID (Class Identifier).
- **`aProperties`**: An array holding the properties of the ActiveX control.
- **`aMethods`**: An array holding the methods of the ActiveX control.
- **`aEvents`**: An array holding the events of the ActiveX control.
- **`bOnEvent`**: A code block that is executed when an event is triggered.
- **`oOleAuto`**: An instance of `TOleAuto`, used for OLE automation.

#### Methods (METHODS)
- **`New( oWnd, cProgID, nRow, nCol, nWidth, nHeight )`**: Constructor method for creating a new instance of `TActiveX`. It initializes the control with the specified ProgID, position, and dimensions.
- **Parameters**:
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- `nRow`, `nCol`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`ReDefine( nId, oWnd, cProgID )`**: Constructor method for redefining an existing ActiveX control.
- **Parameters**:
- `nId`: The control ID.
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- **Returns**: Self.

- **`Do( ... )`**: Invokes a method on the ActiveX control.
- **Parameters**: Variable arguments depending on the method being invoked.
- **Returns**: The result of the method invocation.

- **`Display()`**: Displays the ActiveX control by calling `BeginPaint()`, `Paint()`, and `EndPaint()`.
- **Returns**: 0.

- **`EraseBkGnd()`**: Handles the background erasure of the control.
- **Returns**: 1.

- **`GetProp( cPropName )`**: Retrieves a property value from the ActiveX control.
- **Parameters**:
- `cPropName`: The name of the property to retrieve.
- **Returns**: The value of the property.

- **`Initiate( hDlg )`**: Initializes the ActiveX control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

- **`OnEvent( nEvent, aParams, pParams )`**: Handles events triggered by the ActiveX control.
- **Parameters**:
- `nEvent`: The event ID.
- `aParams`: An array of parameters associated with the event.
- `pParams`: Additional parameters.
- **Returns**: `nil`.

- **`ReadTypes()`**: Reads the type information (properties, methods, events) of the ActiveX control from the registry.
- **Returns**: `nil`.

- **`ReSize( nFlags, nWidth, nHeight )`**: Resizes the ActiveX control.
- **Parameters**:
- `nFlags`: Resize flags.
- `nWidth`: New width.
- `nHeight`: New height.
- **Returns**: The result of `ActXSetLocation`.

- **`SetProp( cPropName, uParam1 )`**: Sets a property value on the ActiveX control.
- **Parameters**:
- `cPropName`: The name of the property to set.
- `uParam1`: The value to set.
- **Returns**: The result of the property setting.

- **`Destroy()`**: Destroys the ActiveX control and releases resources.
- **Returns**: The result of the parent class's `Destroy` method.

- **`OnError( ... )`**: Error handler for method calls on the ActiveX control.
- **Parameters**: Variable arguments depending on the error.
- **Returns**: The result of the error handling.

### Class Documentation: `THActiveX`

#### Overview
The `THActiveX` class is a specialized version of `TActiveX` designed to handle ActiveX controls in a more advanced manner, particularly for 64-bit environments. It extends the functionality of `TActiveX` with additional methods and properties.

#### Class Data Members (CLASSDATA)
- **`lRegistered`**: A logical flag indicating whether the ActiveX control has been registered.

#### Data Members (DATA)
- **`oOleAuto`**: An instance of `TOleAuto`, used for OLE automation.
- **`hWndPtr`**: Pointer to the window handle of the ActiveX control.
- **`cProgID`**: The ProgID of the ActiveX control.
- **`cString`**: A string representation of the ActiveX control's CLSID.
- **`bOnEvent`**: A code block that is executed when an event is triggered.
- **`aProperties`**: An array holding the properties of the ActiveX control.
- **`aMethods`**: An array holding the methods of the ActiveX control.
- **`aEvents`**: An array holding the events of the ActiveX control.

#### Methods (METHODS)
- **`New( oWnd, cProgID, nRow, nCol, nWidth, nHeight )`**: Constructor method for creating a new instance of `THActiveX`.
- **Parameters**:
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- `nRow`, `nCol`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`Init( hWnd, cProgId, nTop, nLeft, nWidth, nHeight )`**: Initializes the ActiveX control.
- **Parameters**:
- `hWnd`: Handle to the window.
- `cProgId`: The ProgID of the ActiveX control.
- `nTop`, `nLeft`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`Initiate( hDlg )`**: Initializes the ActiveX control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

- **`ReDefine( nId, oWnd, cProgID )`**: Constructor method for redefining an existing ActiveX control.
- **Parameters**:
- `nId`: The control ID.
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- **Returns**: Self.

- **`cToChar()`**: Converts the control to a character representation.
- **Returns**: The string "AtlAxWin".

- **`Do( ... )`**: Invokes a method on the ActiveX control.
- **Parameters**: Variable arguments depending on the method being invoked.
- **Returns**: The result of the method invocation.

- **`Event( ... )`**: Handles events triggered by the ActiveX control.
- **Parameters**: Variable arguments depending on the event.
- **Returns**: `nil`.

- **`OnError()`**: Error handler for method calls on the ActiveX control.
- **Returns**: The result of the error handling.

- **`Destroy()`**: Destroys the ActiveX control and releases resources.
- **Returns**: The result of the parent class's `Destroy` method.

- **`ReadTypes()`**: Reads the type information (properties, methods, events) of the ActiveX control from the registry.
- **Returns**: `nil`.

### Summary
The `TActiveX` and `THActiveX` classes provide a robust framework for embedding and interacting with ActiveX controls in FiveWin applications. They handle the creation, management, and interaction with ActiveX controls, including property access, method invocation, and event handling. The classes are designed to work seamlessly in both 32-bit and 64-bit environments, making them versatile tools for Windows application development.
]]>
### Class Documentation: `TActiveX`

#### Overview
The `TActiveX` class is part of the FiveWin library, designed to support ActiveX controls in Windows applications. It provides a framework for embedding and interacting with ActiveX controls within a FiveWin application. The class handles the creation, management, and interaction with ActiveX controls, including property access, method invocation, and event handling.

#### Class Hierarchy
- **Parent Class**: `TControl`
- **Child Classes**: `THActiveX`

#### Class Data Members (CLASSDATA)
- **`lRegistered`**: A logical flag indicating whether the ActiveX control has been registered.

#### Data Members (DATA)
- **`hActiveX`**: Handle to the ActiveX control.
- **`cProgID`**: The ProgID (Programmatic Identifier) of the ActiveX control.
- **`cString`**: A string representation of the ActiveX control's CLSID (Class Identifier).
- **`aProperties`**: An array holding the properties of the ActiveX control.
- **`aMethods`**: An array holding the methods of the ActiveX control.
- **`aEvents`**: An array holding the events of the ActiveX control.
- **`bOnEvent`**: A code block that is executed when an event is triggered.
- **`oOleAuto`**: An instance of `TOleAuto`, used for OLE automation.

#### Methods (METHODS)
- **`New( oWnd, cProgID, nRow, nCol, nWidth, nHeight )`**: Constructor method for creating a new instance of `TActiveX`. It initializes the control with the specified ProgID, position, and dimensions.
- **Parameters**:
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- `nRow`, `nCol`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`ReDefine( nId, oWnd, cProgID )`**: Constructor method for redefining an existing ActiveX control.
- **Parameters**:
- `nId`: The control ID.
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- **Returns**: Self.

- **`Do( ... )`**: Invokes a method on the ActiveX control.
- **Parameters**: Variable arguments depending on the method being invoked.
- **Returns**: The result of the method invocation.

- **`Display()`**: Displays the ActiveX control by calling `BeginPaint()`, `Paint()`, and `EndPaint()`.
- **Returns**: 0.

- **`EraseBkGnd()`**: Handles the background erasure of the control.
- **Returns**: 1.

- **`GetProp( cPropName )`**: Retrieves a property value from the ActiveX control.
- **Parameters**:
- `cPropName`: The name of the property to retrieve.
- **Returns**: The value of the property.

- **`Initiate( hDlg )`**: Initializes the ActiveX control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

- **`OnEvent( nEvent, aParams, pParams )`**: Handles events triggered by the ActiveX control.
- **Parameters**:
- `nEvent`: The event ID.
- `aParams`: An array of parameters associated with the event.
- `pParams`: Additional parameters.
- **Returns**: `nil`.

- **`ReadTypes()`**: Reads the type information (properties, methods, events) of the ActiveX control from the registry.
- **Returns**: `nil`.

- **`ReSize( nFlags, nWidth, nHeight )`**: Resizes the ActiveX control.
- **Parameters**:
- `nFlags`: Resize flags.
- `nWidth`: New width.
- `nHeight`: New height.
- **Returns**: The result of `ActXSetLocation`.

- **`SetProp( cPropName, uParam1 )`**: Sets a property value on the ActiveX control.
- **Parameters**:
- `cPropName`: The name of the property to set.
- `uParam1`: The value to set.
- **Returns**: The result of the property setting.

- **`Destroy()`**: Destroys the ActiveX control and releases resources.
- **Returns**: The result of the parent class's `Destroy` method.

- **`OnError( ... )`**: Error handler for method calls on the ActiveX control.
- **Parameters**: Variable arguments depending on the error.
- **Returns**: The result of the error handling.

### Class Documentation: `THActiveX`

#### Overview
The `THActiveX` class is a specialized version of `TActiveX` designed to handle ActiveX controls in a more advanced manner, particularly for 64-bit environments. It extends the functionality of `TActiveX` with additional methods and properties.

#### Class Data Members (CLASSDATA)
- **`lRegistered`**: A logical flag indicating whether the ActiveX control has been registered.

#### Data Members (DATA)
- **`oOleAuto`**: An instance of `TOleAuto`, used for OLE automation.
- **`hWndPtr`**: Pointer to the window handle of the ActiveX control.
- **`cProgID`**: The ProgID of the ActiveX control.
- **`cString`**: A string representation of the ActiveX control's CLSID.
- **`bOnEvent`**: A code block that is executed when an event is triggered.
- **`aProperties`**: An array holding the properties of the ActiveX control.
- **`aMethods`**: An array holding the methods of the ActiveX control.
- **`aEvents`**: An array holding the events of the ActiveX control.

#### Methods (METHODS)
- **`New( oWnd, cProgID, nRow, nCol, nWidth, nHeight )`**: Constructor method for creating a new instance of `THActiveX`.
- **Parameters**:
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- `nRow`, `nCol`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`Init( hWnd, cProgId, nTop, nLeft, nWidth, nHeight )`**: Initializes the ActiveX control.
- **Parameters**:
- `hWnd`: Handle to the window.
- `cProgId`: The ProgID of the ActiveX control.
- `nTop`, `nLeft`: The position of the control.
- `nWidth`, `nHeight`: The size of the control.
- **Returns**: Self.

- **`Initiate( hDlg )`**: Initializes the ActiveX control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

- **`ReDefine( nId, oWnd, cProgID )`**: Constructor method for redefining an existing ActiveX control.
- **Parameters**:
- `nId`: The control ID.
- `oWnd`: The parent window.
- `cProgID`: The ProgID of the ActiveX control.
- **Returns**: Self.

- **`cToChar()`**: Converts the control to a character representation.
- **Returns**: The string "AtlAxWin".

- **`Do( ... )`**: Invokes a method on the ActiveX control.
- **Parameters**: Variable arguments depending on the method being invoked.
- **Returns**: The result of the method invocation.

- **`Event( ... )`**: Handles events triggered by the ActiveX control.
- **Parameters**: Variable arguments depending on the event.
- **Returns**: `nil`.

- **`OnError()`**: Error handler for method calls on the ActiveX control.
- **Returns**: The result of the error handling.

- **`Destroy()`**: Destroys the ActiveX control and releases resources.
- **Returns**: The result of the parent class's `Destroy` method.

- **`ReadTypes()`**: Reads the type information (properties, methods, events) of the ActiveX control from the registry.
- **Returns**: `nil`.

### Summary
The `TActiveX` and `THActiveX` classes provide a robust framework for embedding and interacting with ActiveX controls in FiveWin applications. They handle the creation, management, and interaction with ActiveX controls, including property access, method invocation, and event handling. The classes are designed to work seamlessly in both 32-bit and 64-bit environments, making them versatile tools for Windows application development.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:37:41-07:00 2025-01-17T15:37:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276976#p276976
### Class Documentation: `TBar`

#### Overview
The `TBar` class is a custom control class in the FiveWin framework, designed to create and manage button bars. These button bars can be positioned at the top, bottom, left, or right of a window, or they can be floating. The class provides functionality to add, remove, and manage buttons and groups of buttons, as well as to customize the appearance and behavior of the button bar.

#### Data Members (DATA)

1. **`nGroups`**:
- **Type**: Numeric
- **Description**: Stores the number of groups in the button bar.

2. **`nMode`**:
- **Type**: Numeric
- **Description**: Indicates the current mode of the button bar (e.g., TOP, LEFT, RIGHT, BOTTOM, FLOAT).

3. **`nBtnWidth`**:
- **Type**: Numeric
- **Description**: Width of the buttons in the button bar.

4. **`nBtnHeight`**:
- **Type**: Numeric
- **Description**: Height of the buttons in the button bar.

5. **`aBmpRect`**:
- **Type**: Array
- **Description**: Stores the rectangle coordinates for bitmap buttons.

6. **`l3D`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar has a 3D appearance.

7. **`l97Look`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar should have a Windows 97-style look.

8. **`l2007`, `l2010`, `l2013`, `l2015`**:
- **Type**: Logical
- **Description**: Flags to indicate if the button bar should have the appearance of Office 2007, 2010, 2013, or 2015.

9. **`lLegacyLook`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar should use a legacy look.

10. **`bClrGrad`**:
- **Type**: Codeblock
- **Description**: Codeblock that defines the gradient colors for the button bar.

11. **`bColorMap`**:
- **Type**: Codeblock
- **Description**: Codeblock that defines the color mapping for the button bar.

12. **`nGroupSep`**:
- **Type**: Numeric
- **Description**: Separation between groups of buttons.

13. **`lBorder`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar has a border.

14. **`lGDIP`**:
- **Type**: Logical
- **Description**: Indicates whether GDI+ is used for rendering.

15. **`oGrpFont`**:
- **Type**: Object
- **Description**: Font object used for group labels.

16. **`lResource`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar is created from a resource.

#### Methods (METHOD)

1. **`New()`**:
- **Description**: Constructor for creating a new `TBar` instance.
- **Parameters**:
- `oWnd`: Parent window.
- `nBtnWidth`: Width of buttons.
- `nBtnHeight`: Height of buttons.
- `l3D`: 3D appearance flag.
- `cMode`: Mode of the button bar (TOP, LEFT, RIGHT, BOTTOM, FLOAT).
- `oCursor`: Cursor object.
- `l2007`, `l2010`, `l2013`, `l2015`: Office style flags.
- `lBorder`: Border flag.
- `oBrush`: Brush object.
- `aGrad`: Gradient array.
- `nColor`: Color value.
- `lHScroll`: Horizontal scroll flag.
- `nAlto`: Height adjustment.
- `lGDIP`: GDI+ flag.
- `lDesign`: Design mode flag.
- `cVarName`: Variable name for the button bar.

2. **`NewAt()`**:
- **Description**: Constructor for creating a `TBar` at a specific position.
- **Parameters**: Similar to `New()`, but with additional position parameters (`nRow`, `nCol`, `nWidth`, `nHeight`).

3. **`Add()`**:
- **Description**: Adds a button to the button bar.
- **Parameters**:
- `oBtnBmp`: Button object.
- `nPos`: Position to add the button.

4. **`AddGroup()`**:
- **Description**: Adds a group of buttons to the button bar.
- **Parameters**:
- `nPos`: Position to add the group.

5. **`Adjust()`**:
- **Description**: Adjusts the button bar's layout.

6. **`BtnAdjust()`**:
- **Description**: Adjusts the positions of buttons within the button bar.
- **Parameters**:
- `lRefresh`: Refresh flag.

7. **`Del()`**:
- **Description**: Deletes a button from the button bar.
- **Parameters**:
- `nPos`: Position of the button to delete.
- `lRefresh`: Refresh flag.

8. **`DelGroup()`**:
- **Description**: Deletes a group of buttons from the button bar.
- **Parameters**:
- `nPos`: Position of the group to delete.

9. **`Display()`**:
- **Description**: Displays the button bar by painting it.

10. **`EraseBkGnd()`**:
- **Description**: Erases the background of the button bar.

11. **`FastEditItems()`**:
- **Description**: Provides fast edit options for the button bar.

12. **`Float()`**:
- **Description**: Makes the button bar float.

13. **`GoDown()`**:
- **Description**: Moves the button bar to the bottom of the window.

14. **`GoLeft()`**:
- **Description**: Moves the button bar to the left side of the window.

15. **`GoRight()`**:
- **Description**: Moves the button bar to the right side of the window.

16. **`GoTop()`**:
- **Description**: Moves the button bar to the top of the window.

17. **`cGenPRG()`**:
- **Description**: Generates PRG code for the button bar.
- **Parameters**:
- `lDlgUnits`: Dialog units flag.

18. **`GetBtnTop()`**:
- **Description**: Gets the top position of a button.
- **Parameters**:
- `lNewGroup`: New group flag.

19. **`GetBtnLeft()`**:
- **Description**: Gets the left position of a button.
- **Parameters**:
- `lNewGroup`: New group flag.
- `nInd`: Index of the button.

20. **`Html()`**:
- **Description**: Generates HTML code for the button bar.

21. **`RePosRightBtns()`**:
- **Description**: Repositions buttons on the right side of the button bar.

22. **`RButtonDown()`**:
- **Description**: Handles right-click events on the button bar.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `nFlags`: Flags.

23. **`SaveIni()`**:
- **Description**: Saves the button bar configuration to an INI file.
- **Parameters**:
- `cBarName`: Name of the button bar.
- `cFile`: File name.

24. **`MouseMove()`**:
- **Description**: Handles mouse move events.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `nKeyFlags`: Key flags.

25. **`FillArea()`**:
- **Description**: Fills a specific area of the button bar.
- **Parameters**:
- `aRect`: Rectangle coordinates.
- `uFill`: Fill value.

26. **`Paint()`**:
- **Description**: Paints the button bar.

27. **`CloseGroup()`**:
- **Description**: Closes a group of buttons.
- **Parameters**:
- `oGrp`: Group object.
- `nSep`: Separation value.
- `hDarkPen`: Dark pen handle.
- `hLightPen`: Light pen handle.
- `lLabelSpace`: Label space flag.
- `lRight`: Right flag.

28. **`PaintSeparator()`**:
- **Description**: Paints a separator between groups.
- **Parameters**:
- `nPos`: Position.
- `hDarkPen`: Dark pen handle.
- `hLightPen`: Light pen handle.

29. **`FloatClick()`**:
- **Description**: Handles click events on a floating button bar.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `oWnd`: Window object.

30. **`Redefine()`**:
- **Description**: Redefines the button bar.
- **Parameters**:
- `nId`: ID.
- `oWnd`: Window object.
- `nWidth`: Width.
- `nHeight`: Height.
- `l2007`, `l2010`, `l2013`, `l2015`: Office style flags.
- `lBorder`: Border flag.

31. **`Initiate()`**:
- **Description**: Initiates the button bar.
- **Parameters**:
- `hDlg`: Dialog handle.

32. **`SetGradients()`**:
- **Description**: Sets gradient colors for the button bar.
- **Parameters**:
- `aGrad`: Gradient array.
- `oBrush`: Brush object.
- `nColor`: Color value.

#### Additional Notes
- The `TBar` class is highly customizable, allowing for different styles, appearances, and behaviors based on the parameters passed to its methods.
- The class supports various Office-like styles (2007, 2010, 2013, 2015) and can be used in both design and runtime modes.
- The button bar can be dynamically adjusted, and buttons can be added or removed at runtime.
- The class also provides methods for saving and loading the button bar configuration, making it suitable for applications that require persistent UI settings.

This documentation should provide a comprehensive understanding of the `TBar` class, its data members, and its methods.
]]>
### Class Documentation: `TBar`

#### Overview
The `TBar` class is a custom control class in the FiveWin framework, designed to create and manage button bars. These button bars can be positioned at the top, bottom, left, or right of a window, or they can be floating. The class provides functionality to add, remove, and manage buttons and groups of buttons, as well as to customize the appearance and behavior of the button bar.

#### Data Members (DATA)

1. **`nGroups`**:
- **Type**: Numeric
- **Description**: Stores the number of groups in the button bar.

2. **`nMode`**:
- **Type**: Numeric
- **Description**: Indicates the current mode of the button bar (e.g., TOP, LEFT, RIGHT, BOTTOM, FLOAT).

3. **`nBtnWidth`**:
- **Type**: Numeric
- **Description**: Width of the buttons in the button bar.

4. **`nBtnHeight`**:
- **Type**: Numeric
- **Description**: Height of the buttons in the button bar.

5. **`aBmpRect`**:
- **Type**: Array
- **Description**: Stores the rectangle coordinates for bitmap buttons.

6. **`l3D`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar has a 3D appearance.

7. **`l97Look`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar should have a Windows 97-style look.

8. **`l2007`, `l2010`, `l2013`, `l2015`**:
- **Type**: Logical
- **Description**: Flags to indicate if the button bar should have the appearance of Office 2007, 2010, 2013, or 2015.

9. **`lLegacyLook`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar should use a legacy look.

10. **`bClrGrad`**:
- **Type**: Codeblock
- **Description**: Codeblock that defines the gradient colors for the button bar.

11. **`bColorMap`**:
- **Type**: Codeblock
- **Description**: Codeblock that defines the color mapping for the button bar.

12. **`nGroupSep`**:
- **Type**: Numeric
- **Description**: Separation between groups of buttons.

13. **`lBorder`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar has a border.

14. **`lGDIP`**:
- **Type**: Logical
- **Description**: Indicates whether GDI+ is used for rendering.

15. **`oGrpFont`**:
- **Type**: Object
- **Description**: Font object used for group labels.

16. **`lResource`**:
- **Type**: Logical
- **Description**: Indicates whether the button bar is created from a resource.

#### Methods (METHOD)

1. **`New()`**:
- **Description**: Constructor for creating a new `TBar` instance.
- **Parameters**:
- `oWnd`: Parent window.
- `nBtnWidth`: Width of buttons.
- `nBtnHeight`: Height of buttons.
- `l3D`: 3D appearance flag.
- `cMode`: Mode of the button bar (TOP, LEFT, RIGHT, BOTTOM, FLOAT).
- `oCursor`: Cursor object.
- `l2007`, `l2010`, `l2013`, `l2015`: Office style flags.
- `lBorder`: Border flag.
- `oBrush`: Brush object.
- `aGrad`: Gradient array.
- `nColor`: Color value.
- `lHScroll`: Horizontal scroll flag.
- `nAlto`: Height adjustment.
- `lGDIP`: GDI+ flag.
- `lDesign`: Design mode flag.
- `cVarName`: Variable name for the button bar.

2. **`NewAt()`**:
- **Description**: Constructor for creating a `TBar` at a specific position.
- **Parameters**: Similar to `New()`, but with additional position parameters (`nRow`, `nCol`, `nWidth`, `nHeight`).

3. **`Add()`**:
- **Description**: Adds a button to the button bar.
- **Parameters**:
- `oBtnBmp`: Button object.
- `nPos`: Position to add the button.

4. **`AddGroup()`**:
- **Description**: Adds a group of buttons to the button bar.
- **Parameters**:
- `nPos`: Position to add the group.

5. **`Adjust()`**:
- **Description**: Adjusts the button bar's layout.

6. **`BtnAdjust()`**:
- **Description**: Adjusts the positions of buttons within the button bar.
- **Parameters**:
- `lRefresh`: Refresh flag.

7. **`Del()`**:
- **Description**: Deletes a button from the button bar.
- **Parameters**:
- `nPos`: Position of the button to delete.
- `lRefresh`: Refresh flag.

8. **`DelGroup()`**:
- **Description**: Deletes a group of buttons from the button bar.
- **Parameters**:
- `nPos`: Position of the group to delete.

9. **`Display()`**:
- **Description**: Displays the button bar by painting it.

10. **`EraseBkGnd()`**:
- **Description**: Erases the background of the button bar.

11. **`FastEditItems()`**:
- **Description**: Provides fast edit options for the button bar.

12. **`Float()`**:
- **Description**: Makes the button bar float.

13. **`GoDown()`**:
- **Description**: Moves the button bar to the bottom of the window.

14. **`GoLeft()`**:
- **Description**: Moves the button bar to the left side of the window.

15. **`GoRight()`**:
- **Description**: Moves the button bar to the right side of the window.

16. **`GoTop()`**:
- **Description**: Moves the button bar to the top of the window.

17. **`cGenPRG()`**:
- **Description**: Generates PRG code for the button bar.
- **Parameters**:
- `lDlgUnits`: Dialog units flag.

18. **`GetBtnTop()`**:
- **Description**: Gets the top position of a button.
- **Parameters**:
- `lNewGroup`: New group flag.

19. **`GetBtnLeft()`**:
- **Description**: Gets the left position of a button.
- **Parameters**:
- `lNewGroup`: New group flag.
- `nInd`: Index of the button.

20. **`Html()`**:
- **Description**: Generates HTML code for the button bar.

21. **`RePosRightBtns()`**:
- **Description**: Repositions buttons on the right side of the button bar.

22. **`RButtonDown()`**:
- **Description**: Handles right-click events on the button bar.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `nFlags`: Flags.

23. **`SaveIni()`**:
- **Description**: Saves the button bar configuration to an INI file.
- **Parameters**:
- `cBarName`: Name of the button bar.
- `cFile`: File name.

24. **`MouseMove()`**:
- **Description**: Handles mouse move events.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `nKeyFlags`: Key flags.

25. **`FillArea()`**:
- **Description**: Fills a specific area of the button bar.
- **Parameters**:
- `aRect`: Rectangle coordinates.
- `uFill`: Fill value.

26. **`Paint()`**:
- **Description**: Paints the button bar.

27. **`CloseGroup()`**:
- **Description**: Closes a group of buttons.
- **Parameters**:
- `oGrp`: Group object.
- `nSep`: Separation value.
- `hDarkPen`: Dark pen handle.
- `hLightPen`: Light pen handle.
- `lLabelSpace`: Label space flag.
- `lRight`: Right flag.

28. **`PaintSeparator()`**:
- **Description**: Paints a separator between groups.
- **Parameters**:
- `nPos`: Position.
- `hDarkPen`: Dark pen handle.
- `hLightPen`: Light pen handle.

29. **`FloatClick()`**:
- **Description**: Handles click events on a floating button bar.
- **Parameters**:
- `nRow`: Row position.
- `nCol`: Column position.
- `oWnd`: Window object.

30. **`Redefine()`**:
- **Description**: Redefines the button bar.
- **Parameters**:
- `nId`: ID.
- `oWnd`: Window object.
- `nWidth`: Width.
- `nHeight`: Height.
- `l2007`, `l2010`, `l2013`, `l2015`: Office style flags.
- `lBorder`: Border flag.

31. **`Initiate()`**:
- **Description**: Initiates the button bar.
- **Parameters**:
- `hDlg`: Dialog handle.

32. **`SetGradients()`**:
- **Description**: Sets gradient colors for the button bar.
- **Parameters**:
- `aGrad`: Gradient array.
- `oBrush`: Brush object.
- `nColor`: Color value.

#### Additional Notes
- The `TBar` class is highly customizable, allowing for different styles, appearances, and behaviors based on the parameters passed to its methods.
- The class supports various Office-like styles (2007, 2010, 2013, 2015) and can be used in both design and runtime modes.
- The button bar can be dynamically adjusted, and buttons can be added or removed at runtime.
- The class also provides methods for saving and loading the button bar configuration, making it suitable for applications that require persistent UI settings.

This documentation should provide a comprehensive understanding of the `TBar` class, its data members, and its methods.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:39:18-07:00 2025-01-17T15:39:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276977#p276977
### Class Documentation: `TBarTabs`

#### Overview
The `TBarTabs` class is designed to manage a set of tabs and associated bars within a window. It provides functionality to create, manage, and switch between different bars (or panels) within a tabbed interface. This class is particularly useful in GUI applications where you need to organize content into multiple tabs, each with its own set of controls or content.

#### Data Members (DATA)

1. **`aBars`**
- **Type:** Array
- **Description:** This array holds instances of `TBar` objects, each representing a bar (or panel) associated with a tab. The array is dynamically populated based on the number of tabs created.

2. **`oTabs`**
- **Type:** Object (TTabs)
- **Description:** This object represents the tab control itself. It is responsible for managing the tabs, including their labels and associated actions when a tab is selected.

3. **`oPanel`**
- **Type:** Object (TPanel)
- **Description:** This object represents the panel that contains the tabs and bars. It acts as a container for the tab control and the bars.

4. **`oWnd`**
- **Type:** Object (Window)
- **Description:** This object represents the parent window to which the tabbed interface belongs. The `TBarTabs` class is designed to be used within a window context.

5. **`nBar`**
- **Type:** Numeric
- **Description:** This variable keeps track of the currently active bar (or tab). It stores the index of the currently selected bar in the `aBars` array.

#### Methods (METHOD)

1. **`New( oWnd, nBtnWidth, nBtnHeight, aPrompts, acBitmaps, nOption, l3D, l2007 )`**
- **Type:** Constructor
- **Description:** This method initializes a new instance of the `TBarTabs` class. It sets up the tab control, creates the bars, and configures the initial state of the tabbed interface.
- **Parameters:**
- `oWnd`: The parent window object.
- `nBtnWidth`: The width of the buttons (tabs).
- `nBtnHeight`: The height of the buttons (tabs).
- `aPrompts`: An array of strings representing the labels for each tab.
- `acBitmaps`: An array of bitmaps associated with each tab (optional).
- `nOption`: The index of the initially selected tab (default is 1).
- `l3D`: A logical value indicating whether to use 3D effects for the bars (default is `.f.`).
- `l2007`: A logical value indicating whether to use a 2007-style appearance (default is `.t.`).

2. **`AddBar( cPrompt, cBitmap )`**
- **Type:** Public
- **Description:** This method adds a new bar (or tab) to the tabbed interface. It creates a new `TBar` object, adds it to the `aBars` array, and updates the tab control with the new tab.
- **Parameters:**
- `cPrompt`: The label for the new tab.
- `cBitmap`: The bitmap associated with the new tab (optional).
- **Returns:** The newly created `TBar` object.

3. **`SetBar( nOption )`**
- **Type:** Protected
- **Description:** This method is used internally to switch between different bars (or tabs). It hides the currently visible bar and shows the bar corresponding to the selected tab.
- **Parameters:**
- `nOption`: The index of the bar to be displayed.
- **Returns:** The index of the previously active bar.

#### Detailed Method Descriptions

- **`New` Method:**
- The `New` method initializes the `TBarTabs` object. It sets up the panel, creates the tab control, and initializes the bars. The method also sets the initial active bar based on the `nOption` parameter. The bars are created with the specified dimensions and styles, and the initially selected bar is displayed while the others are hidden.

- **`AddBar` Method:**
- The `AddBar` method allows dynamic addition of new bars (or tabs) to the tabbed interface. It adds a new tab to the `oTabs` object and creates a corresponding `TBar` object, which is then added to the `aBars` array. The new bar is initially hidden, and the method ensures that the currently active bar remains visible.

- **`SetBar` Method:**
- The `SetBar` method is responsible for switching between bars. It hides the currently visible bar and shows the bar corresponding to the selected tab. This method is called internally when a tab is selected, ensuring that the correct bar is displayed.

#### Usage Example
```xBase
// Assuming oWnd is a valid window object
LOCAL oBarTabs := TBarTabs():New( oWnd, 100, 30, { "Tab1", "Tab2", "Tab3" }, { "bmp1.bmp", "bmp2.bmp", "bmp3.bmp" } )

// Adding a new tab dynamically
oBarTabs:AddBar( "Tab4", "bmp4.bmp" )

// Switching to the second tab
oBarTabs:SetBar( 2 )
```

This class is particularly useful in applications where you need to manage multiple views or panels within a single window, allowing users to switch between them using a tabbed interface.
]]>
### Class Documentation: `TBarTabs`

#### Overview
The `TBarTabs` class is designed to manage a set of tabs and associated bars within a window. It provides functionality to create, manage, and switch between different bars (or panels) within a tabbed interface. This class is particularly useful in GUI applications where you need to organize content into multiple tabs, each with its own set of controls or content.

#### Data Members (DATA)

1. **`aBars`**
- **Type:** Array
- **Description:** This array holds instances of `TBar` objects, each representing a bar (or panel) associated with a tab. The array is dynamically populated based on the number of tabs created.

2. **`oTabs`**
- **Type:** Object (TTabs)
- **Description:** This object represents the tab control itself. It is responsible for managing the tabs, including their labels and associated actions when a tab is selected.

3. **`oPanel`**
- **Type:** Object (TPanel)
- **Description:** This object represents the panel that contains the tabs and bars. It acts as a container for the tab control and the bars.

4. **`oWnd`**
- **Type:** Object (Window)
- **Description:** This object represents the parent window to which the tabbed interface belongs. The `TBarTabs` class is designed to be used within a window context.

5. **`nBar`**
- **Type:** Numeric
- **Description:** This variable keeps track of the currently active bar (or tab). It stores the index of the currently selected bar in the `aBars` array.

#### Methods (METHOD)

1. **`New( oWnd, nBtnWidth, nBtnHeight, aPrompts, acBitmaps, nOption, l3D, l2007 )`**
- **Type:** Constructor
- **Description:** This method initializes a new instance of the `TBarTabs` class. It sets up the tab control, creates the bars, and configures the initial state of the tabbed interface.
- **Parameters:**
- `oWnd`: The parent window object.
- `nBtnWidth`: The width of the buttons (tabs).
- `nBtnHeight`: The height of the buttons (tabs).
- `aPrompts`: An array of strings representing the labels for each tab.
- `acBitmaps`: An array of bitmaps associated with each tab (optional).
- `nOption`: The index of the initially selected tab (default is 1).
- `l3D`: A logical value indicating whether to use 3D effects for the bars (default is `.f.`).
- `l2007`: A logical value indicating whether to use a 2007-style appearance (default is `.t.`).

2. **`AddBar( cPrompt, cBitmap )`**
- **Type:** Public
- **Description:** This method adds a new bar (or tab) to the tabbed interface. It creates a new `TBar` object, adds it to the `aBars` array, and updates the tab control with the new tab.
- **Parameters:**
- `cPrompt`: The label for the new tab.
- `cBitmap`: The bitmap associated with the new tab (optional).
- **Returns:** The newly created `TBar` object.

3. **`SetBar( nOption )`**
- **Type:** Protected
- **Description:** This method is used internally to switch between different bars (or tabs). It hides the currently visible bar and shows the bar corresponding to the selected tab.
- **Parameters:**
- `nOption`: The index of the bar to be displayed.
- **Returns:** The index of the previously active bar.

#### Detailed Method Descriptions

- **`New` Method:**
- The `New` method initializes the `TBarTabs` object. It sets up the panel, creates the tab control, and initializes the bars. The method also sets the initial active bar based on the `nOption` parameter. The bars are created with the specified dimensions and styles, and the initially selected bar is displayed while the others are hidden.

- **`AddBar` Method:**
- The `AddBar` method allows dynamic addition of new bars (or tabs) to the tabbed interface. It adds a new tab to the `oTabs` object and creates a corresponding `TBar` object, which is then added to the `aBars` array. The new bar is initially hidden, and the method ensures that the currently active bar remains visible.

- **`SetBar` Method:**
- The `SetBar` method is responsible for switching between bars. It hides the currently visible bar and shows the bar corresponding to the selected tab. This method is called internally when a tab is selected, ensuring that the correct bar is displayed.

#### Usage Example
```xBase
// Assuming oWnd is a valid window object
LOCAL oBarTabs := TBarTabs():New( oWnd, 100, 30, { "Tab1", "Tab2", "Tab3" }, { "bmp1.bmp", "bmp2.bmp", "bmp3.bmp" } )

// Adding a new tab dynamically
oBarTabs:AddBar( "Tab4", "bmp4.bmp" )

// Switching to the second tab
oBarTabs:SetBar( 2 )
```

This class is particularly useful in applications where you need to manage multiple views or panels within a single window, allowing users to switch between them using a tabbed interface.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:41:08-07:00 2025-01-17T15:41:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276978#p276978
### Class Documentation: `TBitmap`

The `TBitmap` class is a control class in the FiveWin library, designed to handle bitmap images within a window. It provides functionalities to load, display, manipulate, and interact with bitmap images. The class inherits from `TControl`, which is a base class for controls in FiveWin, and extends it with bitmap-specific features.

#### Key Features:
- **Bitmap Loading**: Supports loading bitmaps from resources, files, and the clipboard.
- **Bitmap Display**: Allows for stretching, scrolling, and zooming of the bitmap.
- **Transparency**: Supports transparent bitmaps and alpha blending.
- **Event Handling**: Provides methods to handle mouse and keyboard events.
- **Clipboard Integration**: Allows copying bitmaps to and from the clipboard.
- **Scrollable Bitmaps**: Supports vertical and horizontal scrolling for large bitmaps.

---

### **DATA Members**

| **Data Member** | **Type** | **Description** |
|------------------------|---------------|---------------------------------------------------------------------------------|
| `lRegistered` | `LOGICAL` | Indicates whether the class is registered. |
| `aProperties` | `ARRAY` | List of properties for the class. |
| `nX`, `nY` | `NUMERIC` | Current X and Y positions of the bitmap. |
| `nOldX`, `nOldY` | `NUMERIC` | Previous X and Y positions of the bitmap. |
| `hBitmap` | `HANDLE` | Handle to the bitmap. |
| `hPalette` | `HANDLE` | Handle to the bitmap's palette. |
| `cBmpFile` | `CHARACTER` | File path of the bitmap. |
| `cResName` | `CHARACTER` | Resource name of the bitmap. |
| `lScroll` | `LOGICAL` | Indicates whether scrolling is enabled. |
| `lStretch` | `LOGICAL` | Indicates whether the bitmap should be stretched to fit the control. |
| `aHotAreas` | `ARRAY` | Array of hot areas within the bitmap. |
| `nVStep`, `nHStep` | `NUMERIC` | Vertical and horizontal scroll steps. |
| `nZoom` | `NUMERIC` | Zoom level of the bitmap. |
| `lTransparent` | `LOGICAL` | Indicates whether the bitmap is transparent. |
| `lHasAlpha` | `LOGICAL` | Indicates whether the bitmap has an alpha channel. |
| `bAlphaLevel` | `BLOCK` | Block to calculate the alpha level. |
| `hAlphaLevel` | `NUMERIC` | Current alpha level of the bitmap. |
| `bMLeave` | `BLOCK` | Block to handle mouse leave events. |
| `nImgWidth` | `NUMERIC` | Width of the bitmap image. |
| `nImgHeight` | `NUMERIC` | Height of the bitmap image. |

---

### **METHODS**

#### **Constructor Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `New()` | Constructor for creating a new `TBitmap` object. Initializes properties and loads the bitmap. |
| `Define()` | Creates a bitmap object without creating a control. Used for standalone bitmaps. |
| `ReDefine()` | Redefines an existing bitmap object with new properties. |

#### **Bitmap Manipulation Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `LoadImage()` | Loads a bitmap from a resource or file. |
| `ReLoad()` | Reloads the bitmap from a resource or file. |
| `LoadFromClipboard()` | Loads a bitmap from the clipboard. |
| `LoadFromString()` | Loads a bitmap from a string. |
| `CopyToClipboard()` | Copies the bitmap to the clipboard. |
| `Clear()` | Clears the bitmap from the control. |
| `Zoom()` | Sets or retrieves the zoom level of the bitmap. |

#### **Display and Rendering Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `Paint()` | Paints the bitmap on the control. |
| `EraseBkGnd()` | Handles background erasing for the bitmap. |
| `Display()` | Displays the bitmap by calling `Paint()`. |
| `SetBMP()` | Sets the bitmap from a resource. |
| `SetFore()` | Sets the bitmap as the foreground. |
| `LoadBMP()` | Loads a bitmap from a file. |

#### **Scrolling Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `ScrollUp()` | Scrolls the bitmap up. |
| `ScrollDown()` | Scrolls the bitmap down. |
| `ScrollLeft()` | Scrolls the bitmap left. |
| `ScrollRight()` | Scrolls the bitmap right. |
| `PageUp()` | Scrolls the bitmap up by a page. |
| `PageDown()` | Scrolls the bitmap down by a page. |
| `PageLeft()` | Scrolls the bitmap left by a page. |
| `PageRight()` | Scrolls the bitmap right by a page. |
| `VScroll()` | Handles vertical scrolling events. |
| `HScroll()` | Handles horizontal scrolling events. |
| `ScrollAdjust()` | Adjusts scrollbars based on the bitmap size. |

#### **Event Handling Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `HandleEvent()` | Handles window messages, including mouse and keyboard events. |
| `MouseLeave()` | Handles mouse leave events. |
| `KeyDown()` | Handles key down events. |
| `Command()` | Handles command events. |

#### **Utility Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `Center()` | Centers the bitmap within the control. |
| `AdjControls()` | Adjusts child controls when the bitmap is scrolled. |
| `Default()` | Sets default properties for the bitmap. |
| `cGenPRG()` | Generates PRG code for the bitmap control. |
| `Inspect()` | Inspects and modifies bitmap properties. |
| `Destroy()` | Destroys the bitmap and releases resources. |
| `Initiate()` | Initiates the bitmap control. |

#### **Alpha and Transparency Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `HasAlpha()` | Checks if the bitmap has an alpha channel. |
| `nAlphaLevel()` | Sets or retrieves the alpha level of the bitmap. |

---

### **Detailed Method Descriptions**

#### **1. `New()`**
- **Purpose**: Constructor for creating a new `TBitmap` object.
- **Parameters**:
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the bitmap control.
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `lNoBorder`, `lScroll`, `lStretch`: Control appearance and behavior flags.
- `oWnd`: Parent window.
- `bLClicked`, `bRClicked`: Blocks for left and right click events.
- `oCursor`: Cursor to display when hovering over the bitmap.
- `cMsg`: Message to display.
- `lUpdate`, `bWhen`, `bValid`: Control update and validation blocks.
- `lDesign`: Indicates if the control is in design mode.
- **Returns**: A new `TBitmap` object.

#### **2. `Define()`**
- **Purpose**: Creates a bitmap object without creating a control.
- **Parameters**:
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `oWnd`: Parent window.
- `hBitmap`: Handle to an existing bitmap.
- **Returns**: A new `TBitmap` object.

#### **3. `ReDefine()`**
- **Purpose**: Redefines an existing bitmap object with new properties.
- **Parameters**:
- `nId`: Control ID.
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `oWnd`: Parent window.
- `bLClicked`, `bRClicked`: Blocks for left and right click events.
- `lScroll`, `lStretch`: Control appearance and behavior flags.
- `oCursor`: Cursor to display when hovering over the bitmap.
- `cMsg`: Message to display.
- `lUpdate`, `bWhen`, `bValid`: Control update and validation blocks.
- `lTransparent`: Indicates if the bitmap is transparent.
- **Returns**: The redefined `TBitmap` object.

#### **4. `LoadImage()`**
- **Purpose**: Loads a bitmap from a resource or file.
- **Parameters**:
- `cResName`: Resource name of the bitmap.
- `cBmpFile`: File path of the bitmap.
- **Returns**: Logical value indicating success or failure.

#### **5. `Paint()`**
- **Purpose**: Paints the bitmap on the control.
- **Parameters**: None.
- **Returns**: None.

#### **6. `ScrollAdjust()`**
- **Purpose**: Adjusts scrollbars based on the bitmap size.
- **Parameters**: None.
- **Returns**: None.

#### **7. `Destroy()`**
- **Purpose**: Destroys the bitmap and releases resources.
- **Parameters**: None.
- **Returns**: None.

---

### **Usage Example**

```xbase
// Create a new bitmap control
oBitmap := TBitmap():New( 10, 10, 200, 150, "MYBITMAP", "C:\Images\MyImage.bmp", .F., oWnd )

// Load a bitmap from a file
oBitmap:LoadBMP( "C:\Images\AnotherImage.bmp" )

// Set the bitmap to be transparent
oBitmap:lTransparent := .T.

// Zoom the bitmap
oBitmap:Zoom( 1.5 )

// Display the bitmap
oBitmap:Display()
```

---

This documentation provides a comprehensive overview of the `TBitmap` class, its data members, and methods, along with usage examples.
]]>
### Class Documentation: `TBitmap`

The `TBitmap` class is a control class in the FiveWin library, designed to handle bitmap images within a window. It provides functionalities to load, display, manipulate, and interact with bitmap images. The class inherits from `TControl`, which is a base class for controls in FiveWin, and extends it with bitmap-specific features.

#### Key Features:
- **Bitmap Loading**: Supports loading bitmaps from resources, files, and the clipboard.
- **Bitmap Display**: Allows for stretching, scrolling, and zooming of the bitmap.
- **Transparency**: Supports transparent bitmaps and alpha blending.
- **Event Handling**: Provides methods to handle mouse and keyboard events.
- **Clipboard Integration**: Allows copying bitmaps to and from the clipboard.
- **Scrollable Bitmaps**: Supports vertical and horizontal scrolling for large bitmaps.

---

### **DATA Members**

| **Data Member** | **Type** | **Description** |
|------------------------|---------------|---------------------------------------------------------------------------------|
| `lRegistered` | `LOGICAL` | Indicates whether the class is registered. |
| `aProperties` | `ARRAY` | List of properties for the class. |
| `nX`, `nY` | `NUMERIC` | Current X and Y positions of the bitmap. |
| `nOldX`, `nOldY` | `NUMERIC` | Previous X and Y positions of the bitmap. |
| `hBitmap` | `HANDLE` | Handle to the bitmap. |
| `hPalette` | `HANDLE` | Handle to the bitmap's palette. |
| `cBmpFile` | `CHARACTER` | File path of the bitmap. |
| `cResName` | `CHARACTER` | Resource name of the bitmap. |
| `lScroll` | `LOGICAL` | Indicates whether scrolling is enabled. |
| `lStretch` | `LOGICAL` | Indicates whether the bitmap should be stretched to fit the control. |
| `aHotAreas` | `ARRAY` | Array of hot areas within the bitmap. |
| `nVStep`, `nHStep` | `NUMERIC` | Vertical and horizontal scroll steps. |
| `nZoom` | `NUMERIC` | Zoom level of the bitmap. |
| `lTransparent` | `LOGICAL` | Indicates whether the bitmap is transparent. |
| `lHasAlpha` | `LOGICAL` | Indicates whether the bitmap has an alpha channel. |
| `bAlphaLevel` | `BLOCK` | Block to calculate the alpha level. |
| `hAlphaLevel` | `NUMERIC` | Current alpha level of the bitmap. |
| `bMLeave` | `BLOCK` | Block to handle mouse leave events. |
| `nImgWidth` | `NUMERIC` | Width of the bitmap image. |
| `nImgHeight` | `NUMERIC` | Height of the bitmap image. |

---

### **METHODS**

#### **Constructor Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `New()` | Constructor for creating a new `TBitmap` object. Initializes properties and loads the bitmap. |
| `Define()` | Creates a bitmap object without creating a control. Used for standalone bitmaps. |
| `ReDefine()` | Redefines an existing bitmap object with new properties. |

#### **Bitmap Manipulation Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `LoadImage()` | Loads a bitmap from a resource or file. |
| `ReLoad()` | Reloads the bitmap from a resource or file. |
| `LoadFromClipboard()` | Loads a bitmap from the clipboard. |
| `LoadFromString()` | Loads a bitmap from a string. |
| `CopyToClipboard()` | Copies the bitmap to the clipboard. |
| `Clear()` | Clears the bitmap from the control. |
| `Zoom()` | Sets or retrieves the zoom level of the bitmap. |

#### **Display and Rendering Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `Paint()` | Paints the bitmap on the control. |
| `EraseBkGnd()` | Handles background erasing for the bitmap. |
| `Display()` | Displays the bitmap by calling `Paint()`. |
| `SetBMP()` | Sets the bitmap from a resource. |
| `SetFore()` | Sets the bitmap as the foreground. |
| `LoadBMP()` | Loads a bitmap from a file. |

#### **Scrolling Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `ScrollUp()` | Scrolls the bitmap up. |
| `ScrollDown()` | Scrolls the bitmap down. |
| `ScrollLeft()` | Scrolls the bitmap left. |
| `ScrollRight()` | Scrolls the bitmap right. |
| `PageUp()` | Scrolls the bitmap up by a page. |
| `PageDown()` | Scrolls the bitmap down by a page. |
| `PageLeft()` | Scrolls the bitmap left by a page. |
| `PageRight()` | Scrolls the bitmap right by a page. |
| `VScroll()` | Handles vertical scrolling events. |
| `HScroll()` | Handles horizontal scrolling events. |
| `ScrollAdjust()` | Adjusts scrollbars based on the bitmap size. |

#### **Event Handling Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `HandleEvent()` | Handles window messages, including mouse and keyboard events. |
| `MouseLeave()` | Handles mouse leave events. |
| `KeyDown()` | Handles key down events. |
| `Command()` | Handles command events. |

#### **Utility Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `Center()` | Centers the bitmap within the control. |
| `AdjControls()` | Adjusts child controls when the bitmap is scrolled. |
| `Default()` | Sets default properties for the bitmap. |
| `cGenPRG()` | Generates PRG code for the bitmap control. |
| `Inspect()` | Inspects and modifies bitmap properties. |
| `Destroy()` | Destroys the bitmap and releases resources. |
| `Initiate()` | Initiates the bitmap control. |

#### **Alpha and Transparency Methods**

| **Method** | **Description** |
|------------------------|---------------------------------------------------------------------------------|
| `HasAlpha()` | Checks if the bitmap has an alpha channel. |
| `nAlphaLevel()` | Sets or retrieves the alpha level of the bitmap. |

---

### **Detailed Method Descriptions**

#### **1. `New()`**
- **Purpose**: Constructor for creating a new `TBitmap` object.
- **Parameters**:
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the bitmap control.
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `lNoBorder`, `lScroll`, `lStretch`: Control appearance and behavior flags.
- `oWnd`: Parent window.
- `bLClicked`, `bRClicked`: Blocks for left and right click events.
- `oCursor`: Cursor to display when hovering over the bitmap.
- `cMsg`: Message to display.
- `lUpdate`, `bWhen`, `bValid`: Control update and validation blocks.
- `lDesign`: Indicates if the control is in design mode.
- **Returns**: A new `TBitmap` object.

#### **2. `Define()`**
- **Purpose**: Creates a bitmap object without creating a control.
- **Parameters**:
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `oWnd`: Parent window.
- `hBitmap`: Handle to an existing bitmap.
- **Returns**: A new `TBitmap` object.

#### **3. `ReDefine()`**
- **Purpose**: Redefines an existing bitmap object with new properties.
- **Parameters**:
- `nId`: Control ID.
- `cResName`, `cBmpFile`: Resource name or file path of the bitmap.
- `oWnd`: Parent window.
- `bLClicked`, `bRClicked`: Blocks for left and right click events.
- `lScroll`, `lStretch`: Control appearance and behavior flags.
- `oCursor`: Cursor to display when hovering over the bitmap.
- `cMsg`: Message to display.
- `lUpdate`, `bWhen`, `bValid`: Control update and validation blocks.
- `lTransparent`: Indicates if the bitmap is transparent.
- **Returns**: The redefined `TBitmap` object.

#### **4. `LoadImage()`**
- **Purpose**: Loads a bitmap from a resource or file.
- **Parameters**:
- `cResName`: Resource name of the bitmap.
- `cBmpFile`: File path of the bitmap.
- **Returns**: Logical value indicating success or failure.

#### **5. `Paint()`**
- **Purpose**: Paints the bitmap on the control.
- **Parameters**: None.
- **Returns**: None.

#### **6. `ScrollAdjust()`**
- **Purpose**: Adjusts scrollbars based on the bitmap size.
- **Parameters**: None.
- **Returns**: None.

#### **7. `Destroy()`**
- **Purpose**: Destroys the bitmap and releases resources.
- **Parameters**: None.
- **Returns**: None.

---

### **Usage Example**

```xbase
// Create a new bitmap control
oBitmap := TBitmap():New( 10, 10, 200, 150, "MYBITMAP", "C:\Images\MyImage.bmp", .F., oWnd )

// Load a bitmap from a file
oBitmap:LoadBMP( "C:\Images\AnotherImage.bmp" )

// Set the bitmap to be transparent
oBitmap:lTransparent := .T.

// Zoom the bitmap
oBitmap:Zoom( 1.5 )

// Display the bitmap
oBitmap:Display()
```

---

This documentation provides a comprehensive overview of the `TBitmap` class, its data members, and methods, along with usage examples.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:42:40-07:00 2025-01-17T15:42:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276979#p276979
### Class Documentation: `TBlock`

#### Overview:
The `TBlock` class is a part of the FiveWin framework, which is commonly used in Clipper and xBase programming. This class is designed to encapsulate a code block (a piece of code that can be executed later) and provides methods to evaluate or execute this code block with optional parameters.

#### Purpose:
The `TBlock` class allows you to store a code expression as a string, convert it into an executable code block, and then evaluate or execute this block with up to five parameters. This is useful in scenarios where you need to dynamically execute code based on runtime conditions or configurations.

---

### DATA Members:

1. **`cExpression`**
- **Type:** String
- **Description:** This data member stores the code expression as a string. The expression is later converted into an executable code block.

2. **`bBlock`**
- **Type:** Code Block
- **Description:** This data member holds the executable code block that is created from the `cExpression` string. It is used to evaluate or execute the code.

---

### METHODS:

1. **`New( cExpression )`**
- **Type:** Constructor
- **Description:** This method initializes a new instance of the `TBlock` class. It takes a string `cExpression` as input, which represents the code to be executed. The method checks if the expression is valid. If valid, it converts the string into an executable code block and assigns it to `::bBlock`. If the expression is invalid, it displays an alert message.
- **Parameters:**
- `cExpression`: A string representing the code expression to be executed.
- **Returns:** `nil` (no return value).

2. **`Eval( uPar1, uPar2, uPar3, uPar4, uPar5 )`**
- **Type:** Inline Method
- **Description:** This method evaluates the code block stored in `::bBlock` with up to five optional parameters. If `::bBlock` is not `nil`, it executes the code block using the `Eval` function and passes the parameters to it. If `::bBlock` is `nil`, it does nothing.
- **Parameters:**
- `uPar1`, `uPar2`, `uPar3`, `uPar4`, `uPar5`: Optional parameters to be passed to the code block.
- **Returns:** The result of evaluating the code block, or `nil` if `::bBlock` is `nil`.

3. **`Exec( uPar1, uPar2, uPar3, uPar4, uPar5 )`**
- **Type:** Inline Method
- **Description:** This method is functionally identical to `Eval`. It evaluates the code block stored in `::bBlock` with up to five optional parameters. If `::bBlock` is not `nil`, it executes the code block using the `Eval` function and passes the parameters to it. If `::bBlock` is `nil`, it does nothing.
- **Parameters:**
- `uPar1`, `uPar2`, `uPar3`, `uPar4`, `uPar5`: Optional parameters to be passed to the code block.
- **Returns:** The result of evaluating the code block, or `nil` if `::bBlock` is `nil`.

---

### Example Usage:

```clipper
// Create a new TBlock instance with a code expression
oBlock := TBlock:New( "{ |x, y| x + y }" )

// Evaluate the code block with parameters
? oBlock:Eval( 5, 10 ) // Output: 15

// Execute the code block with parameters
? oBlock:Exec( 3, 7 ) // Output: 10
```

---

### Notes:
- The `Eval` and `Exec` methods are identical in functionality. The presence of both methods might be for backward compatibility or to provide alternative naming conventions.
- The `New` constructor ensures that the provided expression is valid before converting it into a code block. If the expression is invalid, it alerts the user and does not initialize the code block.
- The `&` operator in the `New` method is used to convert the string expression into a code block. This is a powerful feature but should be used with caution to avoid security risks (e.g., code injection).

This class is a simple yet powerful tool for dynamically executing code in FiveWin applications.
]]>
### Class Documentation: `TBlock`

#### Overview:
The `TBlock` class is a part of the FiveWin framework, which is commonly used in Clipper and xBase programming. This class is designed to encapsulate a code block (a piece of code that can be executed later) and provides methods to evaluate or execute this code block with optional parameters.

#### Purpose:
The `TBlock` class allows you to store a code expression as a string, convert it into an executable code block, and then evaluate or execute this block with up to five parameters. This is useful in scenarios where you need to dynamically execute code based on runtime conditions or configurations.

---

### DATA Members:

1. **`cExpression`**
- **Type:** String
- **Description:** This data member stores the code expression as a string. The expression is later converted into an executable code block.

2. **`bBlock`**
- **Type:** Code Block
- **Description:** This data member holds the executable code block that is created from the `cExpression` string. It is used to evaluate or execute the code.

---

### METHODS:

1. **`New( cExpression )`**
- **Type:** Constructor
- **Description:** This method initializes a new instance of the `TBlock` class. It takes a string `cExpression` as input, which represents the code to be executed. The method checks if the expression is valid. If valid, it converts the string into an executable code block and assigns it to `::bBlock`. If the expression is invalid, it displays an alert message.
- **Parameters:**
- `cExpression`: A string representing the code expression to be executed.
- **Returns:** `nil` (no return value).

2. **`Eval( uPar1, uPar2, uPar3, uPar4, uPar5 )`**
- **Type:** Inline Method
- **Description:** This method evaluates the code block stored in `::bBlock` with up to five optional parameters. If `::bBlock` is not `nil`, it executes the code block using the `Eval` function and passes the parameters to it. If `::bBlock` is `nil`, it does nothing.
- **Parameters:**
- `uPar1`, `uPar2`, `uPar3`, `uPar4`, `uPar5`: Optional parameters to be passed to the code block.
- **Returns:** The result of evaluating the code block, or `nil` if `::bBlock` is `nil`.

3. **`Exec( uPar1, uPar2, uPar3, uPar4, uPar5 )`**
- **Type:** Inline Method
- **Description:** This method is functionally identical to `Eval`. It evaluates the code block stored in `::bBlock` with up to five optional parameters. If `::bBlock` is not `nil`, it executes the code block using the `Eval` function and passes the parameters to it. If `::bBlock` is `nil`, it does nothing.
- **Parameters:**
- `uPar1`, `uPar2`, `uPar3`, `uPar4`, `uPar5`: Optional parameters to be passed to the code block.
- **Returns:** The result of evaluating the code block, or `nil` if `::bBlock` is `nil`.

---

### Example Usage:

```clipper
// Create a new TBlock instance with a code expression
oBlock := TBlock:New( "{ |x, y| x + y }" )

// Evaluate the code block with parameters
? oBlock:Eval( 5, 10 ) // Output: 15

// Execute the code block with parameters
? oBlock:Exec( 3, 7 ) // Output: 10
```

---

### Notes:
- The `Eval` and `Exec` methods are identical in functionality. The presence of both methods might be for backward compatibility or to provide alternative naming conventions.
- The `New` constructor ensures that the provided expression is valid before converting it into a code block. If the expression is invalid, it alerts the user and does not initialize the code block.
- The `&` operator in the `New` method is used to convert the string expression into a code block. This is a powerful feature but should be used with caution to avoid security risks (e.g., code injection).

This class is a simple yet powerful tool for dynamically executing code in FiveWin applications.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:45:07-07:00 2025-01-17T15:45:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276980#p276980
### **Class Documentation: `TBrush`**

The `TBrush` class is designed to manage and manipulate brush objects in a Windows-based graphical environment. Brushes are used to fill shapes, backgrounds, and other graphical elements with colors, patterns, or gradients. This class provides a comprehensive set of methods and data members to create, modify, and manage brushes, including support for solid colors, patterns, gradients, and bitmap-based brushes.

---

### **DATA Members**

1. **`hBrush`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the brush object. This is the primary identifier for the brush in the Windows GDI (Graphics Device Interface).

2. **`hBitmap`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the bitmap used for pattern brushes. This is relevant when the brush is created from a bitmap.

3. **`hBmpOrgl`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the original bitmap before any resizing or modifications. This is used to restore or reference the original bitmap.

4. **`nBmpFormat`**
- **Type**: Numeric
- **Description**: The format of the bitmap used in the brush. Initialized to `0`.

5. **`nCount`**
- **Type**: Numeric
- **Description**: A counter to track the number of references to the brush. Used for memory management.

6. **`cStyle`**
- **Type**: Character (String)
- **Description**: The style of the brush (e.g., "HORIZONTAL", "VERTICAL", "CROSS", etc.). This is used for hatch brushes.

7. **`nRGBColor`**
- **Type**: Numeric
- **Description**: The RGB color value used for solid or hatch brushes.

8. **`cBmpFile`**
- **Type**: Character (String)
- **Description**: The file path of the bitmap used to create the brush.

9. **`cBmpRes`**
- **Type**: Character (String)
- **Description**: The resource name of the bitmap used to create the brush.

10. **`lSystem`**
- **Type**: Logical (Boolean)
- **Description**: Indicates whether the brush is a system brush (e.g., stock brush). If `.T.`, the brush is a system brush.

11. **`aGrad`**
- **Type**: Array
- **Description**: An array containing gradient colors for gradient brushes.

12. **`uSource`**
- **Type**: Variant
- **Description**: The source of the brush, which can be a color, bitmap, or gradient.

13. **`nResizeMode`**
- **Type**: Numeric
- **Description**: The mode used for resizing the brush. Initialized to `0`.

14. **`oRect`**
- **Type**: Object (TRect)
- **Description**: The rectangle object defining the area for which the brush is resized.

15. **`lClientArea`**
- **Type**: Logical (Boolean)
- **Description**: If `.T.`, the brush is resized to fit the client area of a window, excluding borders.

16. **`aOrg`**
- **Type**: Array
- **Description**: An array storing the original coordinates of the brush.

17. **`lGdip`**
- **Type**: Logical (Boolean)
- **Description**: Indicates whether the brush uses GDI+ (Graphics Device Interface Plus). Initialized to `.F.`.

18. **`pBrush`**
- **Type**: Pointer (Protected)
- **Description**: A pointer to the GDI+ brush object. Used for advanced graphical operations.

19. **`Cargo`**
- **Type**: Variant
- **Description**: A generic data holder for additional user-defined information.

20. **`aBrushes` (Class Data)**
- **Type**: Array
- **Description**: A static array storing all instances of `TBrush` objects.

21. **`aProperties` (Class Data)**
- **Type**: Array
- **Description**: A static array listing the properties of the brush that can be saved or loaded.

---

### **METHODS**

1. **`New(cStyle, nRGBColor, cBmpFile, cBmpRes, nBmpHandle, cResizeMode)`**
- **Description**: Constructor method for creating a new `TBrush` object. It initializes the brush based on the provided parameters (style, color, bitmap file, bitmap resource, etc.).
- **Parameters**:
- `cStyle`: The style of the brush (e.g., "HORIZONTAL", "VERTICAL").
- `nRGBColor`: The RGB color value for the brush.
- `cBmpFile`: The file path of the bitmap.
- `cBmpRes`: The resource name of the bitmap.
- `nBmpHandle`: The handle to an existing bitmap.
- `cResizeMode`: The mode for resizing the brush.
- **Returns**: The newly created `TBrush` object.

2. **`cGenPRG(cVar)`**
- **Description**: Generates a PRG (program) code snippet that can be used to recreate the brush object.
- **Parameters**:
- `cVar`: The variable name to use in the generated code.
- **Returns**: A string containing the PRG code.

3. **`End()`**
- **Description**: Destructor method that releases the brush and associated resources. It deletes the brush handle and bitmap if they are not system objects.
- **Returns**: `nil`.

4. **`Load(cInfo)`**
- **Description**: Loads brush properties from a binary string. This method is used for deserialization.
- **Parameters**:
- `cInfo`: A binary string containing the brush properties.
- **Returns**: `nil`.

5. **`Release()`**
- **Description**: Alias for the `End()` method. Releases the brush and associated resources.
- **Returns**: `nil`.

6. **`Save()`**
- **Description**: Saves the brush properties to a binary string. This method is used for serialization.
- **Returns**: A binary string containing the brush properties.

7. **`Resized(x, y, nMode)`**
- **Description**: Creates a new brush object that is a resized version of the current brush.
- **Parameters**:
- `x`: The new width of the brush.
- `y`: The new height of the brush.
- `nMode`: The resizing mode.
- **Returns**: A new `TBrush` object.

8. **`Cropped(oWnd, oChildRect)`**
- **Description**: Creates a new brush object that is a cropped version of the current brush.
- **Parameters**:
- `oWnd`: The window object associated with the brush.
- `oChildRect`: The rectangle defining the area to crop.
- **Returns**: A new `TBrush` object.

9. **`DataRect(oWnd)`**
- **Description**: Calculates the rectangle area for the brush based on the window's client area.
- **Parameters**:
- `oWnd`: The window object.
- **Returns**: A `TRect` object.

10. **`SaveToText(nIndent)`**
- **Description**: Saves the brush properties to a text format, suitable for debugging or logging.
- **Parameters**:
- `nIndent`: The indentation level for the text output.
- **Returns**: A string containing the brush properties in text format.

11. **`SetSize(nWidth, nHeight)`**
- **Description**: Resizes the brush to the specified width and height.
- **Parameters**:
- `nWidth`: The new width of the brush.
- `nHeight`: The new height of the brush.
- **Returns**: The modified `TBrush` object.

12. **`Resize(oWnd, nOrgX, nOrgY)`**
- **Description**: Resizes the brush to fit the specified window's client area.
- **Parameters**:
- `oWnd`: The window object.
- `nOrgX`: The X-coordinate offset.
- `nOrgY`: The Y-coordinate offset.
- **Returns**: A `TRect` object.

13. **`Copy()`**
- **Description**: Creates a copy of the current brush object.
- **Returns**: A new `TBrush` object.

14. **`GdipBrush()`**
- **Description**: Creates a GDI+ brush object from the current brush.
- **Returns**: A pointer to the GDI+ brush.

15. **`SameAs(oBrush)`**
- **Description**: Compares the current brush with another brush to check if they are the same.
- **Parameters**:
- `oBrush`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are the same, otherwise `.F.`.

16. **`==` (Operator)**
- **Description**: Overloaded equality operator to compare two brushes using the `SameAs` method.
- **Parameters**:
- `o`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are the same, otherwise `.F.`.

17. **`!=` (Operator)**
- **Description**: Overloaded inequality operator to compare two brushes using the `SameAs` method.
- **Parameters**:
- `o`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are not the same, otherwise `.F.`.

---

### **Additional Functions**

1. **`ResizeBitmap(hBmp, nWndW, nWndH, nMode, lCrop)`**
- **Description**: Resizes a bitmap to the specified dimensions.
- **Parameters**:
- `hBmp`: The handle to the bitmap.
- `nWndW`: The new width.
- `nWndH`: The new height.
- `nMode`: The resizing mode.
- `lCrop`: If `.T.`, the bitmap is cropped after resizing.
- **Returns**: The handle to the resized bitmap.

2. **`GradientBmp(hDC, nWidth, nHeight, aColors, lVert)`**
- **Description**: Creates a gradient bitmap.
- **Parameters**:
- `hDC`: The device context.
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `aColors`: An array of gradient colors.
- `lVert`: If `.T.`, the gradient is vertical; otherwise, horizontal.
- **Returns**: The handle to the gradient bitmap.

3. **`CropBmp(hBmp, oRect)`**
- **Description**: Crops a bitmap to the specified rectangle.
- **Parameters**:
- `hBmp`: The handle to the bitmap.
- `oRect`: The rectangle defining the area to crop.
- **Returns**: The handle to the cropped bitmap.

4. **`GradientBrush(hDC, nTop, nLeft, nWidth, nHeight, aColors, lVert)`**
- **Description**: Creates a gradient brush.
- **Parameters**:
- `hDC`: The device context.
- `nTop`: The top coordinate.
- `nLeft`: The left coordinate.
- `nWidth`: The width of the brush.
- `nHeight`: The height of the brush.
- `aColors`: An array of gradient colors.
- `lVert`: If `.T.`, the gradient is vertical; otherwise, horizontal.
- **Returns**: The handle to the gradient brush.

---

### **Summary**

The `TBrush` class is a powerful tool for managing brushes in a Windows-based graphical environment. It supports a wide range of brush types, including solid colors, patterns, gradients, and bitmap-based brushes. The class provides methods for creating, modifying, and managing brushes, as well as serialization and deserialization capabilities. This makes it suitable for use in applications that require dynamic and flexible brush management.
]]>
### **Class Documentation: `TBrush`**

The `TBrush` class is designed to manage and manipulate brush objects in a Windows-based graphical environment. Brushes are used to fill shapes, backgrounds, and other graphical elements with colors, patterns, or gradients. This class provides a comprehensive set of methods and data members to create, modify, and manage brushes, including support for solid colors, patterns, gradients, and bitmap-based brushes.

---

### **DATA Members**

1. **`hBrush`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the brush object. This is the primary identifier for the brush in the Windows GDI (Graphics Device Interface).

2. **`hBitmap`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the bitmap used for pattern brushes. This is relevant when the brush is created from a bitmap.

3. **`hBmpOrgl`**
- **Type**: Handle (Numeric)
- **Description**: The handle to the original bitmap before any resizing or modifications. This is used to restore or reference the original bitmap.

4. **`nBmpFormat`**
- **Type**: Numeric
- **Description**: The format of the bitmap used in the brush. Initialized to `0`.

5. **`nCount`**
- **Type**: Numeric
- **Description**: A counter to track the number of references to the brush. Used for memory management.

6. **`cStyle`**
- **Type**: Character (String)
- **Description**: The style of the brush (e.g., "HORIZONTAL", "VERTICAL", "CROSS", etc.). This is used for hatch brushes.

7. **`nRGBColor`**
- **Type**: Numeric
- **Description**: The RGB color value used for solid or hatch brushes.

8. **`cBmpFile`**
- **Type**: Character (String)
- **Description**: The file path of the bitmap used to create the brush.

9. **`cBmpRes`**
- **Type**: Character (String)
- **Description**: The resource name of the bitmap used to create the brush.

10. **`lSystem`**
- **Type**: Logical (Boolean)
- **Description**: Indicates whether the brush is a system brush (e.g., stock brush). If `.T.`, the brush is a system brush.

11. **`aGrad`**
- **Type**: Array
- **Description**: An array containing gradient colors for gradient brushes.

12. **`uSource`**
- **Type**: Variant
- **Description**: The source of the brush, which can be a color, bitmap, or gradient.

13. **`nResizeMode`**
- **Type**: Numeric
- **Description**: The mode used for resizing the brush. Initialized to `0`.

14. **`oRect`**
- **Type**: Object (TRect)
- **Description**: The rectangle object defining the area for which the brush is resized.

15. **`lClientArea`**
- **Type**: Logical (Boolean)
- **Description**: If `.T.`, the brush is resized to fit the client area of a window, excluding borders.

16. **`aOrg`**
- **Type**: Array
- **Description**: An array storing the original coordinates of the brush.

17. **`lGdip`**
- **Type**: Logical (Boolean)
- **Description**: Indicates whether the brush uses GDI+ (Graphics Device Interface Plus). Initialized to `.F.`.

18. **`pBrush`**
- **Type**: Pointer (Protected)
- **Description**: A pointer to the GDI+ brush object. Used for advanced graphical operations.

19. **`Cargo`**
- **Type**: Variant
- **Description**: A generic data holder for additional user-defined information.

20. **`aBrushes` (Class Data)**
- **Type**: Array
- **Description**: A static array storing all instances of `TBrush` objects.

21. **`aProperties` (Class Data)**
- **Type**: Array
- **Description**: A static array listing the properties of the brush that can be saved or loaded.

---

### **METHODS**

1. **`New(cStyle, nRGBColor, cBmpFile, cBmpRes, nBmpHandle, cResizeMode)`**
- **Description**: Constructor method for creating a new `TBrush` object. It initializes the brush based on the provided parameters (style, color, bitmap file, bitmap resource, etc.).
- **Parameters**:
- `cStyle`: The style of the brush (e.g., "HORIZONTAL", "VERTICAL").
- `nRGBColor`: The RGB color value for the brush.
- `cBmpFile`: The file path of the bitmap.
- `cBmpRes`: The resource name of the bitmap.
- `nBmpHandle`: The handle to an existing bitmap.
- `cResizeMode`: The mode for resizing the brush.
- **Returns**: The newly created `TBrush` object.

2. **`cGenPRG(cVar)`**
- **Description**: Generates a PRG (program) code snippet that can be used to recreate the brush object.
- **Parameters**:
- `cVar`: The variable name to use in the generated code.
- **Returns**: A string containing the PRG code.

3. **`End()`**
- **Description**: Destructor method that releases the brush and associated resources. It deletes the brush handle and bitmap if they are not system objects.
- **Returns**: `nil`.

4. **`Load(cInfo)`**
- **Description**: Loads brush properties from a binary string. This method is used for deserialization.
- **Parameters**:
- `cInfo`: A binary string containing the brush properties.
- **Returns**: `nil`.

5. **`Release()`**
- **Description**: Alias for the `End()` method. Releases the brush and associated resources.
- **Returns**: `nil`.

6. **`Save()`**
- **Description**: Saves the brush properties to a binary string. This method is used for serialization.
- **Returns**: A binary string containing the brush properties.

7. **`Resized(x, y, nMode)`**
- **Description**: Creates a new brush object that is a resized version of the current brush.
- **Parameters**:
- `x`: The new width of the brush.
- `y`: The new height of the brush.
- `nMode`: The resizing mode.
- **Returns**: A new `TBrush` object.

8. **`Cropped(oWnd, oChildRect)`**
- **Description**: Creates a new brush object that is a cropped version of the current brush.
- **Parameters**:
- `oWnd`: The window object associated with the brush.
- `oChildRect`: The rectangle defining the area to crop.
- **Returns**: A new `TBrush` object.

9. **`DataRect(oWnd)`**
- **Description**: Calculates the rectangle area for the brush based on the window's client area.
- **Parameters**:
- `oWnd`: The window object.
- **Returns**: A `TRect` object.

10. **`SaveToText(nIndent)`**
- **Description**: Saves the brush properties to a text format, suitable for debugging or logging.
- **Parameters**:
- `nIndent`: The indentation level for the text output.
- **Returns**: A string containing the brush properties in text format.

11. **`SetSize(nWidth, nHeight)`**
- **Description**: Resizes the brush to the specified width and height.
- **Parameters**:
- `nWidth`: The new width of the brush.
- `nHeight`: The new height of the brush.
- **Returns**: The modified `TBrush` object.

12. **`Resize(oWnd, nOrgX, nOrgY)`**
- **Description**: Resizes the brush to fit the specified window's client area.
- **Parameters**:
- `oWnd`: The window object.
- `nOrgX`: The X-coordinate offset.
- `nOrgY`: The Y-coordinate offset.
- **Returns**: A `TRect` object.

13. **`Copy()`**
- **Description**: Creates a copy of the current brush object.
- **Returns**: A new `TBrush` object.

14. **`GdipBrush()`**
- **Description**: Creates a GDI+ brush object from the current brush.
- **Returns**: A pointer to the GDI+ brush.

15. **`SameAs(oBrush)`**
- **Description**: Compares the current brush with another brush to check if they are the same.
- **Parameters**:
- `oBrush`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are the same, otherwise `.F.`.

16. **`==` (Operator)**
- **Description**: Overloaded equality operator to compare two brushes using the `SameAs` method.
- **Parameters**:
- `o`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are the same, otherwise `.F.`.

17. **`!=` (Operator)**
- **Description**: Overloaded inequality operator to compare two brushes using the `SameAs` method.
- **Parameters**:
- `o`: The brush object to compare with.
- **Returns**: `.T.` if the brushes are not the same, otherwise `.F.`.

---

### **Additional Functions**

1. **`ResizeBitmap(hBmp, nWndW, nWndH, nMode, lCrop)`**
- **Description**: Resizes a bitmap to the specified dimensions.
- **Parameters**:
- `hBmp`: The handle to the bitmap.
- `nWndW`: The new width.
- `nWndH`: The new height.
- `nMode`: The resizing mode.
- `lCrop`: If `.T.`, the bitmap is cropped after resizing.
- **Returns**: The handle to the resized bitmap.

2. **`GradientBmp(hDC, nWidth, nHeight, aColors, lVert)`**
- **Description**: Creates a gradient bitmap.
- **Parameters**:
- `hDC`: The device context.
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `aColors`: An array of gradient colors.
- `lVert`: If `.T.`, the gradient is vertical; otherwise, horizontal.
- **Returns**: The handle to the gradient bitmap.

3. **`CropBmp(hBmp, oRect)`**
- **Description**: Crops a bitmap to the specified rectangle.
- **Parameters**:
- `hBmp`: The handle to the bitmap.
- `oRect`: The rectangle defining the area to crop.
- **Returns**: The handle to the cropped bitmap.

4. **`GradientBrush(hDC, nTop, nLeft, nWidth, nHeight, aColors, lVert)`**
- **Description**: Creates a gradient brush.
- **Parameters**:
- `hDC`: The device context.
- `nTop`: The top coordinate.
- `nLeft`: The left coordinate.
- `nWidth`: The width of the brush.
- `nHeight`: The height of the brush.
- `aColors`: An array of gradient colors.
- `lVert`: If `.T.`, the gradient is vertical; otherwise, horizontal.
- **Returns**: The handle to the gradient brush.

---

### **Summary**

The `TBrush` class is a powerful tool for managing brushes in a Windows-based graphical environment. It supports a wide range of brush types, including solid colors, patterns, gradients, and bitmap-based brushes. The class provides methods for creating, modifying, and managing brushes, as well as serialization and deserialization capabilities. This makes it suitable for use in applications that require dynamic and flexible brush management.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:46:21-07:00 2025-01-17T15:46:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276981#p276981
### Class Documentation: `TBrushEx`

#### Overview
The `TBrushEx` class is designed to create a brush from a bitmap. The bitmap can be generated with specific dimensions and colors, and it can include a gradient effect (either vertical or horizontal). If a second color is not provided, the bitmap will be a flat color. The user is responsible for destroying the brush if it is not managed by the system.

---

### DATA Members

1. **`hBrush`**
- **Type**: Handle
- **Description**: This holds the handle to the brush created from the bitmap. The brush is used for filling shapes or backgrounds in graphical applications.

2. **`hBitmap`**
- **Type**: Handle
- **Description**: This holds the handle to the bitmap created with the specified dimensions and colors. The bitmap is used to create the brush.

---

### METHODS

#### 1. **`New(nWidth, nHeight, nColor, nColor2, lVGrad)`**
- **Type**: Constructor
- **Parameters**:
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `nColor`: The primary color of the bitmap.
- `nColor2`: (Optional) The secondary color for creating a gradient effect. If not provided, the bitmap will be a flat color.
- `lVGrad`: (Optional) A logical value indicating whether the gradient is vertical (`TRUE`) or horizontal (`FALSE`).
- **Description**:
- This method creates a bitmap using the `CreaBitmapEx` function with the specified dimensions, colors, and gradient orientation.
- It then creates a brush (`hBrush`) from the bitmap using the `CreatePatternBrush` function.
- The method returns the instance of the `TBrushEx` class.

#### 2. **`NewEx(nWidth, nHeight, nColor, nColor2, nColor3, nColor4, lVGrad)`**
- **Type**: Constructor
- **Parameters**:
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `nColor`: The primary color of the bitmap.
- `nColor2`: The secondary color for creating a gradient effect.
- `nColor3`: The third color for more complex gradient effects.
- `nColor4`: The fourth color for more complex gradient effects.
- `lVGrad`: (Optional) A logical value indicating whether the gradient is vertical (`TRUE`) or horizontal (`FALSE`).
- **Description**:
- This method creates a bitmap using the `CreaBitmapEx2` function with the specified dimensions, colors, and gradient orientation.
- It then creates a brush (`hBrush`) from the bitmap using the `CreatePatternBrush` function.
- The method returns the instance of the `TBrushEx` class.

#### 3. **`End()`**
- **Type**: Destructor
- **Description**:
- This method is used to clean up resources by deleting the brush (`hBrush`) and the bitmap (`hBitmap`) using the `DeleteObject` function.
- It is marked as `INLINE`, meaning the code is directly inserted where the method is called, improving performance for small, frequently used methods.

---

### Notes:
- The `TBrushEx` class is useful for creating custom brushes with gradients or flat colors, which can be used in graphical applications.
- The user must manually call the `End()` method to release resources when the brush is no longer needed, unless the system manages it.
- The commented-out lines (`//::nCount := 1` and `//AAdd( ::aBrushes, Self )`) suggest that the class might have been designed to track instances or manage a collection of brushes, but this functionality is not implemented in the provided code.

---

This class is a powerful tool for creating and managing custom brushes in graphical applications, especially when gradients or specific color patterns are required.
]]>
### Class Documentation: `TBrushEx`

#### Overview
The `TBrushEx` class is designed to create a brush from a bitmap. The bitmap can be generated with specific dimensions and colors, and it can include a gradient effect (either vertical or horizontal). If a second color is not provided, the bitmap will be a flat color. The user is responsible for destroying the brush if it is not managed by the system.

---

### DATA Members

1. **`hBrush`**
- **Type**: Handle
- **Description**: This holds the handle to the brush created from the bitmap. The brush is used for filling shapes or backgrounds in graphical applications.

2. **`hBitmap`**
- **Type**: Handle
- **Description**: This holds the handle to the bitmap created with the specified dimensions and colors. The bitmap is used to create the brush.

---

### METHODS

#### 1. **`New(nWidth, nHeight, nColor, nColor2, lVGrad)`**
- **Type**: Constructor
- **Parameters**:
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `nColor`: The primary color of the bitmap.
- `nColor2`: (Optional) The secondary color for creating a gradient effect. If not provided, the bitmap will be a flat color.
- `lVGrad`: (Optional) A logical value indicating whether the gradient is vertical (`TRUE`) or horizontal (`FALSE`).
- **Description**:
- This method creates a bitmap using the `CreaBitmapEx` function with the specified dimensions, colors, and gradient orientation.
- It then creates a brush (`hBrush`) from the bitmap using the `CreatePatternBrush` function.
- The method returns the instance of the `TBrushEx` class.

#### 2. **`NewEx(nWidth, nHeight, nColor, nColor2, nColor3, nColor4, lVGrad)`**
- **Type**: Constructor
- **Parameters**:
- `nWidth`: The width of the bitmap.
- `nHeight`: The height of the bitmap.
- `nColor`: The primary color of the bitmap.
- `nColor2`: The secondary color for creating a gradient effect.
- `nColor3`: The third color for more complex gradient effects.
- `nColor4`: The fourth color for more complex gradient effects.
- `lVGrad`: (Optional) A logical value indicating whether the gradient is vertical (`TRUE`) or horizontal (`FALSE`).
- **Description**:
- This method creates a bitmap using the `CreaBitmapEx2` function with the specified dimensions, colors, and gradient orientation.
- It then creates a brush (`hBrush`) from the bitmap using the `CreatePatternBrush` function.
- The method returns the instance of the `TBrushEx` class.

#### 3. **`End()`**
- **Type**: Destructor
- **Description**:
- This method is used to clean up resources by deleting the brush (`hBrush`) and the bitmap (`hBitmap`) using the `DeleteObject` function.
- It is marked as `INLINE`, meaning the code is directly inserted where the method is called, improving performance for small, frequently used methods.

---

### Notes:
- The `TBrushEx` class is useful for creating custom brushes with gradients or flat colors, which can be used in graphical applications.
- The user must manually call the `End()` method to release resources when the brush is no longer needed, unless the system manages it.
- The commented-out lines (`//::nCount := 1` and `//AAdd( ::aBrushes, Self )`) suggest that the class might have been designed to track instances or manage a collection of brushes, but this functionality is not implemented in the provided code.

---

This class is a powerful tool for creating and managing custom brushes in graphical applications, especially when gradients or specific color patterns are required.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:48:21-07:00 2025-01-17T15:48:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276982#p276982
### Documentation for the `TBtnBmp` Class

The `TBtnBmp` class is a custom button control class in the FiveWin library, designed to handle bitmap buttons with various states (normal, pressed, disabled, hover). It supports features like bitmap loading, button states, tooltips, and more. This class is particularly useful for creating visually rich buttons with images and text.

---

### **Class Overview**

- **Purpose**: The `TBtnBmp` class is used to create buttons that can display bitmaps and text. It supports multiple states (normal, pressed, disabled, hover) and can be customized with different layouts, borders, and styles.
- **Inheritance**: Inherits from `TControl`, which is a base class for controls in FiveWin.
- **Features**:
- Supports bitmap buttons with up to 4 states (normal, pressed, disabled, hover).
- Customizable layouts (top, left, bottom, right, center).
- Supports transparency, gradients, and themed buttons.
- Handles mouse and keyboard events.
- Can display tooltips and popup menus.

---

### **DATA Members**

| **DATA** | **Type** | **Description** |
|------------------------|----------------|---------------------------------------------------------------------------------|
| `bAction` | Block | Codeblock to execute when the button is clicked. |
| `aBmpRect` | Array | Rectangle coordinates for the bitmap. |
| `cAction` | String | A string description of the action. |
| `lPressed` | Logical | Indicates if the button is currently pressed. |
| `lAdjust` | Logical | Indicates if the button should adjust its size based on the bitmap. |
| `lGroup` | Logical | Indicates if the button is part of a group. |
| `lWorking` | Logical | Indicates if the button is currently processing an action. |
| `lBtnUp` | Logical | Indicates if the button is in the "up" state. |
| `lBtnDown` | Logical | Indicates if the button is in the "down" state. |
| `lBoxSelect` | Logical | Indicates if the button should display a selection box. |
| `hBitmap1` | Handle | Handle to the normal state bitmap. |
| `hPalette1` | Handle | Palette for the normal state bitmap. |
| `hBitmap2` | Handle | Handle to the pressed state bitmap. |
| `hPalette2` | Handle | Palette for the pressed state bitmap. |
| `hBitmap3` | Handle | Handle to the disabled state bitmap. |
| `hPalette3` | Handle | Palette for the disabled state bitmap. |
| `hBitmap4` | Handle | Handle to the hover state bitmap. |
| `hPalette4` | Handle | Palette for the hover state bitmap. |
| `aImages` | Array | Array containing bitmap handles and related data for all states. |
| `aGradRect` | Array | Rectangle coordinates for gradient filling. |
| `aBrushOrg` | Array | Brush origin coordinates. |
| `cGrpLabel` | String | Group label for grouped buttons. |
| `aGrpClr` | Array | Group color settings. |
| `hBmp` | Handle | Current bitmap handle being painted. |
| `hPal` | Handle | Current palette handle being painted. |
| `lAlpha` | Logical | Indicates if the current bitmap has alpha transparency. |
| `nClrBack` | Numeric | Background color for the button. |
| `nTxtW` | Numeric | Width of the text. |
| `nBmpMargin` | Numeric | Margin for the bitmap. |
| `nBmpNo` | Numeric | Current bitmap number being painted. |
| `hRgn` | Handle | Handle to the region used for drawing. |
| `cResName1` | String | Resource name for the normal state bitmap. |
| `cResName2` | String | Resource name for the pressed state bitmap. |
| `cResName3` | String | Resource name for the disabled state bitmap. |
| `cResName4` | String | Resource name for the hover state bitmap. |
| `cBmpFile1` | String | File path for the normal state bitmap. |
| `cBmpFile2` | String | File path for the pressed state bitmap. |
| `cBmpFile3` | String | File path for the disabled state bitmap. |
| `cBmpFile4` | String | File path for the hover state bitmap. |
| `lProcessing` | Logical | Indicates if the button is currently processing an action. |
| `lBorder` | Logical | Indicates if the button has a border. |
| `lRound` | Logical | Indicates if the button has rounded corners. |
| `nRound` | Numeric | Radius for rounded corners. |
| `lEllipse` | Logical | Indicates if the button is elliptical. |
| `lBmpTransparent` | Logical | Indicates if the bitmap is transparent. |
| `oFontBold` | Object | Bold font object for the button text. |
| `oPopup` | Object | Popup menu associated with the button. |
| `nLayout` | Numeric | Layout type for the button (top, left, bottom, right, center). |
| `lMOver` | Logical | Indicates if the mouse is over the button. |
| `bClrGrad` | Block | Codeblock for gradient colors. |
| `l2007` | Logical | Indicates if the button uses the 2007 style. |
| `l2010` | Logical | Indicates if the button uses the 2010 style. |
| `lBarBtn` | Logical | Indicates if the button is part of a toolbar. |
| `lBtnBarBtn` | Logical | Indicates if the button is part of a toolbar and its parent is `TBar`. |
| `aAlpha` | Array | Array indicating if each bitmap has alpha transparency. |
| `bAlphaLevel` | Block | Codeblock for alpha level. |
| `hAlphaLevel` | Numeric | Alpha level for the bitmap. |
| `bColorMap` | Block | Codeblock for color mapping. |
| `bBmpNo` | Block | Codeblock for determining the current bitmap number. |
| `lDisColor` | Logical | Indicates if the button should use a disabled color. |
| `nClrTextDis` | Numeric | Disabled text color. |
| `nClrBorder` | Numeric | Border color. |
| `lFlatStyle` | Logical | Indicates if the button uses a flat style. |
| `nClrFocusRect` | Numeric | Color for the focus rectangle. |
| `nPenFocusRect` | Numeric | Pen style for the focus rectangle. |
| `nDeepFocusRect` | Numeric | Depth of the focus rectangle. |
| `lRight` | Logical | Indicates if the button is aligned to the right. |
| `nSaveLeft` | Numeric | Saved left position for the button. |
| `lThemed` | Logical | Indicates if the button uses a theme. |
| `oTheme` | Object | Theme object for themed buttons. |
| `lGDIP` | Logical | Indicates if the button uses GDI+ for drawing. |
| `l2013` | Logical | Indicates if the button uses the 2013 style. |
| `l2015` | Logical | Indicates if the button uses the 2015 style. |
| `lRegistered` | Logical | Indicates if the button is registered. |
| `lDefaultTheme` | Logical | Indicates if the button uses the default theme. |
| `lLegacyLookLeftRight` | Logical | Indicates if the button uses the legacy left/right look. |

---

### **METHODS**

| **Method** | **Description** |
|--------------------------------|---------------------------------------------------------------------------------|
| `New()` | Constructor for creating a new `TBtnBmp` instance. |
| `NewBar()` | Constructor for creating a new toolbar button. |
| `ReDefine()` | Redefines an existing button. |
| `Click()` | Handles the button click event. |
| `Display()` | Displays the button by painting it. |
| `Disable()` | Disables the button. |
| `Enable()` | Enables the button. |
| `End()` | Destroys the button. |
| `EraseBkGnd()` | Erases the background of the button. |
| `FreeBitmaps()` | Frees the bitmap resources. |
| `GetBmp()` | Selects the bitmap handle to paint based on the button state. |
| `GoUp()` | Sets the button to the "up" state. |
| `GoDown()` | Sets the button to the "down" state. |
| `ResetBorder()` | Resets the button border. |
| `cGenPRG()` | Generates PRG code for the button. |
| `LButtonDown()` | Handles the left mouse button down event. |
| `LButtonUp()` | Handles the left mouse button up event. |
| `LoadBitmaps()` | Loads bitmaps for the button states. |
| `SetImages()` | Sets the images for the button states. |
| `GotFocus()` | Handles the focus event. |
| `Initiate()` | Initializes the button. |
| `KeyChar()` | Handles key character events. |
| `KeyDown()` | Handles key down events. |
| `LostFocus()` | Handles the focus lost event. |
| `Paint()` | Paints the button. |
| `PaintBitmap()` | Paints the bitmap on the button. |
| `PaintBorder()` | Paints the button border. |
| `PaintCaption()` | Paints the button caption. |
| `PaintPopupSection()` | Paints the popup section of the button. |
| `FillArea()` | Fills the button area with a specified color or gradient. |
| `PaintBackGroundAs20072010()` | Paints the background in the 2007/2010 style. |
| `PaintBackGroundStandard()` | Paints the background in the standard style. |
| `PaintBackGroundThemed()` | Paints the background in the themed style. |
| `MouseMove()` | Handles mouse movement over the button. |
| `Destroy()` | Destroys the button and frees resources. |
| `DrawEllipse()` | Draws an ellipse on the button. |
| `DrawFocusEllipse()` | Draws a focus ellipse on the button. |
| `FocusRect()` | Draws a focus rectangle on the button. |
| `SetFile()` | Sets the bitmap files for the button states. |
| `Toggle()` | Toggles the button state between pressed and unpressed. |
| `HandleEvent()` | Handles various events (mouse, keyboard, etc.). |
| `HasAlpha()` | Checks if a bitmap has alpha transparency. |
| `MouseLeave()` | Handles the mouse leave event. |
| `ShowPopup()` | Displays a popup menu associated with the button. |
| `SetColor()` | Sets the button's text and background colors. |
| `nAlphaLevel()` | Gets or sets the alpha level for the button. |
| `aGrad()` | Returns the gradient colors for the button. |
| `CheckTheme()` | Checks and applies the theme for the button. |
| `SetThemed()` | Enables or disables the themed style for the button. |
| `Html()` | Generates HTML code for the button. |
| `_Eval()` | Evaluates a codeblock with the button as a parameter. |

---

### **Key Features**

1. **Bitmap Support**: The class supports up to 4 bitmaps for different button states (normal, pressed, disabled, hover).
2. **Customizable Layouts**: The button can be customized to display text and bitmaps in different layouts (top, left, bottom, right, center).
3. **Transparency and Gradients**: Supports transparent bitmaps and gradient backgrounds.
4. **Themed Buttons**: Can be themed to match the application's style.
5. **Popup Menus**: Supports popup menus for additional functionality.
6. **Event Handling**: Handles mouse and keyboard events, including clicks, focus, and key presses.

---

### **Usage Example**

```clipper
// Create a new bitmap button
oBtn := TBtnBmp():New( 10, 10, 100, 30, "normal.bmp", "pressed.bmp", ;
{ || MsgInfo("Button Clicked!") }, oWnd, "Click Me" )

// Set a tooltip for the button
oBtn:cToolTip := "Click this button to perform an action."

// Disable the button
oBtn:Disable()

// Enable the button
oBtn:Enable()
```

---

This class is highly customizable and can be used to create visually appealing buttons with various states and styles. It is particularly useful in applications where buttons need to display images and text in different layouts.
]]>
### Documentation for the `TBtnBmp` Class

The `TBtnBmp` class is a custom button control class in the FiveWin library, designed to handle bitmap buttons with various states (normal, pressed, disabled, hover). It supports features like bitmap loading, button states, tooltips, and more. This class is particularly useful for creating visually rich buttons with images and text.

---

### **Class Overview**

- **Purpose**: The `TBtnBmp` class is used to create buttons that can display bitmaps and text. It supports multiple states (normal, pressed, disabled, hover) and can be customized with different layouts, borders, and styles.
- **Inheritance**: Inherits from `TControl`, which is a base class for controls in FiveWin.
- **Features**:
- Supports bitmap buttons with up to 4 states (normal, pressed, disabled, hover).
- Customizable layouts (top, left, bottom, right, center).
- Supports transparency, gradients, and themed buttons.
- Handles mouse and keyboard events.
- Can display tooltips and popup menus.

---

### **DATA Members**

| **DATA** | **Type** | **Description** |
|------------------------|----------------|---------------------------------------------------------------------------------|
| `bAction` | Block | Codeblock to execute when the button is clicked. |
| `aBmpRect` | Array | Rectangle coordinates for the bitmap. |
| `cAction` | String | A string description of the action. |
| `lPressed` | Logical | Indicates if the button is currently pressed. |
| `lAdjust` | Logical | Indicates if the button should adjust its size based on the bitmap. |
| `lGroup` | Logical | Indicates if the button is part of a group. |
| `lWorking` | Logical | Indicates if the button is currently processing an action. |
| `lBtnUp` | Logical | Indicates if the button is in the "up" state. |
| `lBtnDown` | Logical | Indicates if the button is in the "down" state. |
| `lBoxSelect` | Logical | Indicates if the button should display a selection box. |
| `hBitmap1` | Handle | Handle to the normal state bitmap. |
| `hPalette1` | Handle | Palette for the normal state bitmap. |
| `hBitmap2` | Handle | Handle to the pressed state bitmap. |
| `hPalette2` | Handle | Palette for the pressed state bitmap. |
| `hBitmap3` | Handle | Handle to the disabled state bitmap. |
| `hPalette3` | Handle | Palette for the disabled state bitmap. |
| `hBitmap4` | Handle | Handle to the hover state bitmap. |
| `hPalette4` | Handle | Palette for the hover state bitmap. |
| `aImages` | Array | Array containing bitmap handles and related data for all states. |
| `aGradRect` | Array | Rectangle coordinates for gradient filling. |
| `aBrushOrg` | Array | Brush origin coordinates. |
| `cGrpLabel` | String | Group label for grouped buttons. |
| `aGrpClr` | Array | Group color settings. |
| `hBmp` | Handle | Current bitmap handle being painted. |
| `hPal` | Handle | Current palette handle being painted. |
| `lAlpha` | Logical | Indicates if the current bitmap has alpha transparency. |
| `nClrBack` | Numeric | Background color for the button. |
| `nTxtW` | Numeric | Width of the text. |
| `nBmpMargin` | Numeric | Margin for the bitmap. |
| `nBmpNo` | Numeric | Current bitmap number being painted. |
| `hRgn` | Handle | Handle to the region used for drawing. |
| `cResName1` | String | Resource name for the normal state bitmap. |
| `cResName2` | String | Resource name for the pressed state bitmap. |
| `cResName3` | String | Resource name for the disabled state bitmap. |
| `cResName4` | String | Resource name for the hover state bitmap. |
| `cBmpFile1` | String | File path for the normal state bitmap. |
| `cBmpFile2` | String | File path for the pressed state bitmap. |
| `cBmpFile3` | String | File path for the disabled state bitmap. |
| `cBmpFile4` | String | File path for the hover state bitmap. |
| `lProcessing` | Logical | Indicates if the button is currently processing an action. |
| `lBorder` | Logical | Indicates if the button has a border. |
| `lRound` | Logical | Indicates if the button has rounded corners. |
| `nRound` | Numeric | Radius for rounded corners. |
| `lEllipse` | Logical | Indicates if the button is elliptical. |
| `lBmpTransparent` | Logical | Indicates if the bitmap is transparent. |
| `oFontBold` | Object | Bold font object for the button text. |
| `oPopup` | Object | Popup menu associated with the button. |
| `nLayout` | Numeric | Layout type for the button (top, left, bottom, right, center). |
| `lMOver` | Logical | Indicates if the mouse is over the button. |
| `bClrGrad` | Block | Codeblock for gradient colors. |
| `l2007` | Logical | Indicates if the button uses the 2007 style. |
| `l2010` | Logical | Indicates if the button uses the 2010 style. |
| `lBarBtn` | Logical | Indicates if the button is part of a toolbar. |
| `lBtnBarBtn` | Logical | Indicates if the button is part of a toolbar and its parent is `TBar`. |
| `aAlpha` | Array | Array indicating if each bitmap has alpha transparency. |
| `bAlphaLevel` | Block | Codeblock for alpha level. |
| `hAlphaLevel` | Numeric | Alpha level for the bitmap. |
| `bColorMap` | Block | Codeblock for color mapping. |
| `bBmpNo` | Block | Codeblock for determining the current bitmap number. |
| `lDisColor` | Logical | Indicates if the button should use a disabled color. |
| `nClrTextDis` | Numeric | Disabled text color. |
| `nClrBorder` | Numeric | Border color. |
| `lFlatStyle` | Logical | Indicates if the button uses a flat style. |
| `nClrFocusRect` | Numeric | Color for the focus rectangle. |
| `nPenFocusRect` | Numeric | Pen style for the focus rectangle. |
| `nDeepFocusRect` | Numeric | Depth of the focus rectangle. |
| `lRight` | Logical | Indicates if the button is aligned to the right. |
| `nSaveLeft` | Numeric | Saved left position for the button. |
| `lThemed` | Logical | Indicates if the button uses a theme. |
| `oTheme` | Object | Theme object for themed buttons. |
| `lGDIP` | Logical | Indicates if the button uses GDI+ for drawing. |
| `l2013` | Logical | Indicates if the button uses the 2013 style. |
| `l2015` | Logical | Indicates if the button uses the 2015 style. |
| `lRegistered` | Logical | Indicates if the button is registered. |
| `lDefaultTheme` | Logical | Indicates if the button uses the default theme. |
| `lLegacyLookLeftRight` | Logical | Indicates if the button uses the legacy left/right look. |

---

### **METHODS**

| **Method** | **Description** |
|--------------------------------|---------------------------------------------------------------------------------|
| `New()` | Constructor for creating a new `TBtnBmp` instance. |
| `NewBar()` | Constructor for creating a new toolbar button. |
| `ReDefine()` | Redefines an existing button. |
| `Click()` | Handles the button click event. |
| `Display()` | Displays the button by painting it. |
| `Disable()` | Disables the button. |
| `Enable()` | Enables the button. |
| `End()` | Destroys the button. |
| `EraseBkGnd()` | Erases the background of the button. |
| `FreeBitmaps()` | Frees the bitmap resources. |
| `GetBmp()` | Selects the bitmap handle to paint based on the button state. |
| `GoUp()` | Sets the button to the "up" state. |
| `GoDown()` | Sets the button to the "down" state. |
| `ResetBorder()` | Resets the button border. |
| `cGenPRG()` | Generates PRG code for the button. |
| `LButtonDown()` | Handles the left mouse button down event. |
| `LButtonUp()` | Handles the left mouse button up event. |
| `LoadBitmaps()` | Loads bitmaps for the button states. |
| `SetImages()` | Sets the images for the button states. |
| `GotFocus()` | Handles the focus event. |
| `Initiate()` | Initializes the button. |
| `KeyChar()` | Handles key character events. |
| `KeyDown()` | Handles key down events. |
| `LostFocus()` | Handles the focus lost event. |
| `Paint()` | Paints the button. |
| `PaintBitmap()` | Paints the bitmap on the button. |
| `PaintBorder()` | Paints the button border. |
| `PaintCaption()` | Paints the button caption. |
| `PaintPopupSection()` | Paints the popup section of the button. |
| `FillArea()` | Fills the button area with a specified color or gradient. |
| `PaintBackGroundAs20072010()` | Paints the background in the 2007/2010 style. |
| `PaintBackGroundStandard()` | Paints the background in the standard style. |
| `PaintBackGroundThemed()` | Paints the background in the themed style. |
| `MouseMove()` | Handles mouse movement over the button. |
| `Destroy()` | Destroys the button and frees resources. |
| `DrawEllipse()` | Draws an ellipse on the button. |
| `DrawFocusEllipse()` | Draws a focus ellipse on the button. |
| `FocusRect()` | Draws a focus rectangle on the button. |
| `SetFile()` | Sets the bitmap files for the button states. |
| `Toggle()` | Toggles the button state between pressed and unpressed. |
| `HandleEvent()` | Handles various events (mouse, keyboard, etc.). |
| `HasAlpha()` | Checks if a bitmap has alpha transparency. |
| `MouseLeave()` | Handles the mouse leave event. |
| `ShowPopup()` | Displays a popup menu associated with the button. |
| `SetColor()` | Sets the button's text and background colors. |
| `nAlphaLevel()` | Gets or sets the alpha level for the button. |
| `aGrad()` | Returns the gradient colors for the button. |
| `CheckTheme()` | Checks and applies the theme for the button. |
| `SetThemed()` | Enables or disables the themed style for the button. |
| `Html()` | Generates HTML code for the button. |
| `_Eval()` | Evaluates a codeblock with the button as a parameter. |

---

### **Key Features**

1. **Bitmap Support**: The class supports up to 4 bitmaps for different button states (normal, pressed, disabled, hover).
2. **Customizable Layouts**: The button can be customized to display text and bitmaps in different layouts (top, left, bottom, right, center).
3. **Transparency and Gradients**: Supports transparent bitmaps and gradient backgrounds.
4. **Themed Buttons**: Can be themed to match the application's style.
5. **Popup Menus**: Supports popup menus for additional functionality.
6. **Event Handling**: Handles mouse and keyboard events, including clicks, focus, and key presses.

---

### **Usage Example**

```clipper
// Create a new bitmap button
oBtn := TBtnBmp():New( 10, 10, 100, 30, "normal.bmp", "pressed.bmp", ;
{ || MsgInfo("Button Clicked!") }, oWnd, "Click Me" )

// Set a tooltip for the button
oBtn:cToolTip := "Click this button to perform an action."

// Disable the button
oBtn:Disable()

// Enable the button
oBtn:Enable()
```

---

This class is highly customizable and can be used to create visually appealing buttons with various states and styles. It is particularly useful in applications where buttons need to display images and text in different layouts.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:49:48-07:00 2025-01-17T15:49:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276983#p276983
### Class Documentation: `TBtnFlat`

#### Overview
The `TBtnFlat` class is a custom control class derived from `TControl` in the FiveWin library. It represents a flat button control that can be used in GUI applications. The class provides methods for creating, redefining, and managing the behavior and appearance of the button, including handling user interactions like clicks, key presses, and focus changes.

---

### Class Data Members (CLASSDATA)

1. **`lRegistered`**
- **Type:** `LOGICAL`
- **Description:** A class-level flag indicating whether the class has been registered with the system. This is typically used to ensure that the class is registered only once.

---

### Instance Data Members (DATA)

1. **`nMargin`**
- **Type:** Numeric
- **Initial Value:** `8`
- **Description:** Specifies the margin (in pixels) around the button's text.

2. **`bAction`**
- **Type:** Block (Code Block)
- **Description:** A code block that defines the action to be executed when the button is clicked.

3. **`lWorking`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is currently processing an action.

4. **`lBtnUp`**
- **Type:** Logical
- **Description:** A flag indicating whether the mouse button has been released.

5. **`lBtnDown`**
- **Type:** Logical
- **Description:** A flag indicating whether the mouse button is pressed down.

6. **`lPressed`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is currently in a pressed state.

7. **`lProcessing`**
- **Type:** Logical
- **Initial Value:** `.F.`
- **Description:** A flag indicating whether the button is currently processing an event.

8. **`lBorder`**
- **Type:** Logical
- **Initial Value:** `.F.`
- **Description:** A flag indicating whether the button should have a border.

9. **`lDefault`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is the default button in a dialog.

10. **`nClrTextDis`**
- **Type:** Numeric
- **Initial Value:** `CLR_BLACK`
- **Description:** The color of the button's text when the button is disabled.

11. **`nClrPaneDis`**
- **Type:** Numeric
- **Initial Value:** `CLR_HGRAY`
- **Description:** The color of the button's background when the button is disabled.

---

### Methods

1. **`New( nTop, nLeft, nWidth, nHeight, cPrompt, oWnd, oFont, bAction, bWhen, lUpdate, lBorder, nClrText, nClrPane, lCancel, lDefault )`**
- **Description:** Constructor method for creating a new `TBtnFlat` instance.
- **Parameters:**
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the button.
- `cPrompt`: The text displayed on the button.
- `oWnd`: The parent window.
- `oFont`: The font used for the button's text.
- `bAction`: The action to be executed when the button is clicked.
- `bWhen`: A condition that must be true for the button to be clickable.
- `lUpdate`: A flag indicating whether the button should be updated.
- `lBorder`: A flag indicating whether the button should have a border.
- `nClrText`: The color of the button's text.
- `nClrPane`: The color of the button's background.
- `lCancel`: A flag indicating whether the button is a cancel button.
- `lDefault`: A flag indicating whether the button is the default button.
- **Returns:** The newly created `TBtnFlat` instance.

2. **`ReDefine( nId, bAction, oWnd, oFont, lUpdate, bWhen, bValid, cPrompt, lBorder, nClrText, nClrPane, lCancel, lDefault )`**
- **Description:** Redefines an existing button control.
- **Parameters:** Similar to the `New` method, but with an additional `nId` parameter to specify the control ID.
- **Returns:** The redefined `TBtnFlat` instance.

3. **`Initiate( hDlg )`**
- **Description:** Initializes the button control within a dialog.
- **Parameters:** `hDlg`: The handle to the dialog.
- **Returns:** The result of the superclass's `Initiate` method.

4. **`Click()`**
- **Description:** Handles the button click event. Executes the `bAction` code block if the `bWhen` condition is true.
- **Returns:** `nil`.

5. **`Display()`**
- **Description:** Displays the button by calling `BeginPaint`, `Paint`, and `EndPaint`.
- **Returns:** `0`.

6. **`Disable()`**
- **Description:** Disables the button and refreshes its appearance.
- **Returns:** `nil`.

7. **`Enable()`**
- **Description:** Enables the button and refreshes its appearance.
- **Returns:** `nil`.

8. **`Paint()`**
- **Description:** Handles the painting of the button, including text and borders.
- **Returns:** `nil`.

9. **`DrawMultiLine( cText, oFont, nColor, nAlign )`**
- **Description:** Draws multi-line text on the button.
- **Parameters:**
- `cText`: The text to be drawn.
- `oFont`: The font to be used.
- `nColor`: The color of the text.
- `nAlign`: The alignment of the text.
- **Returns:** `nil`.

10. **`LButtonDown( nRow, nCol, nFlags, lTouch )`**
- **Description:** Handles the left mouse button down event.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse click.
- `nFlags`: Additional flags.
- `lTouch`: A flag indicating whether the event is a touch event.
- **Returns:** `0`.

11. **`LButtonUp( nRow, nCol )`**
- **Description:** Handles the left mouse button up event.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse release.
- **Returns:** `0`.

12. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the button gains focus.
- **Parameters:** `hCtlLost`: The handle of the control that lost focus.
- **Returns:** `nil`.

13. **`LostFocus( hWndGetFocus )`**
- **Description:** Handles the event when the button loses focus.
- **Parameters:** `hWndGetFocus`: The handle of the control that gained focus.
- **Returns:** `nil`.

14. **`KeyChar( nKey, nFlags )`**
- **Description:** Handles key press events.
- **Parameters:**
- `nKey`: The key code.
- `nFlags`: Additional flags.
- **Returns:** `nil`.

15. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events, particularly for navigation keys (e.g., arrow keys).
- **Parameters:**
- `nKey`: The key code.
- `nFlags`: Additional flags.
- **Returns:** `nil`.

16. **`cGenPRG( lDlgUnits )`**
- **Description:** Generates the PRG code for creating the button.
- **Parameters:** `lDlgUnits`: A flag indicating whether to use dialog units.
- **Returns:** A string containing the generated PRG code.

---

### Summary
The `TBtnFlat` class is a versatile flat button control that can be customized in terms of appearance and behavior. It supports various events like clicks, key presses, and focus changes, and provides methods for drawing the button and handling user interactions. The class is designed to be used in FiveWin-based GUI applications, offering flexibility in terms of text, colors, borders, and actions.
]]>
### Class Documentation: `TBtnFlat`

#### Overview
The `TBtnFlat` class is a custom control class derived from `TControl` in the FiveWin library. It represents a flat button control that can be used in GUI applications. The class provides methods for creating, redefining, and managing the behavior and appearance of the button, including handling user interactions like clicks, key presses, and focus changes.

---

### Class Data Members (CLASSDATA)

1. **`lRegistered`**
- **Type:** `LOGICAL`
- **Description:** A class-level flag indicating whether the class has been registered with the system. This is typically used to ensure that the class is registered only once.

---

### Instance Data Members (DATA)

1. **`nMargin`**
- **Type:** Numeric
- **Initial Value:** `8`
- **Description:** Specifies the margin (in pixels) around the button's text.

2. **`bAction`**
- **Type:** Block (Code Block)
- **Description:** A code block that defines the action to be executed when the button is clicked.

3. **`lWorking`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is currently processing an action.

4. **`lBtnUp`**
- **Type:** Logical
- **Description:** A flag indicating whether the mouse button has been released.

5. **`lBtnDown`**
- **Type:** Logical
- **Description:** A flag indicating whether the mouse button is pressed down.

6. **`lPressed`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is currently in a pressed state.

7. **`lProcessing`**
- **Type:** Logical
- **Initial Value:** `.F.`
- **Description:** A flag indicating whether the button is currently processing an event.

8. **`lBorder`**
- **Type:** Logical
- **Initial Value:** `.F.`
- **Description:** A flag indicating whether the button should have a border.

9. **`lDefault`**
- **Type:** Logical
- **Description:** A flag indicating whether the button is the default button in a dialog.

10. **`nClrTextDis`**
- **Type:** Numeric
- **Initial Value:** `CLR_BLACK`
- **Description:** The color of the button's text when the button is disabled.

11. **`nClrPaneDis`**
- **Type:** Numeric
- **Initial Value:** `CLR_HGRAY`
- **Description:** The color of the button's background when the button is disabled.

---

### Methods

1. **`New( nTop, nLeft, nWidth, nHeight, cPrompt, oWnd, oFont, bAction, bWhen, lUpdate, lBorder, nClrText, nClrPane, lCancel, lDefault )`**
- **Description:** Constructor method for creating a new `TBtnFlat` instance.
- **Parameters:**
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the button.
- `cPrompt`: The text displayed on the button.
- `oWnd`: The parent window.
- `oFont`: The font used for the button's text.
- `bAction`: The action to be executed when the button is clicked.
- `bWhen`: A condition that must be true for the button to be clickable.
- `lUpdate`: A flag indicating whether the button should be updated.
- `lBorder`: A flag indicating whether the button should have a border.
- `nClrText`: The color of the button's text.
- `nClrPane`: The color of the button's background.
- `lCancel`: A flag indicating whether the button is a cancel button.
- `lDefault`: A flag indicating whether the button is the default button.
- **Returns:** The newly created `TBtnFlat` instance.

2. **`ReDefine( nId, bAction, oWnd, oFont, lUpdate, bWhen, bValid, cPrompt, lBorder, nClrText, nClrPane, lCancel, lDefault )`**
- **Description:** Redefines an existing button control.
- **Parameters:** Similar to the `New` method, but with an additional `nId` parameter to specify the control ID.
- **Returns:** The redefined `TBtnFlat` instance.

3. **`Initiate( hDlg )`**
- **Description:** Initializes the button control within a dialog.
- **Parameters:** `hDlg`: The handle to the dialog.
- **Returns:** The result of the superclass's `Initiate` method.

4. **`Click()`**
- **Description:** Handles the button click event. Executes the `bAction` code block if the `bWhen` condition is true.
- **Returns:** `nil`.

5. **`Display()`**
- **Description:** Displays the button by calling `BeginPaint`, `Paint`, and `EndPaint`.
- **Returns:** `0`.

6. **`Disable()`**
- **Description:** Disables the button and refreshes its appearance.
- **Returns:** `nil`.

7. **`Enable()`**
- **Description:** Enables the button and refreshes its appearance.
- **Returns:** `nil`.

8. **`Paint()`**
- **Description:** Handles the painting of the button, including text and borders.
- **Returns:** `nil`.

9. **`DrawMultiLine( cText, oFont, nColor, nAlign )`**
- **Description:** Draws multi-line text on the button.
- **Parameters:**
- `cText`: The text to be drawn.
- `oFont`: The font to be used.
- `nColor`: The color of the text.
- `nAlign`: The alignment of the text.
- **Returns:** `nil`.

10. **`LButtonDown( nRow, nCol, nFlags, lTouch )`**
- **Description:** Handles the left mouse button down event.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse click.
- `nFlags`: Additional flags.
- `lTouch`: A flag indicating whether the event is a touch event.
- **Returns:** `0`.

11. **`LButtonUp( nRow, nCol )`**
- **Description:** Handles the left mouse button up event.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse release.
- **Returns:** `0`.

12. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the button gains focus.
- **Parameters:** `hCtlLost`: The handle of the control that lost focus.
- **Returns:** `nil`.

13. **`LostFocus( hWndGetFocus )`**
- **Description:** Handles the event when the button loses focus.
- **Parameters:** `hWndGetFocus`: The handle of the control that gained focus.
- **Returns:** `nil`.

14. **`KeyChar( nKey, nFlags )`**
- **Description:** Handles key press events.
- **Parameters:**
- `nKey`: The key code.
- `nFlags`: Additional flags.
- **Returns:** `nil`.

15. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events, particularly for navigation keys (e.g., arrow keys).
- **Parameters:**
- `nKey`: The key code.
- `nFlags`: Additional flags.
- **Returns:** `nil`.

16. **`cGenPRG( lDlgUnits )`**
- **Description:** Generates the PRG code for creating the button.
- **Parameters:** `lDlgUnits`: A flag indicating whether to use dialog units.
- **Returns:** A string containing the generated PRG code.

---

### Summary
The `TBtnFlat` class is a versatile flat button control that can be customized in terms of appearance and behavior. It supports various events like clicks, key presses, and focus changes, and provides methods for drawing the button and handling user interactions. The class is designed to be used in FiveWin-based GUI applications, offering flexibility in terms of text, colors, borders, and actions.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T15:54:18-07:00 2025-01-17T15:54:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276984#p276984
### Class Documentation: `TButton`

#### Overview
The `TButton` class is a subclass of `TControl` and is designed to represent a button control in a graphical user interface (GUI) application. It provides functionality for creating, managing, and interacting with buttons, including handling click events, focus changes, and key presses. The class is part of the FiveWin library, which is commonly used for developing Windows applications in the xBase language (e.g., Clipper, Harbour).

#### Data Members (DATA)
1. **`bAction`**
- **Type:** Block (Code block)
- **Description:** A code block that defines the action to be executed when the button is clicked. This block typically contains the logic that should run in response to a button click event.

2. **`lDefault`**
- **Type:** Logical (Boolean)
- **Description:** Indicates whether the button is the default button in the window. A default button is typically highlighted and activated when the user presses the Enter key.

3. **`lProcessing`**
- **Type:** Logical (Boolean)
- **Description:** A flag used to prevent multiple simultaneous executions of the button's action. It ensures that the button's action is not triggered again while it is already being processed.

4. **`aEvents`**
- **Type:** Array
- **Description:** A class-level array that defines the events supported by the button. In this case, it includes the `OnClick` event, which is triggered when the button is clicked.

#### Methods (METHOD)

1. **`New( nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight, nHelpId, oFont, lDefault, lPixel, lDesign, cMsg, lUpdate, bWhen, bValid, lCancel, cVarName, lMultiline, nAddlStyle, lRelPix )`**
- **Description:** Constructor method for creating a new `TButton` instance. It initializes the button with the specified properties such as position, caption, size, and action.
- **Parameters:**
- `nRow`, `nCol`: The row and column positions of the button.
- `cCaption`: The text displayed on the button.
- `oWnd`: The parent window to which the button belongs.
- `bAction`: The code block to execute when the button is clicked.
- `nWidth`, `nHeight`: The width and height of the button.
- `nHelpId`: The help context ID for the button.
- `oFont`: The font used for the button's text.
- `lDefault`: Whether the button is the default button.
- `lPixel`: Whether the coordinates are in pixels.
- `lDesign`: Whether the button is in design mode.
- `cMsg`: The tooltip or message associated with the button.
- `lUpdate`: Whether the button should update its state.
- `bWhen`, `bValid`: Code blocks for validation and enabling/disabling the button.
- `lCancel`: Whether the button is a cancel button.
- `cVarName`: The variable name for the button.
- `lMultiline`: Whether the button supports multiline text.
- `nAddlStyle`: Additional styles for the button.
- `lRelPix`: Whether the coordinates are relative to pixels.

2. **`ReDefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen, bValid, cPrompt, lCancel )`**
- **Description:** Redefines an existing button with new properties. This method is used to modify an already created button.
- **Parameters:**
- `nId`: The ID of the button to redefine.
- `bAction`: The new action to execute when the button is clicked.
- `oWnd`: The parent window.
- `nHelpId`: The new help context ID.
- `cMsg`: The new tooltip or message.
- `lUpdate`: Whether the button should update its state.
- `bWhen`, `bValid`: New validation and enabling/disabling code blocks.
- `cPrompt`: The new caption for the button.
- `lCancel`: Whether the button is a cancel button.

3. **`Click()`**
- **Description:** Handles the button click event. It executes the `bAction` code block if it is defined and not already being processed. It also manages focus and button style changes.

4. **`Refresh( lErase )`**
- **Description:** Refreshes the button's display. If the button is associated with a variable (`bSetGet`), it updates the button's text with the current value of the variable.
- **Parameters:**
- `lErase`: Whether to erase the background before refreshing.

5. **`cGenPRG( lDlgUnits )`**
- **Description:** Generates the source code (PRG) representation of the button, which can be used to recreate the button programmatically.
- **Parameters:**
- `lDlgUnits`: Whether to use dialog units for coordinates.

6. **`GetDlgCode( nLastKey )`**
- **Description:** Determines the dialog code for the button, which controls how the button interacts with keyboard input.
- **Parameters:**
- `nLastKey`: The last key pressed.

7. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the button gains focus. It updates the button's style to indicate that it is the default button.
- **Parameters:**
- `hCtlLost`: The handle of the control that lost focus.

8. **`LButtonUp( nRow, nCol, nKeyFlags )`**
- **Description:** Handles the left mouse button up event. It triggers the `OnClick` event if it is defined.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse pointer.
- `nKeyFlags`: The state of the mouse buttons and keyboard keys.

9. **`LostFocus( hCtlFocus )`**
- **Description:** Handles the event when the button loses focus. It updates the button's style to indicate that it is no longer the default button.
- **Parameters:**
- `hCtlFocus`: The handle of the control that gained focus.

10. **`MouseMove( nRow, nCol, nKeyFlags )`**
- **Description:** Handles the mouse move event. It calls the parent class's `MouseMove` method.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse pointer.
- `nKeyFlags`: The state of the mouse buttons and keyboard keys.

11. **`cToChar()`**
- **Description:** Converts the button to a string representation. It returns the string "BUTTON".

12. **`Colors()`**
- **Description:** Returns the color settings for the button. In this implementation, it always returns `0`.

13. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events. It processes navigation keys (Up, Down, Left, Right) and the Enter key.
- **Parameters:**
- `nKey`: The key code of the pressed key.
- `nFlags`: Additional flags for the key event.

14. **`Initiate( hDlg )`**
- **Description:** Initializes the button when it is created. It sets the button's default state and updates its caption.
- **Parameters:**
- `hDlg`: The handle of the dialog window.

15. **`SaveToRC( nIndent )`**
- **Description:** Generates a resource script (RC) representation of the button, which can be used to create the button in a resource file.
- **Parameters:**
- `nIndent`: The number of spaces to indent the RC code.

16. **`Html()`**
- **Description:** Generates an HTML representation of the button. This method is currently a placeholder and does not contain any implementation.

#### Additional Notes
- The class includes commented-out code related to skinning and painting, which suggests that the class may have had or may have planned support for custom button appearances.
- The class is designed to be flexible and extensible, allowing for various button styles, actions, and behaviors to be defined at runtime.

This documentation provides a comprehensive overview of the `TButton` class, its data members, and methods, making it easier to understand and use in a FiveWin application.
]]>
### Class Documentation: `TButton`

#### Overview
The `TButton` class is a subclass of `TControl` and is designed to represent a button control in a graphical user interface (GUI) application. It provides functionality for creating, managing, and interacting with buttons, including handling click events, focus changes, and key presses. The class is part of the FiveWin library, which is commonly used for developing Windows applications in the xBase language (e.g., Clipper, Harbour).

#### Data Members (DATA)
1. **`bAction`**
- **Type:** Block (Code block)
- **Description:** A code block that defines the action to be executed when the button is clicked. This block typically contains the logic that should run in response to a button click event.

2. **`lDefault`**
- **Type:** Logical (Boolean)
- **Description:** Indicates whether the button is the default button in the window. A default button is typically highlighted and activated when the user presses the Enter key.

3. **`lProcessing`**
- **Type:** Logical (Boolean)
- **Description:** A flag used to prevent multiple simultaneous executions of the button's action. It ensures that the button's action is not triggered again while it is already being processed.

4. **`aEvents`**
- **Type:** Array
- **Description:** A class-level array that defines the events supported by the button. In this case, it includes the `OnClick` event, which is triggered when the button is clicked.

#### Methods (METHOD)

1. **`New( nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight, nHelpId, oFont, lDefault, lPixel, lDesign, cMsg, lUpdate, bWhen, bValid, lCancel, cVarName, lMultiline, nAddlStyle, lRelPix )`**
- **Description:** Constructor method for creating a new `TButton` instance. It initializes the button with the specified properties such as position, caption, size, and action.
- **Parameters:**
- `nRow`, `nCol`: The row and column positions of the button.
- `cCaption`: The text displayed on the button.
- `oWnd`: The parent window to which the button belongs.
- `bAction`: The code block to execute when the button is clicked.
- `nWidth`, `nHeight`: The width and height of the button.
- `nHelpId`: The help context ID for the button.
- `oFont`: The font used for the button's text.
- `lDefault`: Whether the button is the default button.
- `lPixel`: Whether the coordinates are in pixels.
- `lDesign`: Whether the button is in design mode.
- `cMsg`: The tooltip or message associated with the button.
- `lUpdate`: Whether the button should update its state.
- `bWhen`, `bValid`: Code blocks for validation and enabling/disabling the button.
- `lCancel`: Whether the button is a cancel button.
- `cVarName`: The variable name for the button.
- `lMultiline`: Whether the button supports multiline text.
- `nAddlStyle`: Additional styles for the button.
- `lRelPix`: Whether the coordinates are relative to pixels.

2. **`ReDefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen, bValid, cPrompt, lCancel )`**
- **Description:** Redefines an existing button with new properties. This method is used to modify an already created button.
- **Parameters:**
- `nId`: The ID of the button to redefine.
- `bAction`: The new action to execute when the button is clicked.
- `oWnd`: The parent window.
- `nHelpId`: The new help context ID.
- `cMsg`: The new tooltip or message.
- `lUpdate`: Whether the button should update its state.
- `bWhen`, `bValid`: New validation and enabling/disabling code blocks.
- `cPrompt`: The new caption for the button.
- `lCancel`: Whether the button is a cancel button.

3. **`Click()`**
- **Description:** Handles the button click event. It executes the `bAction` code block if it is defined and not already being processed. It also manages focus and button style changes.

4. **`Refresh( lErase )`**
- **Description:** Refreshes the button's display. If the button is associated with a variable (`bSetGet`), it updates the button's text with the current value of the variable.
- **Parameters:**
- `lErase`: Whether to erase the background before refreshing.

5. **`cGenPRG( lDlgUnits )`**
- **Description:** Generates the source code (PRG) representation of the button, which can be used to recreate the button programmatically.
- **Parameters:**
- `lDlgUnits`: Whether to use dialog units for coordinates.

6. **`GetDlgCode( nLastKey )`**
- **Description:** Determines the dialog code for the button, which controls how the button interacts with keyboard input.
- **Parameters:**
- `nLastKey`: The last key pressed.

7. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the button gains focus. It updates the button's style to indicate that it is the default button.
- **Parameters:**
- `hCtlLost`: The handle of the control that lost focus.

8. **`LButtonUp( nRow, nCol, nKeyFlags )`**
- **Description:** Handles the left mouse button up event. It triggers the `OnClick` event if it is defined.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse pointer.
- `nKeyFlags`: The state of the mouse buttons and keyboard keys.

9. **`LostFocus( hCtlFocus )`**
- **Description:** Handles the event when the button loses focus. It updates the button's style to indicate that it is no longer the default button.
- **Parameters:**
- `hCtlFocus`: The handle of the control that gained focus.

10. **`MouseMove( nRow, nCol, nKeyFlags )`**
- **Description:** Handles the mouse move event. It calls the parent class's `MouseMove` method.
- **Parameters:**
- `nRow`, `nCol`: The coordinates of the mouse pointer.
- `nKeyFlags`: The state of the mouse buttons and keyboard keys.

11. **`cToChar()`**
- **Description:** Converts the button to a string representation. It returns the string "BUTTON".

12. **`Colors()`**
- **Description:** Returns the color settings for the button. In this implementation, it always returns `0`.

13. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events. It processes navigation keys (Up, Down, Left, Right) and the Enter key.
- **Parameters:**
- `nKey`: The key code of the pressed key.
- `nFlags`: Additional flags for the key event.

14. **`Initiate( hDlg )`**
- **Description:** Initializes the button when it is created. It sets the button's default state and updates its caption.
- **Parameters:**
- `hDlg`: The handle of the dialog window.

15. **`SaveToRC( nIndent )`**
- **Description:** Generates a resource script (RC) representation of the button, which can be used to create the button in a resource file.
- **Parameters:**
- `nIndent`: The number of spaces to indent the RC code.

16. **`Html()`**
- **Description:** Generates an HTML representation of the button. This method is currently a placeholder and does not contain any implementation.

#### Additional Notes
- The class includes commented-out code related to skinning and painting, which suggests that the class may have had or may have planned support for custom button appearances.
- The class is designed to be flexible and extensible, allowing for various button styles, actions, and behaviors to be defined at runtime.

This documentation provides a comprehensive overview of the `TButton` class, its data members, and methods, making it easier to understand and use in a FiveWin application.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:00:47-07:00 2025-01-17T16:00:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276985#p276985
### Class Documentation: `TButtonBmp`

#### Overview
The `TButtonBmp` class is a specialized button class that extends the functionality of the `TButton` class by adding support for bitmap images. This class allows you to create buttons with custom bitmaps, control the layout of text and images, and handle various button states (e.g., pressed, disabled). It also supports alpha transparency for bitmaps, enabling more visually appealing buttons.

#### Class Hierarchy
- **Parent Class:** `TButton`
- **Child Class:** `TButtonBmp`

#### Class Data Members (DATAs)

1. **`aPalBmp`**
- **Type:** Array
- **Description:** Stores information about the bitmap, including the handle, dimensions, and transparency data.

2. **`cPosText`**
- **Type:** String
- **Description:** Specifies the position of the text relative to the bitmap (e.g., "LEFT", "RIGHT", "TOP", "BOTTOM").

3. **`cLayOut`**
- **Type:** String
- **Description:** Defines the layout of the button, such as the alignment of the bitmap and text.

4. **`bAlphaLevel`**
- **Type:** Code Block
- **Description:** A code block that can be evaluated to determine the alpha level (transparency) of the bitmap.

5. **`hAlphaLevel`**
- **Type:** Numeric
- **Description:** Stores the current alpha level (transparency) of the bitmap.

6. **`lBmpTransparent`**
- **Type:** Logical
- **Description:** Indicates whether the bitmap should be drawn with transparency. Default is `.T.` (true).

7. **`lGDIP`**
- **Type:** Logical
- **Description:** Indicates whether GDI+ is used for rendering the bitmap. Default is `.F.` (false). This is a read-only property.

8. **`bColorMap`**
- **Type:** Code Block
- **Description:** A code block that can be evaluated to apply a color map to the bitmap.

#### Class Methods (METHODs)

1. **`New( nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight, nHelpId, oFont, lDefault, lPixel, lDesign, cMsg, lUpdate, bWhen, bValid, lCancel, cBitmap, cPosText, cToolTip, lFlat, cLayOut, lGDIP, lRelPix )`**
- **Description:** Constructor method for creating a new `TButtonBmp` instance.
- **Parameters:**
- `nRow`, `nCol`: Position of the button.
- `cCaption`: Text displayed on the button.
- `oWnd`: Parent window.
- `bAction`: Code block to execute when the button is clicked.
- `nWidth`, `nHeight`: Dimensions of the button.
- `nHelpId`: Help ID for the button.
- `oFont`: Font used for the button text.
- `lDefault`: Whether the button is the default button.
- `lPixel`: Whether dimensions are in pixels.
- `lDesign`: Whether the button is in design mode.
- `cMsg`: Tooltip message.
- `lUpdate`: Whether to update the button.
- `bWhen`, `bValid`: Validation code blocks.
- `lCancel`: Whether the button is a cancel button.
- `cBitmap`: Path to the bitmap file.
- `cPosText`: Position of the text relative to the bitmap.
- `cToolTip`: Tooltip text.
- `lFlat`: Whether the button has a flat style.
- `cLayOut`: Layout of the button.
- `lGDIP`: Whether to use GDI+ for rendering.
- `lRelPix`: Whether to use relative pixel positioning.

2. **`ReDefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP )`**
- **Description:** Redefines an existing button with new properties.
- **Parameters:** Similar to `New()`, but for redefining an existing button.

3. **`Initiate( hDlg )`**
- **Description:** Initializes the button within a dialog.
- **Parameters:**
- `hDlg`: Handle to the dialog.

4. **`HandleEvent( nMsg, nWParam, nLParam )`**
- **Description:** Handles window messages, particularly `WM_UPDATEUISTATE` to refresh the button when necessary.
- **Parameters:**
- `nMsg`: Message ID.
- `nWParam`, `nLParam`: Message parameters.

5. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events and refreshes the button.
- **Parameters:**
- `nKey`: Key code.
- `nFlags`: Key flags.

6. **`LButtonDown( nRow, nCol, nKeyFlags, lTouch )`**
- **Description:** Handles left mouse button down events and refreshes the button.
- **Parameters:**
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.
- `lTouch`: Whether the event is a touch event.

7. **`LDblClick( nRow, nCol, nKeyFlags )`**
- **Description:** Handles left mouse button double-click events and refreshes the button.
- **Parameters:**
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.

8. **`LoadBitmap( cBmpName )`**
- **Description:** Loads a bitmap from a file or resource.
- **Parameters:**
- `cBmpName`: Path to the bitmap file or resource name.

9. **`Paint()`**
- **Description:** Paints the button, including the bitmap and text, based on the current state and layout.

10. **`Release()`**
- **Description:** Releases the bitmap resources associated with the button.

11. **`Destroy()`**
- **Description:** Destroys the button, releasing all resources.

12. **`EraseBkGnd()`**
- **Description:** Handles background erasure. Returns `1` to indicate that the background was handled.

13. **`Enable()`**
- **Description:** Enables the button and refreshes its appearance.

14. **`Disable()`**
- **Description:** Disables the button and refreshes its appearance.

15. **`HasAlpha()`**
- **Description:** Returns whether the bitmap has an alpha channel (transparency).

16. **`nAlphaLevel( uNew )`**
- **Description:** Gets or sets the alpha level (transparency) of the bitmap.
- **Parameters:**
- `uNew`: New alpha level to set (optional).

17. **`SetText( cText )`**
- **Description:** Sets the button's text and refreshes the button.
- **Parameters:**
- `cText`: New text to display on the button.

#### Additional Notes
- The class supports various styles and layouts for the button, including flat buttons, multi-line text, and custom bitmap positioning.
- The `LoadBitmap` method is crucial for loading and managing bitmap resources, and it supports GDI+ for enhanced rendering capabilities.
- The `Paint` method is responsible for rendering the button's appearance, including the bitmap and text, based on the current state and layout settings.

This class is ideal for creating visually rich buttons with custom graphics and advanced layout options in a Windows application.
]]>
### Class Documentation: `TButtonBmp`

#### Overview
The `TButtonBmp` class is a specialized button class that extends the functionality of the `TButton` class by adding support for bitmap images. This class allows you to create buttons with custom bitmaps, control the layout of text and images, and handle various button states (e.g., pressed, disabled). It also supports alpha transparency for bitmaps, enabling more visually appealing buttons.

#### Class Hierarchy
- **Parent Class:** `TButton`
- **Child Class:** `TButtonBmp`

#### Class Data Members (DATAs)

1. **`aPalBmp`**
- **Type:** Array
- **Description:** Stores information about the bitmap, including the handle, dimensions, and transparency data.

2. **`cPosText`**
- **Type:** String
- **Description:** Specifies the position of the text relative to the bitmap (e.g., "LEFT", "RIGHT", "TOP", "BOTTOM").

3. **`cLayOut`**
- **Type:** String
- **Description:** Defines the layout of the button, such as the alignment of the bitmap and text.

4. **`bAlphaLevel`**
- **Type:** Code Block
- **Description:** A code block that can be evaluated to determine the alpha level (transparency) of the bitmap.

5. **`hAlphaLevel`**
- **Type:** Numeric
- **Description:** Stores the current alpha level (transparency) of the bitmap.

6. **`lBmpTransparent`**
- **Type:** Logical
- **Description:** Indicates whether the bitmap should be drawn with transparency. Default is `.T.` (true).

7. **`lGDIP`**
- **Type:** Logical
- **Description:** Indicates whether GDI+ is used for rendering the bitmap. Default is `.F.` (false). This is a read-only property.

8. **`bColorMap`**
- **Type:** Code Block
- **Description:** A code block that can be evaluated to apply a color map to the bitmap.

#### Class Methods (METHODs)

1. **`New( nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight, nHelpId, oFont, lDefault, lPixel, lDesign, cMsg, lUpdate, bWhen, bValid, lCancel, cBitmap, cPosText, cToolTip, lFlat, cLayOut, lGDIP, lRelPix )`**
- **Description:** Constructor method for creating a new `TButtonBmp` instance.
- **Parameters:**
- `nRow`, `nCol`: Position of the button.
- `cCaption`: Text displayed on the button.
- `oWnd`: Parent window.
- `bAction`: Code block to execute when the button is clicked.
- `nWidth`, `nHeight`: Dimensions of the button.
- `nHelpId`: Help ID for the button.
- `oFont`: Font used for the button text.
- `lDefault`: Whether the button is the default button.
- `lPixel`: Whether dimensions are in pixels.
- `lDesign`: Whether the button is in design mode.
- `cMsg`: Tooltip message.
- `lUpdate`: Whether to update the button.
- `bWhen`, `bValid`: Validation code blocks.
- `lCancel`: Whether the button is a cancel button.
- `cBitmap`: Path to the bitmap file.
- `cPosText`: Position of the text relative to the bitmap.
- `cToolTip`: Tooltip text.
- `lFlat`: Whether the button has a flat style.
- `cLayOut`: Layout of the button.
- `lGDIP`: Whether to use GDI+ for rendering.
- `lRelPix`: Whether to use relative pixel positioning.

2. **`ReDefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP )`**
- **Description:** Redefines an existing button with new properties.
- **Parameters:** Similar to `New()`, but for redefining an existing button.

3. **`Initiate( hDlg )`**
- **Description:** Initializes the button within a dialog.
- **Parameters:**
- `hDlg`: Handle to the dialog.

4. **`HandleEvent( nMsg, nWParam, nLParam )`**
- **Description:** Handles window messages, particularly `WM_UPDATEUISTATE` to refresh the button when necessary.
- **Parameters:**
- `nMsg`: Message ID.
- `nWParam`, `nLParam`: Message parameters.

5. **`KeyDown( nKey, nFlags )`**
- **Description:** Handles key down events and refreshes the button.
- **Parameters:**
- `nKey`: Key code.
- `nFlags`: Key flags.

6. **`LButtonDown( nRow, nCol, nKeyFlags, lTouch )`**
- **Description:** Handles left mouse button down events and refreshes the button.
- **Parameters:**
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.
- `lTouch`: Whether the event is a touch event.

7. **`LDblClick( nRow, nCol, nKeyFlags )`**
- **Description:** Handles left mouse button double-click events and refreshes the button.
- **Parameters:**
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.

8. **`LoadBitmap( cBmpName )`**
- **Description:** Loads a bitmap from a file or resource.
- **Parameters:**
- `cBmpName`: Path to the bitmap file or resource name.

9. **`Paint()`**
- **Description:** Paints the button, including the bitmap and text, based on the current state and layout.

10. **`Release()`**
- **Description:** Releases the bitmap resources associated with the button.

11. **`Destroy()`**
- **Description:** Destroys the button, releasing all resources.

12. **`EraseBkGnd()`**
- **Description:** Handles background erasure. Returns `1` to indicate that the background was handled.

13. **`Enable()`**
- **Description:** Enables the button and refreshes its appearance.

14. **`Disable()`**
- **Description:** Disables the button and refreshes its appearance.

15. **`HasAlpha()`**
- **Description:** Returns whether the bitmap has an alpha channel (transparency).

16. **`nAlphaLevel( uNew )`**
- **Description:** Gets or sets the alpha level (transparency) of the bitmap.
- **Parameters:**
- `uNew`: New alpha level to set (optional).

17. **`SetText( cText )`**
- **Description:** Sets the button's text and refreshes the button.
- **Parameters:**
- `cText`: New text to display on the button.

#### Additional Notes
- The class supports various styles and layouts for the button, including flat buttons, multi-line text, and custom bitmap positioning.
- The `LoadBitmap` method is crucial for loading and managing bitmap resources, and it supports GDI+ for enhanced rendering capabilities.
- The `Paint` method is responsible for rendering the button's appearance, including the bitmap and text, based on the current state and layout settings.

This class is ideal for creating visually rich buttons with custom graphics and advanced layout options in a Windows application.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:03:08-07:00 2025-01-17T16:03:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276986#p276986
### Class Documentation: `TC5ToolTip`

#### Overview
The `TC5ToolTip` class is a custom tooltip window class derived from `TWindow` in the FiveWin library. It provides a flexible and customizable tooltip window that can display headers, footers, body text, and images. The class supports various visual customizations, including gradients, borders, and rounded corners. It also includes methods for handling events, resizing, and painting the tooltip window.

#### Class Data Members (DATA)

1. **`lRegistered`** (Class Data)
- **Type:** LOGICAL
- **Description:** Indicates whether the class has been registered.

2. **`lSplitHdr`**
- **Type:** LOGICAL
- **Description:** Indicates whether the header is split.

3. **`lLeft`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip has a left-aligned section.

4. **`lLineHeader`**
- **Type:** LOGICAL
- **Description:** Indicates whether a line should be drawn in the header.

5. **`lLineFoot`**
- **Type:** LOGICAL
- **Description:** Indicates whether a line should be drawn in the footer.

6. **`lBorder`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip should have a border.

7. **`lBtnClose`**
- **Type:** LOGICAL
- **Description:** Indicates whether a close button is present.

8. **`cHeader`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the header.

9. **`cBmpLeft`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed on the left side.

10. **`cBody`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the body.

11. **`cBmpFoot`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed in the footer.

12. **`cFoot`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the footer.

13. **`lRightAlignBody`**
- **Type:** LOGICAL
- **Description:** Indicates whether the body text should be right-aligned.

14. **`cLibHeader`**
- **Type:** CHARACTER
- **Description:** Library or resource for the header.

15. **`cBmpHeader`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed in the header.

16. **`cLibLeft`**
- **Type:** CHARACTER
- **Description:** Library or resource for the left side image.

17. **`cLibFoot`**
- **Type:** CHARACTER
- **Description:** Library or resource for the footer.

18. **`cTumbNail`**
- **Type:** CHARACTER
- **Description:** The path to the thumbnail image.

19. **`cHeader2`**
- **Type:** CHARACTER
- **Description:** Additional header text.

20. **`nClrPane2`**
- **Type:** NUMERIC
- **Description:** The secondary background color.

21. **`nClrBorder`**
- **Type:** NUMERIC
- **Description:** The border color.

22. **`nClrSepara1`**
- **Type:** NUMERIC
- **Description:** The primary separator color.

23. **`nClrSepara2`**
- **Type:** NUMERIC
- **Description:** The secondary separator color.

24. **`nClrTextHeader`**
- **Type:** NUMERIC
- **Description:** The header text color.

25. **`nClrTextBody`**
- **Type:** NUMERIC
- **Description:** The body text color.

26. **`nClrTextFoot`**
- **Type:** NUMERIC
- **Description:** The footer text color.

27. **`oFontHdr`**
- **Type:** OBJECT
- **Description:** The font used for the header.

28. **`oFontHdr2`**
- **Type:** OBJECT
- **Description:** The font used for the secondary header.

29. **`oFontBody`**
- **Type:** OBJECT
- **Description:** The font used for the body.

30. **`oFontPie`**
- **Type:** OBJECT
- **Description:** The font used for the footer.

31. **`aHeader`**
- **Type:** ARRAY
- **Description:** The coordinates of the header section.

32. **`aHeader2`**
- **Type:** ARRAY
- **Description:** The coordinates of the secondary header section.

33. **`aBody`**
- **Type:** ARRAY
- **Description:** The coordinates of the body section.

34. **`aLeft`**
- **Type:** ARRAY
- **Description:** The coordinates of the left section.

35. **`aRight`**
- **Type:** ARRAY
- **Description:** The coordinates of the right section.

36. **`aFoot`**
- **Type:** ARRAY
- **Description:** The coordinates of the footer section.

37. **`aBtnClose`**
- **Type:** ARRAY
- **Description:** The coordinates of the close button.

38. **`nWRadio`**
- **Type:** NUMERIC
- **Description:** The horizontal radius for rounded corners.

39. **`nHRadio`**
- **Type:** NUMERIC
- **Description:** The vertical radius for rounded corners.

40. **`nGetColor`**
- **Type:** NUMERIC
- **Description:** The color used for getting focus.

41. **`aOldPos`**
- **Type:** ARRAY
- **Description:** The old position of the tooltip.

42. **`nOldRow`**
- **Type:** NUMERIC
- **Description:** The old row position.

43. **`nOldCol`**
- **Type:** NUMERIC
- **Description:** The old column position.

44. **`hRgn`**
- **Type:** HANDLE
- **Description:** The handle to the region used for rounded corners.

45. **`nMResize`**
- **Type:** NUMERIC
- **Description:** The resize mode.

46. **`bBmpLeft`**
- **Type:** BLOCK
- **Description:** A code block to generate the left-side bitmap.

47. **`nFixWidth`**
- **Type:** NUMERIC
- **Description:** The fixed width of the tooltip.

48. **`nFixHeight`**
- **Type:** NUMERIC
- **Description:** The fixed height of the tooltip.

49. **`bOwnerDraw`**
- **Type:** BLOCK
- **Description:** A code block for custom drawing.

50. **`oTimer`**
- **Type:** OBJECT
- **Description:** The timer object for auto-hiding the tooltip.

51. **`nTimer`**
- **Type:** NUMERIC
- **Description:** The interval for the auto-hide timer.

52. **`lShowAgain`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip should be shown again.

#### Class Methods (METHOD)

1. **`New( nTop, nLeft, nWidth, nHeight, oWnd, lDisenio, nClrPane, nClrPane2, nClrText, nWRadio, nHRadio )`**
- **Description:** Constructor method. Initializes the tooltip window with the specified position, size, and colors.
- **Parameters:**
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the tooltip.
- `oWnd`: Parent window.
- `lDisenio`: Design flag.
- `nClrPane`, `nClrPane2`: Background colors.
- `nClrText`: Text color.
- `nWRadio`, `nHRadio`: Rounded corner radii.

2. **`Default( lShowDlg )`**
- **Description:** Sets default properties for the tooltip, including rounded corners.
- **Parameters:**
- `lShowDlg`: Flag to show the dialog.

3. **`Destroy()`**
- **Description:** Destroys the tooltip window, releasing resources.

4. **`EndPaint()`**
- **Description:** Ends the painting process.

5. **`Display()`**
- **Description:** Displays the tooltip by painting it.

6. **`Paint()`**
- **Description:** Paints the tooltip window, including headers, footers, and body.

7. **`PaintHdr( hDC, rc )`**
- **Description:** Paints the header section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

8. **`PaintHdr2( hDC, rc )`**
- **Description:** Paints the secondary header section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

9. **`PaintBody( hDC, rc )`**
- **Description:** Paints the body section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

10. **`PaintFoot( hDC, rc )`**
- **Description:** Paints the footer section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

11. **`HandleEvent( nMsg, nWParam, nLParam )`**
- **Description:** Handles window events.
- **Parameters:**
- `nMsg`: Message type.
- `nWParam`, `nLParam`: Message parameters.

12. **`ReSize( nSizeType, nWidth, nHeight )`**
- **Description:** Handles resizing of the tooltip window.
- **Parameters:**
- `nSizeType`: Resize type.
- `nWidth`, `nHeight`: New dimensions.

13. **`lHeader()`**
- **Description:** Checks if the header is non-empty.
- **Returns:** Logical value indicating whether the header is non-empty.

14. **`lFoot()`**
- **Description:** Checks if the footer is non-empty.
- **Returns:** Logical value indicating whether the footer is non-empty.

15. **`GetSize()`**
- **Description:** Calculates and returns the size of the tooltip.
- **Returns:** An array containing the width and height of the tooltip.

16. **`SetSize( nWidth, nHeight )`**
- **Description:** Sets the size of the tooltip.
- **Parameters:**
- `nWidth`, `nHeight`: New dimensions.

#### Static Function

1. **`Line( hDC, nTop, nLeft, nBottom, nRight, nColor, nWidth )`**
- **Description:** Draws a line on the specified device context.
- **Parameters:**
- `hDC`: Device context handle.
- `nTop`, `nLeft`, `nBottom`, `nRight`: Line coordinates.
- `nColor`: Line color.
- `nWidth`: Line width.

### Summary
The `TC5ToolTip` class is a versatile tooltip window class that supports various customizations, including text, images, gradients, and rounded corners. It provides methods for handling events, resizing, and painting the tooltip, making it suitable for creating visually appealing and interactive tooltips in FiveWin applications.
]]>
### Class Documentation: `TC5ToolTip`

#### Overview
The `TC5ToolTip` class is a custom tooltip window class derived from `TWindow` in the FiveWin library. It provides a flexible and customizable tooltip window that can display headers, footers, body text, and images. The class supports various visual customizations, including gradients, borders, and rounded corners. It also includes methods for handling events, resizing, and painting the tooltip window.

#### Class Data Members (DATA)

1. **`lRegistered`** (Class Data)
- **Type:** LOGICAL
- **Description:** Indicates whether the class has been registered.

2. **`lSplitHdr`**
- **Type:** LOGICAL
- **Description:** Indicates whether the header is split.

3. **`lLeft`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip has a left-aligned section.

4. **`lLineHeader`**
- **Type:** LOGICAL
- **Description:** Indicates whether a line should be drawn in the header.

5. **`lLineFoot`**
- **Type:** LOGICAL
- **Description:** Indicates whether a line should be drawn in the footer.

6. **`lBorder`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip should have a border.

7. **`lBtnClose`**
- **Type:** LOGICAL
- **Description:** Indicates whether a close button is present.

8. **`cHeader`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the header.

9. **`cBmpLeft`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed on the left side.

10. **`cBody`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the body.

11. **`cBmpFoot`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed in the footer.

12. **`cFoot`**
- **Type:** CHARACTER
- **Description:** The text to be displayed in the footer.

13. **`lRightAlignBody`**
- **Type:** LOGICAL
- **Description:** Indicates whether the body text should be right-aligned.

14. **`cLibHeader`**
- **Type:** CHARACTER
- **Description:** Library or resource for the header.

15. **`cBmpHeader`**
- **Type:** CHARACTER
- **Description:** The path to the bitmap image to be displayed in the header.

16. **`cLibLeft`**
- **Type:** CHARACTER
- **Description:** Library or resource for the left side image.

17. **`cLibFoot`**
- **Type:** CHARACTER
- **Description:** Library or resource for the footer.

18. **`cTumbNail`**
- **Type:** CHARACTER
- **Description:** The path to the thumbnail image.

19. **`cHeader2`**
- **Type:** CHARACTER
- **Description:** Additional header text.

20. **`nClrPane2`**
- **Type:** NUMERIC
- **Description:** The secondary background color.

21. **`nClrBorder`**
- **Type:** NUMERIC
- **Description:** The border color.

22. **`nClrSepara1`**
- **Type:** NUMERIC
- **Description:** The primary separator color.

23. **`nClrSepara2`**
- **Type:** NUMERIC
- **Description:** The secondary separator color.

24. **`nClrTextHeader`**
- **Type:** NUMERIC
- **Description:** The header text color.

25. **`nClrTextBody`**
- **Type:** NUMERIC
- **Description:** The body text color.

26. **`nClrTextFoot`**
- **Type:** NUMERIC
- **Description:** The footer text color.

27. **`oFontHdr`**
- **Type:** OBJECT
- **Description:** The font used for the header.

28. **`oFontHdr2`**
- **Type:** OBJECT
- **Description:** The font used for the secondary header.

29. **`oFontBody`**
- **Type:** OBJECT
- **Description:** The font used for the body.

30. **`oFontPie`**
- **Type:** OBJECT
- **Description:** The font used for the footer.

31. **`aHeader`**
- **Type:** ARRAY
- **Description:** The coordinates of the header section.

32. **`aHeader2`**
- **Type:** ARRAY
- **Description:** The coordinates of the secondary header section.

33. **`aBody`**
- **Type:** ARRAY
- **Description:** The coordinates of the body section.

34. **`aLeft`**
- **Type:** ARRAY
- **Description:** The coordinates of the left section.

35. **`aRight`**
- **Type:** ARRAY
- **Description:** The coordinates of the right section.

36. **`aFoot`**
- **Type:** ARRAY
- **Description:** The coordinates of the footer section.

37. **`aBtnClose`**
- **Type:** ARRAY
- **Description:** The coordinates of the close button.

38. **`nWRadio`**
- **Type:** NUMERIC
- **Description:** The horizontal radius for rounded corners.

39. **`nHRadio`**
- **Type:** NUMERIC
- **Description:** The vertical radius for rounded corners.

40. **`nGetColor`**
- **Type:** NUMERIC
- **Description:** The color used for getting focus.

41. **`aOldPos`**
- **Type:** ARRAY
- **Description:** The old position of the tooltip.

42. **`nOldRow`**
- **Type:** NUMERIC
- **Description:** The old row position.

43. **`nOldCol`**
- **Type:** NUMERIC
- **Description:** The old column position.

44. **`hRgn`**
- **Type:** HANDLE
- **Description:** The handle to the region used for rounded corners.

45. **`nMResize`**
- **Type:** NUMERIC
- **Description:** The resize mode.

46. **`bBmpLeft`**
- **Type:** BLOCK
- **Description:** A code block to generate the left-side bitmap.

47. **`nFixWidth`**
- **Type:** NUMERIC
- **Description:** The fixed width of the tooltip.

48. **`nFixHeight`**
- **Type:** NUMERIC
- **Description:** The fixed height of the tooltip.

49. **`bOwnerDraw`**
- **Type:** BLOCK
- **Description:** A code block for custom drawing.

50. **`oTimer`**
- **Type:** OBJECT
- **Description:** The timer object for auto-hiding the tooltip.

51. **`nTimer`**
- **Type:** NUMERIC
- **Description:** The interval for the auto-hide timer.

52. **`lShowAgain`**
- **Type:** LOGICAL
- **Description:** Indicates whether the tooltip should be shown again.

#### Class Methods (METHOD)

1. **`New( nTop, nLeft, nWidth, nHeight, oWnd, lDisenio, nClrPane, nClrPane2, nClrText, nWRadio, nHRadio )`**
- **Description:** Constructor method. Initializes the tooltip window with the specified position, size, and colors.
- **Parameters:**
- `nTop`, `nLeft`, `nWidth`, `nHeight`: Position and size of the tooltip.
- `oWnd`: Parent window.
- `lDisenio`: Design flag.
- `nClrPane`, `nClrPane2`: Background colors.
- `nClrText`: Text color.
- `nWRadio`, `nHRadio`: Rounded corner radii.

2. **`Default( lShowDlg )`**
- **Description:** Sets default properties for the tooltip, including rounded corners.
- **Parameters:**
- `lShowDlg`: Flag to show the dialog.

3. **`Destroy()`**
- **Description:** Destroys the tooltip window, releasing resources.

4. **`EndPaint()`**
- **Description:** Ends the painting process.

5. **`Display()`**
- **Description:** Displays the tooltip by painting it.

6. **`Paint()`**
- **Description:** Paints the tooltip window, including headers, footers, and body.

7. **`PaintHdr( hDC, rc )`**
- **Description:** Paints the header section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

8. **`PaintHdr2( hDC, rc )`**
- **Description:** Paints the secondary header section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

9. **`PaintBody( hDC, rc )`**
- **Description:** Paints the body section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

10. **`PaintFoot( hDC, rc )`**
- **Description:** Paints the footer section of the tooltip.
- **Parameters:**
- `hDC`: Device context handle.
- `rc`: Rectangle coordinates.

11. **`HandleEvent( nMsg, nWParam, nLParam )`**
- **Description:** Handles window events.
- **Parameters:**
- `nMsg`: Message type.
- `nWParam`, `nLParam`: Message parameters.

12. **`ReSize( nSizeType, nWidth, nHeight )`**
- **Description:** Handles resizing of the tooltip window.
- **Parameters:**
- `nSizeType`: Resize type.
- `nWidth`, `nHeight`: New dimensions.

13. **`lHeader()`**
- **Description:** Checks if the header is non-empty.
- **Returns:** Logical value indicating whether the header is non-empty.

14. **`lFoot()`**
- **Description:** Checks if the footer is non-empty.
- **Returns:** Logical value indicating whether the footer is non-empty.

15. **`GetSize()`**
- **Description:** Calculates and returns the size of the tooltip.
- **Returns:** An array containing the width and height of the tooltip.

16. **`SetSize( nWidth, nHeight )`**
- **Description:** Sets the size of the tooltip.
- **Parameters:**
- `nWidth`, `nHeight`: New dimensions.

#### Static Function

1. **`Line( hDC, nTop, nLeft, nBottom, nRight, nColor, nWidth )`**
- **Description:** Draws a line on the specified device context.
- **Parameters:**
- `hDC`: Device context handle.
- `nTop`, `nLeft`, `nBottom`, `nRight`: Line coordinates.
- `nColor`: Line color.
- `nWidth`: Line width.

### Summary
The `TC5ToolTip` class is a versatile tooltip window class that supports various customizations, including text, images, gradients, and rounded corners. It provides methods for handling events, resizing, and painting the tooltip, making it suitable for creating visually appealing and interactive tooltips in FiveWin applications.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:04:33-07:00 2025-01-17T16:04:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276987#p276987
### Documentation for `TCalInfo` Class

The `TCalInfo` class is a part of a calendar management system, likely used in a FiveWin application. It represents an event or appointment in a calendar, with properties and methods to manage its appearance, behavior, and interaction within the calendar view. The class inherits from `TControl`, which suggests it is a visual component that can be rendered on the screen.

---

### **DATA Members**

1. **`nID` (NUMERIC)**
A unique identifier for each instance of `TCalInfo`. It is auto-incremented using the `GetNewId()` method.

2. **`Cargo`**
A generic data holder that can store any additional information related to the calendar event.

3. **`aGradColor` (ARRAY)**
Stores gradient color information for the event's background when it is in a normal state.

4. **`aGradColorND` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "No Disponible" (Not Available).

5. **`aGradColorAp` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "Aplicado" (Applied).

6. **`aGradColorBT` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "Bloqueo/Descanso Terapeutas" (Therapist Block/Rest).

7. **`aCoords` (ARRAY)**
Stores the coordinates (top, left, bottom, right) of the event's bounding box on the calendar.

8. **`nStart` (NUMERIC)**
The start time of the event.

9. **`nEnd` (NUMERIC)**
The end time of the event. Defaults to `nStart` if not provided.

10. **`dStart` (DATE)**
The start date of the event.

11. **`dEnd` (DATE)**
The end date of the event. Defaults to `dStart` if not provided.

12. **`cText` (STRING)**
The body text or description of the event.

13. **`cSubject` (STRING)**
The subject or title of the event.

14. **`nIdx` (NUMERIC)**
A custom index for the event.

15. **`nStatus` (NUMERIC)**
The status of the event (e.g., pending, completed).

16. **`nMinutes` (NUMERIC)**
The duration of the event in minutes.

17. **`lRemember` (LOGICAL)**
A flag indicating whether the event should be remembered or highlighted.

18. **`lND` (LOGICAL)**
A flag indicating whether the event is marked as "No Disponible" (Not Available).

19. **`lAplicado` (LOGICAL)**
A flag indicating whether the event is marked as "Aplicado" (Applied).

20. **`lBloqueoT` (LOGICAL)**
A flag indicating whether the event is marked as "Bloqueo/Descanso Terapeutas" (Therapist Block/Rest).

21. **`lSelected` (LOGICAL)**
A flag indicating whether the event is currently selected.

22. **`lCreated` (LOGICAL)**
A flag indicating whether the event has been created and initialized.

23. **`lVisible` (LOGICAL)**
A flag indicating whether the event is visible on the calendar.

24. **`nClrText` (NUMERIC)**
The color of the text displayed for the event.

25. **`oCalex` (OBJECT)**
A reference to the parent calendar object (`oCalex`).

26. **`oLast` (OBJECT)**
A reference to the last `TCalInfo` object included in the calendar.

27. **`nFlags` (NUMERIC)**
Additional flags or properties for the event.

28. **`oFont` (OBJECT)**
The font used to render the event's text.

---

### **METHODS**

1. **`New( oCalex, nStart, nEnd, dStart, dEnd, cText, cSubject, nClrText, aGradColor, aGradColorND, lND, lAplicado, lBloqueoT, aGradColorAp )`**
Constructor method for the `TCalInfo` class. Initializes the event with the provided parameters, such as start/end times, dates, text, subject, colors, and flags. Default values are assigned if parameters are not provided.

2. **`BuildDates( nTop, nLeft, nWidth, nHeight )`**
Sets the coordinates of the event's bounding box and marks the event as created and visible.

3. **`GetNewId()`**
Generates a unique ID for the event. The ID is auto-incremented and resets after reaching 10000.

4. **`Hide()`**
Hides the event by setting `lVisible` to `.F.`.

5. **`Move( nTop, nLeft, nRight, nBottom )`**
Updates the coordinates of the event's bounding box and ensures the event is only visible if it falls within the calendar's visible area.

6. **`Paint( hDC )`**
Renders the event on the provided device context (`hDC`). Calls `PaintOnMonth()` for rendering.

7. **`PaintOnMonth( hDC )`**
Handles the rendering of the event in the month view of the calendar. It draws the event's background, text, and other visual elements.

8. **`PaintOnWeek( hDC )`**
Calls `PaintOnMonth()` for rendering in the week view. This method is a placeholder and does not have unique logic.

9. **`Show()`**
Makes the event visible by setting `lVisible` to `.T.`.

10. **`LButtonDown( nRow, nCol )`**
Handles the left mouse button click event. It selects the event and updates the calendar's state to reflect the selection.

---

### **Description of Key Functionality**

- **Event Initialization**: The `New()` method initializes the event with default or provided values, including start/end times, dates, text, subject, and visual properties like colors and flags.

- **Rendering**: The `PaintOnMonth()` method is responsible for rendering the event in the calendar's month view. It uses gradient colors for the background, draws the event's text, and handles special cases like "No Disponible," "Aplicado," and "Bloqueo/Descanso Terapeutas."

- **Visibility Management**: The `Hide()` and `Show()` methods control the visibility of the event, while the `Move()` method ensures the event is only rendered if it falls within the visible area of the calendar.

- **Selection Handling**: The `LButtonDown()` method handles the selection of the event when the user clicks on it. It updates the calendar's state to reflect the selected event.

- **Unique ID Generation**: The `GetNewId()` method ensures each event has a unique identifier, which is useful for tracking and managing events in the calendar.

---

### **Usage Example**

```xBase
// Create a new calendar event
oEvent := TCalInfo():New( oCalex, 9, 10, Date(), Date(), "Meeting with Client", "Client Meeting", 0, { {1, nRGB(225, 255, 255), nRGB(181, 202, 230)} }, .F., .F., .F. )

// Set the event's position and size
oEvent:BuildDates( 100, 200, 150, 50 )

// Render the event
oEvent:Paint( hDC )

// Handle a click on the event
oEvent:LButtonDown( 110, 210 )
```

This class is designed to be flexible and extensible, allowing for customization of event appearance and behavior based on the application's requirements.
]]>
### Documentation for `TCalInfo` Class

The `TCalInfo` class is a part of a calendar management system, likely used in a FiveWin application. It represents an event or appointment in a calendar, with properties and methods to manage its appearance, behavior, and interaction within the calendar view. The class inherits from `TControl`, which suggests it is a visual component that can be rendered on the screen.

---

### **DATA Members**

1. **`nID` (NUMERIC)**
A unique identifier for each instance of `TCalInfo`. It is auto-incremented using the `GetNewId()` method.

2. **`Cargo`**
A generic data holder that can store any additional information related to the calendar event.

3. **`aGradColor` (ARRAY)**
Stores gradient color information for the event's background when it is in a normal state.

4. **`aGradColorND` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "No Disponible" (Not Available).

5. **`aGradColorAp` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "Aplicado" (Applied).

6. **`aGradColorBT` (ARRAY)**
Stores gradient color information for the event's background when it is marked as "Bloqueo/Descanso Terapeutas" (Therapist Block/Rest).

7. **`aCoords` (ARRAY)**
Stores the coordinates (top, left, bottom, right) of the event's bounding box on the calendar.

8. **`nStart` (NUMERIC)**
The start time of the event.

9. **`nEnd` (NUMERIC)**
The end time of the event. Defaults to `nStart` if not provided.

10. **`dStart` (DATE)**
The start date of the event.

11. **`dEnd` (DATE)**
The end date of the event. Defaults to `dStart` if not provided.

12. **`cText` (STRING)**
The body text or description of the event.

13. **`cSubject` (STRING)**
The subject or title of the event.

14. **`nIdx` (NUMERIC)**
A custom index for the event.

15. **`nStatus` (NUMERIC)**
The status of the event (e.g., pending, completed).

16. **`nMinutes` (NUMERIC)**
The duration of the event in minutes.

17. **`lRemember` (LOGICAL)**
A flag indicating whether the event should be remembered or highlighted.

18. **`lND` (LOGICAL)**
A flag indicating whether the event is marked as "No Disponible" (Not Available).

19. **`lAplicado` (LOGICAL)**
A flag indicating whether the event is marked as "Aplicado" (Applied).

20. **`lBloqueoT` (LOGICAL)**
A flag indicating whether the event is marked as "Bloqueo/Descanso Terapeutas" (Therapist Block/Rest).

21. **`lSelected` (LOGICAL)**
A flag indicating whether the event is currently selected.

22. **`lCreated` (LOGICAL)**
A flag indicating whether the event has been created and initialized.

23. **`lVisible` (LOGICAL)**
A flag indicating whether the event is visible on the calendar.

24. **`nClrText` (NUMERIC)**
The color of the text displayed for the event.

25. **`oCalex` (OBJECT)**
A reference to the parent calendar object (`oCalex`).

26. **`oLast` (OBJECT)**
A reference to the last `TCalInfo` object included in the calendar.

27. **`nFlags` (NUMERIC)**
Additional flags or properties for the event.

28. **`oFont` (OBJECT)**
The font used to render the event's text.

---

### **METHODS**

1. **`New( oCalex, nStart, nEnd, dStart, dEnd, cText, cSubject, nClrText, aGradColor, aGradColorND, lND, lAplicado, lBloqueoT, aGradColorAp )`**
Constructor method for the `TCalInfo` class. Initializes the event with the provided parameters, such as start/end times, dates, text, subject, colors, and flags. Default values are assigned if parameters are not provided.

2. **`BuildDates( nTop, nLeft, nWidth, nHeight )`**
Sets the coordinates of the event's bounding box and marks the event as created and visible.

3. **`GetNewId()`**
Generates a unique ID for the event. The ID is auto-incremented and resets after reaching 10000.

4. **`Hide()`**
Hides the event by setting `lVisible` to `.F.`.

5. **`Move( nTop, nLeft, nRight, nBottom )`**
Updates the coordinates of the event's bounding box and ensures the event is only visible if it falls within the calendar's visible area.

6. **`Paint( hDC )`**
Renders the event on the provided device context (`hDC`). Calls `PaintOnMonth()` for rendering.

7. **`PaintOnMonth( hDC )`**
Handles the rendering of the event in the month view of the calendar. It draws the event's background, text, and other visual elements.

8. **`PaintOnWeek( hDC )`**
Calls `PaintOnMonth()` for rendering in the week view. This method is a placeholder and does not have unique logic.

9. **`Show()`**
Makes the event visible by setting `lVisible` to `.T.`.

10. **`LButtonDown( nRow, nCol )`**
Handles the left mouse button click event. It selects the event and updates the calendar's state to reflect the selection.

---

### **Description of Key Functionality**

- **Event Initialization**: The `New()` method initializes the event with default or provided values, including start/end times, dates, text, subject, and visual properties like colors and flags.

- **Rendering**: The `PaintOnMonth()` method is responsible for rendering the event in the calendar's month view. It uses gradient colors for the background, draws the event's text, and handles special cases like "No Disponible," "Aplicado," and "Bloqueo/Descanso Terapeutas."

- **Visibility Management**: The `Hide()` and `Show()` methods control the visibility of the event, while the `Move()` method ensures the event is only rendered if it falls within the visible area of the calendar.

- **Selection Handling**: The `LButtonDown()` method handles the selection of the event when the user clicks on it. It updates the calendar's state to reflect the selected event.

- **Unique ID Generation**: The `GetNewId()` method ensures each event has a unique identifier, which is useful for tracking and managing events in the calendar.

---

### **Usage Example**

```xBase
// Create a new calendar event
oEvent := TCalInfo():New( oCalex, 9, 10, Date(), Date(), "Meeting with Client", "Client Meeting", 0, { {1, nRGB(225, 255, 255), nRGB(181, 202, 230)} }, .F., .F., .F. )

// Set the event's position and size
oEvent:BuildDates( 100, 200, 150, 50 )

// Render the event
oEvent:Paint( hDC )

// Handle a click on the event
oEvent:LButtonDown( 110, 210 )
```

This class is designed to be flexible and extensible, allowing for customization of event appearance and behavior based on the application's requirements.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:06:10-07:00 2025-01-17T16:06:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276988#p276988
### Class Documentation: `TChatgpt`

The `TChatgpt` class is designed to interact with the OpenAI API, specifically for sending prompts to the ChatGPT model and receiving responses. It encapsulates the functionality required to initialize a connection, send requests, handle responses, and clean up resources. The class uses the `hbcurl` library (a Harbour binding for libcurl) to manage HTTP requests.

---

### **DATA Members**

1. **`cKey`**
- **Type**: `CHARACTER`
- **Initial Value**: `""`
- **Description**: Stores the API key required for authentication with the OpenAI API.

2. **`hCurl`**
- **Type**: `HANDLE` (libcurl handle)
- **Description**: A handle to the libcurl session used for making HTTP requests.

3. **`nHttpCode`**
- **Type**: `NUMERIC`
- **Description**: Stores the HTTP response code returned by the OpenAI API after a request.

4. **`nError`**
- **Type**: `NUMERIC`
- **Initial Value**: `0`
- **Description**: Stores the error code returned by libcurl after performing a request. A value of `HB_CURLE_OK` indicates success.

5. **`cResponse`**
- **Type**: `CHARACTER`
- **Description**: Stores the raw JSON response received from the OpenAI API.

6. **`cPrompt`**
- **Type**: `CHARACTER`
- **Description**: Stores the user-provided prompt that will be sent to the ChatGPT model.

7. **`cModel`**
- **Type**: `CHARACTER`
- **Initial Value**: `"gpt-4o-mini"`
- **Description**: Specifies the ChatGPT model to be used for generating responses.

8. **`cUrl`**
- **Type**: `CHARACTER`
- **Initial Value**: `"https://api.openai.com/v1/chat/completions"`
- **Description**: The URL endpoint for the OpenAI API's chat completions.

---

### **METHODS**

1. **`New( cKey )`**
- **Purpose**: Constructor method to initialize the `TChatgpt` object.
- **Parameters**:
- `cKey`: The API key for authenticating with the OpenAI API.
- **Description**: Initializes the `cKey` and sets up a new libcurl session using `curl_easy_init()`.
- **Returns**: The initialized object (`Self`).

2. **`Send()`**
- **Purpose**: Sends a prompt to the OpenAI API and retrieves the response.
- **Description**:
- Configures the libcurl session with the necessary options (e.g., URL, headers, POST data).
- Constructs a JSON payload containing the model and prompt.
- Executes the request using `curl_easy_perform()`.
- Captures the HTTP response code and the raw JSON response.
- **Returns**: The raw JSON response (`::cResponse`).

3. **`Reset()`**
- **Purpose**: Resets the libcurl session and clears the response data.
- **Description**:
- Resets the libcurl handle using `curl_easy_reset()`.
- Clears the `nError` and `cResponse` fields.
- **Returns**: `nil`.

4. **`End()`**
- **Purpose**: Cleans up the libcurl session and releases resources.
- **Description**:
- Closes the libcurl session using `curl_easy_cleanup()`.
- Sets the `hCurl` handle to `nil`.
- **Returns**: `nil`.

5. **`GetValue()`**
- **Purpose**: Extracts specific values from the JSON response.
- **Description**:
- Decodes the JSON response into a Harbour hash.
- Iterates through the provided keys to extract nested values.
- Handles errors gracefully using a `TRY...CATCH` block.
- **Returns**: The extracted value from the JSON response.

---

### **Usage Example**

```harbour
// Initialize the TChatgpt object with your API key
oChat := TChatgpt():New( "your-api-key-here" )

// Set the prompt
oChat:cPrompt := "What is the capital of France?"

// Send the request and get the response
cResponse := oChat:Send()

// Extract a specific value from the response
cCapital := oChat:GetValue( "choices", "message", "content" )

// Display the result
? "The capital of France is:", cCapital

// Clean up resources
oChat:End()
```

---

### **Notes**
- The class assumes the use of the `hbcurl` library for HTTP requests. Ensure the library is properly installed and configured.
- The `GetValue` method is designed to handle nested JSON structures, but it may require adjustments based on the specific structure of the API response.
- Error handling is minimal in this implementation. Consider extending it to handle specific HTTP or libcurl errors more robustly.

This class provides a simple and reusable interface for interacting with the OpenAI ChatGPT API in Harbour applications.
]]>
### Class Documentation: `TChatgpt`

The `TChatgpt` class is designed to interact with the OpenAI API, specifically for sending prompts to the ChatGPT model and receiving responses. It encapsulates the functionality required to initialize a connection, send requests, handle responses, and clean up resources. The class uses the `hbcurl` library (a Harbour binding for libcurl) to manage HTTP requests.

---

### **DATA Members**

1. **`cKey`**
- **Type**: `CHARACTER`
- **Initial Value**: `""`
- **Description**: Stores the API key required for authentication with the OpenAI API.

2. **`hCurl`**
- **Type**: `HANDLE` (libcurl handle)
- **Description**: A handle to the libcurl session used for making HTTP requests.

3. **`nHttpCode`**
- **Type**: `NUMERIC`
- **Description**: Stores the HTTP response code returned by the OpenAI API after a request.

4. **`nError`**
- **Type**: `NUMERIC`
- **Initial Value**: `0`
- **Description**: Stores the error code returned by libcurl after performing a request. A value of `HB_CURLE_OK` indicates success.

5. **`cResponse`**
- **Type**: `CHARACTER`
- **Description**: Stores the raw JSON response received from the OpenAI API.

6. **`cPrompt`**
- **Type**: `CHARACTER`
- **Description**: Stores the user-provided prompt that will be sent to the ChatGPT model.

7. **`cModel`**
- **Type**: `CHARACTER`
- **Initial Value**: `"gpt-4o-mini"`
- **Description**: Specifies the ChatGPT model to be used for generating responses.

8. **`cUrl`**
- **Type**: `CHARACTER`
- **Initial Value**: `"https://api.openai.com/v1/chat/completions"`
- **Description**: The URL endpoint for the OpenAI API's chat completions.

---

### **METHODS**

1. **`New( cKey )`**
- **Purpose**: Constructor method to initialize the `TChatgpt` object.
- **Parameters**:
- `cKey`: The API key for authenticating with the OpenAI API.
- **Description**: Initializes the `cKey` and sets up a new libcurl session using `curl_easy_init()`.
- **Returns**: The initialized object (`Self`).

2. **`Send()`**
- **Purpose**: Sends a prompt to the OpenAI API and retrieves the response.
- **Description**:
- Configures the libcurl session with the necessary options (e.g., URL, headers, POST data).
- Constructs a JSON payload containing the model and prompt.
- Executes the request using `curl_easy_perform()`.
- Captures the HTTP response code and the raw JSON response.
- **Returns**: The raw JSON response (`::cResponse`).

3. **`Reset()`**
- **Purpose**: Resets the libcurl session and clears the response data.
- **Description**:
- Resets the libcurl handle using `curl_easy_reset()`.
- Clears the `nError` and `cResponse` fields.
- **Returns**: `nil`.

4. **`End()`**
- **Purpose**: Cleans up the libcurl session and releases resources.
- **Description**:
- Closes the libcurl session using `curl_easy_cleanup()`.
- Sets the `hCurl` handle to `nil`.
- **Returns**: `nil`.

5. **`GetValue()`**
- **Purpose**: Extracts specific values from the JSON response.
- **Description**:
- Decodes the JSON response into a Harbour hash.
- Iterates through the provided keys to extract nested values.
- Handles errors gracefully using a `TRY...CATCH` block.
- **Returns**: The extracted value from the JSON response.

---

### **Usage Example**

```harbour
// Initialize the TChatgpt object with your API key
oChat := TChatgpt():New( "your-api-key-here" )

// Set the prompt
oChat:cPrompt := "What is the capital of France?"

// Send the request and get the response
cResponse := oChat:Send()

// Extract a specific value from the response
cCapital := oChat:GetValue( "choices", "message", "content" )

// Display the result
? "The capital of France is:", cCapital

// Clean up resources
oChat:End()
```

---

### **Notes**
- The class assumes the use of the `hbcurl` library for HTTP requests. Ensure the library is properly installed and configured.
- The `GetValue` method is designed to handle nested JSON structures, but it may require adjustments based on the specific structure of the API response.
- Error handling is minimal in this implementation. Consider extending it to handle specific HTTP or libcurl errors more robustly.

This class provides a simple and reusable interface for interacting with the OpenAI ChatGPT API in Harbour applications.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:07:47-07:00 2025-01-17T16:07:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276989#p276989
### Class Documentation: `TCheckBox`

#### Overview
The `TCheckBox` class is a subclass of `TControl` and represents a checkbox control in a FiveWin application. This class provides functionality to create, manage, and interact with checkbox controls, including handling user interactions, updating the checkbox state, and generating code for the checkbox.

#### Class Data (CLASSDATA)
- **`aProperties`**: An array of property names that define the attributes of the `TCheckBox` class. These properties include:
- `lChecked`: Indicates whether the checkbox is checked.
- `cVarName`: The variable name associated with the checkbox.
- `nClrText`: The text color of the checkbox.
- `nClrPane`: The background color of the checkbox.
- `nTop`: The top position of the checkbox.
- `nLeft`: The left position of the checkbox.
- `nWidth`: The width of the checkbox.
- `nHeight`: The height of the checkbox.
- `nAlign`: The alignment of the checkbox.
- `Cargo`: Additional data associated with the checkbox.

#### Methods

1. **`New( nRow, nCol, cCaption, bSetGet, oWnd, nWidth, nHeight, nHelpTopic, bChange, oFont, bValid, nClrFore, nClrBack, lDesign, lPixel, cMsg, lUpdate, bWhen, cVarName )`**
- **Description**: Constructor method for creating a new `TCheckBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the checkbox.
- `cCaption`: Text displayed next to the checkbox.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nWidth`, `nHeight`: Dimensions of the checkbox.
- `nHelpTopic`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `oFont`: Font used for the checkbox text.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lDesign`: Indicates if the checkbox is in design mode.
- `lPixel`: Indicates if dimensions are in pixels.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cVarName`: Variable name for the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

2. **`ReDefine( nId, bSetGet, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, cMsg, lUpdate, bWhen, cPrompt )`**
- **Description**: Redefines an existing checkbox control.
- **Parameters**:
- `nId`: Control ID.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nHelpId`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cPrompt`: Text displayed next to the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

3. **`Click()`**
- **Description**: Handles the click event of the checkbox. Toggles the checkbox state and executes the `bChange` code block if defined.
- **Returns**: `nil`.

4. **`Default()`**
- **Description**: Sets the default state of the checkbox and applies the font.
- **Returns**: `nil`.

5. **`cToChar()`**
- **Description**: Returns the control type as a string ("BUTTON").
- **Returns**: String ("BUTTON").

6. **`EraseBkGnd( hDC )`**
- **Description**: Handles the background erasure of the checkbox.
- **Parameters**:
- `hDC`: Handle to the device context.
- **Returns**: `1` if themed, otherwise calls the superclass method.

7. **`KeyChar( nKey, nFlags )`**
- **Description**: Handles key press events. Moves focus to the next control on `VK_RETURN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

8. **`KeyDown( nKey, nFlags )`**
- **Description**: Handles key down events. Moves focus to the previous or next control on `VK_UP` or `VK_DOWN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

9. **`LostFocus( hCtl )`**
- **Description**: Handles the loss of focus event.
- **Parameters**:
- `hCtl`: Handle to the control gaining focus.
- **Returns**: Result of the superclass method.

10. **`Initiate( hDlg )`**
- **Description**: Initializes the checkbox control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

11. **`MouseMove( nRow, nCol, nKeyFlags )`**
- **Description**: Handles mouse movement over the checkbox.
- **Parameters**:
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.
- **Returns**: `nil`.

12. **`Refresh()`**
- **Description**: Refreshes the checkbox state based on the `bSetGet` code block.
- **Returns**: `nil`.

13. **`Reset()`**
- **Description**: Resets the checkbox state to its default value.
- **Returns**: `nil`.

14. **`GenLocals()`**
- **Description**: Generates local variable declarations for the checkbox.
- **Returns**: String containing local variable declarations.

15. **`cGenPrg()`**
- **Description**: Generates the source code for the checkbox control.
- **Returns**: String containing the generated code.

16. **`Check()`**
- **Description**: Checks the checkbox.
- **Returns**: `nil`.

17. **`UnCheck()`**
- **Description**: Unchecks the checkbox.
- **Returns**: `nil`.

18. **`SaveToRC( nIndent )`**
- **Description**: Generates the resource script (RC) entry for the checkbox.
- **Parameters**:
- `nIndent`: Indentation level.
- **Returns**: String containing the RC entry.

19. **`SetCheck( lOnOff )`**
- **Description**: Sets the checkbox state based on the boolean parameter.
- **Parameters**:
- `lOnOff`: Boolean indicating whether to check or uncheck the checkbox.
- **Returns**: `nil`.

20. **`SetText( cText )`**
- **Description**: Sets the text of the checkbox.
- **Parameters**:
- `cText`: Text to set.
- **Returns**: `nil`.

21. **`lChecked()`**
- **Description**: Returns the current state of the checkbox.
- **Returns**: Boolean indicating whether the checkbox is checked.

22. **`Html()`**
- **Description**: Generates HTML for the checkbox.
- **Returns**: HTML string.

23. **`Display()`**
- **Description**: Displays the checkbox by painting it.
- **Returns**: `0`.

24. **`Paint()`**
- **Description**: Paints the checkbox.
- **Returns**: `1`.

#### Additional Notes
- The `TCheckBox` class is designed to be used within FiveWin applications, providing a robust and flexible way to handle checkbox controls.
- The class includes methods for both runtime and design-time functionality, making it suitable for use in both application development and form design tools.
- The class leverages FiveWin's event handling and rendering capabilities to provide a seamless user experience.
]]>
### Class Documentation: `TCheckBox`

#### Overview
The `TCheckBox` class is a subclass of `TControl` and represents a checkbox control in a FiveWin application. This class provides functionality to create, manage, and interact with checkbox controls, including handling user interactions, updating the checkbox state, and generating code for the checkbox.

#### Class Data (CLASSDATA)
- **`aProperties`**: An array of property names that define the attributes of the `TCheckBox` class. These properties include:
- `lChecked`: Indicates whether the checkbox is checked.
- `cVarName`: The variable name associated with the checkbox.
- `nClrText`: The text color of the checkbox.
- `nClrPane`: The background color of the checkbox.
- `nTop`: The top position of the checkbox.
- `nLeft`: The left position of the checkbox.
- `nWidth`: The width of the checkbox.
- `nHeight`: The height of the checkbox.
- `nAlign`: The alignment of the checkbox.
- `Cargo`: Additional data associated with the checkbox.

#### Methods

1. **`New( nRow, nCol, cCaption, bSetGet, oWnd, nWidth, nHeight, nHelpTopic, bChange, oFont, bValid, nClrFore, nClrBack, lDesign, lPixel, cMsg, lUpdate, bWhen, cVarName )`**
- **Description**: Constructor method for creating a new `TCheckBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the checkbox.
- `cCaption`: Text displayed next to the checkbox.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nWidth`, `nHeight`: Dimensions of the checkbox.
- `nHelpTopic`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `oFont`: Font used for the checkbox text.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lDesign`: Indicates if the checkbox is in design mode.
- `lPixel`: Indicates if dimensions are in pixels.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cVarName`: Variable name for the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

2. **`ReDefine( nId, bSetGet, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, cMsg, lUpdate, bWhen, cPrompt )`**
- **Description**: Redefines an existing checkbox control.
- **Parameters**:
- `nId`: Control ID.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nHelpId`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cPrompt`: Text displayed next to the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

3. **`Click()`**
- **Description**: Handles the click event of the checkbox. Toggles the checkbox state and executes the `bChange` code block if defined.
- **Returns**: `nil`.

4. **`Default()`**
- **Description**: Sets the default state of the checkbox and applies the font.
- **Returns**: `nil`.

5. **`cToChar()`**
- **Description**: Returns the control type as a string ("BUTTON").
- **Returns**: String ("BUTTON").

6. **`EraseBkGnd( hDC )`**
- **Description**: Handles the background erasure of the checkbox.
- **Parameters**:
- `hDC`: Handle to the device context.
- **Returns**: `1` if themed, otherwise calls the superclass method.

7. **`KeyChar( nKey, nFlags )`**
- **Description**: Handles key press events. Moves focus to the next control on `VK_RETURN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

8. **`KeyDown( nKey, nFlags )`**
- **Description**: Handles key down events. Moves focus to the previous or next control on `VK_UP` or `VK_DOWN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

9. **`LostFocus( hCtl )`**
- **Description**: Handles the loss of focus event.
- **Parameters**:
- `hCtl`: Handle to the control gaining focus.
- **Returns**: Result of the superclass method.

10. **`Initiate( hDlg )`**
- **Description**: Initializes the checkbox control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

11. **`MouseMove( nRow, nCol, nKeyFlags )`**
- **Description**: Handles mouse movement over the checkbox.
- **Parameters**:
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.
- **Returns**: `nil`.

12. **`Refresh()`**
- **Description**: Refreshes the checkbox state based on the `bSetGet` code block.
- **Returns**: `nil`.

13. **`Reset()`**
- **Description**: Resets the checkbox state to its default value.
- **Returns**: `nil`.

14. **`GenLocals()`**
- **Description**: Generates local variable declarations for the checkbox.
- **Returns**: String containing local variable declarations.

15. **`cGenPrg()`**
- **Description**: Generates the source code for the checkbox control.
- **Returns**: String containing the generated code.

16. **`Check()`**
- **Description**: Checks the checkbox.
- **Returns**: `nil`.

17. **`UnCheck()`**
- **Description**: Unchecks the checkbox.
- **Returns**: `nil`.

18. **`SaveToRC( nIndent )`**
- **Description**: Generates the resource script (RC) entry for the checkbox.
- **Parameters**:
- `nIndent`: Indentation level.
- **Returns**: String containing the RC entry.

19. **`SetCheck( lOnOff )`**
- **Description**: Sets the checkbox state based on the boolean parameter.
- **Parameters**:
- `lOnOff`: Boolean indicating whether to check or uncheck the checkbox.
- **Returns**: `nil`.

20. **`SetText( cText )`**
- **Description**: Sets the text of the checkbox.
- **Parameters**:
- `cText`: Text to set.
- **Returns**: `nil`.

21. **`lChecked()`**
- **Description**: Returns the current state of the checkbox.
- **Returns**: Boolean indicating whether the checkbox is checked.

22. **`Html()`**
- **Description**: Generates HTML for the checkbox.
- **Returns**: HTML string.

23. **`Display()`**
- **Description**: Displays the checkbox by painting it.
- **Returns**: `0`.

24. **`Paint()`**
- **Description**: Paints the checkbox.
- **Returns**: `1`.

#### Additional Notes
- The `TCheckBox` class is designed to be used within FiveWin applications, providing a robust and flexible way to handle checkbox controls.
- The class includes methods for both runtime and design-time functionality, making it suitable for use in both application development and form design tools.
- The class leverages FiveWin's event handling and rendering capabilities to provide a seamless user experience.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:09:15-07:00 2025-01-17T16:09:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276990#p276990
### Documentation for `TClipBoard` Class

The `TClipBoard` class is a utility class designed to interact with the Windows Clipboard. It provides methods to open, close, clear, and manipulate the clipboard's contents, including text, bitmaps, metafiles, and files. The class also supports Unicode text and provides methods to check if the clipboard is empty or contains specific types of data.

### Class Overview

- **Class Name**: `TClipBoard`
- **Purpose**: To manage and manipulate the Windows Clipboard, allowing for the transfer of various data types (text, bitmaps, metafiles, etc.) between applications.

### DATA Members

1. **`nFormat`**:
- **Type**: Numeric
- **Description**: Specifies the clipboard format to be used (e.g., `CF_TEXT`, `CF_BITMAP`, etc.). Default is `CF_TEXT`.

2. **`oWnd`**:
- **Type**: Object
- **Description**: Represents the window handle associated with the clipboard. If not provided, the desktop window handle is used.

### METHODS

1. **`New( nFormat, oWnd )`**:
- **Description**: Constructor method to initialize the `TClipBoard` object.
- **Parameters**:
- `nFormat`: The clipboard format (default is `CF_TEXT`).
- `oWnd`: The window handle (default is the main window or desktop window).
- **Returns**: Self (the `TClipBoard` object).

2. **`Clear()`**:
- **Description**: Clears the clipboard by opening it, emptying it, and then closing it.
- **Inline Implementation**: Calls `Open()`, `Empty()`, and `Close()` in sequence.

3. **`Open()`**:
- **Description**: Opens the clipboard for editing.
- **Inline Implementation**: Calls `OpenClipboard()` with the appropriate window handle.

4. **`Empty()`**:
- **Description**: Empties the clipboard, removing all data.
- **Inline Implementation**: Calls `EmptyClipboard()`.

5. **`Close()`**:
- **Description**: Closes the clipboard, making it available to other applications.
- **Inline Implementation**: Calls `CloseClipboard()`.

6. **`IsEmpty()`**:
- **Description**: Checks if the clipboard is empty for the specified format.
- **Returns**: `.T.` (true) if the clipboard is empty, `.F.` (false) otherwise.

7. **`SetData( uData )`**:
- **Description**: Sets data to the clipboard in the specified format.
- **Inline Implementation**: Calls `SetClipboardData()` with the specified format and data.

8. **`GetData()`**:
- **Description**: Retrieves data from the clipboard in the specified format.
- **Inline Implementation**: Calls `GetClpData()` with the specified format.

9. **`SetText( cText )`**:
- **Description**: Sets text data to the clipboard. Handles UTF-8 to UTF-16 conversion if necessary.
- **Returns**: `.T.` if successful, `.F.` otherwise.

10. **`SetWideText( cText )`**:
- **Description**: Sets wide (Unicode) text data to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

11. **`SetBitmap( oBitmap )`**:
- **Description**: Sets a bitmap to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

12. **`SetMetaFile( oMetaFile )`**:
- **Description**: Sets a metafile to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

13. **`GetBitmap()`**:
- **Description**: Retrieves a bitmap from the clipboard.
- **Returns**: The handle to the bitmap if successful, `0` otherwise.

14. **`GetText()`**:
- **Description**: Retrieves text data from the clipboard. Handles Unicode text if necessary.
- **Returns**: The retrieved text.

15. **`GetFiles()`**:
- **Description**: Retrieves a list of files from the clipboard (e.g., from a drag-and-drop operation).
- **Returns**: An array of file paths.

16. **`GetUnicodeText()`**:
- **Description**: Retrieves Unicode text from the clipboard.
- **Returns**: The retrieved Unicode text, converted to UTF-8 if necessary.

17. **`GetMetaFile()`**:
- **Description**: Retrieves a metafile from the clipboard.
- **Returns**: The handle to the metafile if successful, `0` otherwise.

18. **`End()`**:
- **Description**: Closes the clipboard.
- **Inline Implementation**: Calls `Close()`.

19. **`lUnicode` (ACCESS)**:
- **Description**: Checks if the clipboard is in Unicode mode.
- **Inline Implementation**: Returns `.T.` if Unicode is enabled, `.F.` otherwise.

### Additional Functions

1. **`GetClipContentFormat(...)`**:
- **Description**: Determines the clipboard format based on the provided parameters.
- **Returns**: The clipboard format.

2. **`FW_CopyToClipboard( cText )`**:
- **Description**: Copies the provided text to the clipboard.
- **Returns**: `nil`.

### Notes

- The class uses Windows API functions (`OpenClipboard`, `EmptyClipboard`, `CloseClipboard`, `SetClipboardData`, `GetClipboardData`, etc.) to interact with the clipboard.
- The class supports both ANSI and Unicode text, with automatic conversion between UTF-8 and UTF-16 where necessary.
- The `TClipBoard` class is designed to be used in a FiveWin environment, which is a framework for developing Windows applications in xBase languages (such as Clipper or Harbour).

### Example Usage

```xbase
// Copy text to clipboard
oClip := TClipBoard():New()
oClip:SetText("Hello, World!")
oClip:End()

// Retrieve text from clipboard
oClip := TClipBoard():New()
cText := oClip:GetText()
oClip:End()
? cText // Outputs: Hello, World!
```

This class provides a robust and flexible way to interact with the Windows Clipboard, making it easier to handle various data types in your applications.
]]>
### Documentation for `TClipBoard` Class

The `TClipBoard` class is a utility class designed to interact with the Windows Clipboard. It provides methods to open, close, clear, and manipulate the clipboard's contents, including text, bitmaps, metafiles, and files. The class also supports Unicode text and provides methods to check if the clipboard is empty or contains specific types of data.

### Class Overview

- **Class Name**: `TClipBoard`
- **Purpose**: To manage and manipulate the Windows Clipboard, allowing for the transfer of various data types (text, bitmaps, metafiles, etc.) between applications.

### DATA Members

1. **`nFormat`**:
- **Type**: Numeric
- **Description**: Specifies the clipboard format to be used (e.g., `CF_TEXT`, `CF_BITMAP`, etc.). Default is `CF_TEXT`.

2. **`oWnd`**:
- **Type**: Object
- **Description**: Represents the window handle associated with the clipboard. If not provided, the desktop window handle is used.

### METHODS

1. **`New( nFormat, oWnd )`**:
- **Description**: Constructor method to initialize the `TClipBoard` object.
- **Parameters**:
- `nFormat`: The clipboard format (default is `CF_TEXT`).
- `oWnd`: The window handle (default is the main window or desktop window).
- **Returns**: Self (the `TClipBoard` object).

2. **`Clear()`**:
- **Description**: Clears the clipboard by opening it, emptying it, and then closing it.
- **Inline Implementation**: Calls `Open()`, `Empty()`, and `Close()` in sequence.

3. **`Open()`**:
- **Description**: Opens the clipboard for editing.
- **Inline Implementation**: Calls `OpenClipboard()` with the appropriate window handle.

4. **`Empty()`**:
- **Description**: Empties the clipboard, removing all data.
- **Inline Implementation**: Calls `EmptyClipboard()`.

5. **`Close()`**:
- **Description**: Closes the clipboard, making it available to other applications.
- **Inline Implementation**: Calls `CloseClipboard()`.

6. **`IsEmpty()`**:
- **Description**: Checks if the clipboard is empty for the specified format.
- **Returns**: `.T.` (true) if the clipboard is empty, `.F.` (false) otherwise.

7. **`SetData( uData )`**:
- **Description**: Sets data to the clipboard in the specified format.
- **Inline Implementation**: Calls `SetClipboardData()` with the specified format and data.

8. **`GetData()`**:
- **Description**: Retrieves data from the clipboard in the specified format.
- **Inline Implementation**: Calls `GetClpData()` with the specified format.

9. **`SetText( cText )`**:
- **Description**: Sets text data to the clipboard. Handles UTF-8 to UTF-16 conversion if necessary.
- **Returns**: `.T.` if successful, `.F.` otherwise.

10. **`SetWideText( cText )`**:
- **Description**: Sets wide (Unicode) text data to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

11. **`SetBitmap( oBitmap )`**:
- **Description**: Sets a bitmap to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

12. **`SetMetaFile( oMetaFile )`**:
- **Description**: Sets a metafile to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

13. **`GetBitmap()`**:
- **Description**: Retrieves a bitmap from the clipboard.
- **Returns**: The handle to the bitmap if successful, `0` otherwise.

14. **`GetText()`**:
- **Description**: Retrieves text data from the clipboard. Handles Unicode text if necessary.
- **Returns**: The retrieved text.

15. **`GetFiles()`**:
- **Description**: Retrieves a list of files from the clipboard (e.g., from a drag-and-drop operation).
- **Returns**: An array of file paths.

16. **`GetUnicodeText()`**:
- **Description**: Retrieves Unicode text from the clipboard.
- **Returns**: The retrieved Unicode text, converted to UTF-8 if necessary.

17. **`GetMetaFile()`**:
- **Description**: Retrieves a metafile from the clipboard.
- **Returns**: The handle to the metafile if successful, `0` otherwise.

18. **`End()`**:
- **Description**: Closes the clipboard.
- **Inline Implementation**: Calls `Close()`.

19. **`lUnicode` (ACCESS)**:
- **Description**: Checks if the clipboard is in Unicode mode.
- **Inline Implementation**: Returns `.T.` if Unicode is enabled, `.F.` otherwise.

### Additional Functions

1. **`GetClipContentFormat(...)`**:
- **Description**: Determines the clipboard format based on the provided parameters.
- **Returns**: The clipboard format.

2. **`FW_CopyToClipboard( cText )`**:
- **Description**: Copies the provided text to the clipboard.
- **Returns**: `nil`.

### Notes

- The class uses Windows API functions (`OpenClipboard`, `EmptyClipboard`, `CloseClipboard`, `SetClipboardData`, `GetClipboardData`, etc.) to interact with the clipboard.
- The class supports both ANSI and Unicode text, with automatic conversion between UTF-8 and UTF-16 where necessary.
- The `TClipBoard` class is designed to be used in a FiveWin environment, which is a framework for developing Windows applications in xBase languages (such as Clipper or Harbour).

### Example Usage

```xbase
// Copy text to clipboard
oClip := TClipBoard():New()
oClip:SetText("Hello, World!")
oClip:End()

// Retrieve text from clipboard
oClip := TClipBoard():New()
cText := oClip:GetText()
oClip:End()
? cText // Outputs: Hello, World!
```

This class provides a robust and flexible way to interact with the Windows Clipboard, making it easier to handle various data types in your applications.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:11:47-07:00 2025-01-17T16:11:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276991#p276991
### Class Documentation: `TComboBox`

#### Overview
The `TComboBox` class is a custom control class that extends the `TControl` class. It represents a combo box control, which is a combination of a drop-down list and an editable text box. This class provides functionality for managing items in the combo box, handling user interactions, and customizing the appearance and behavior of the combo box.

#### Data Members (Attributes)

1. **`aItems`**:
- **Type**: Array
- **Description**: Stores the list of items in the combo box.

2. **`aBitmaps`**:
- **Type**: Array
- **Description**: Stores bitmaps associated with the combo box items (used for owner-drawn combo boxes).

3. **`nItemHt`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

4. **`lOwnerDraw`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is owner-drawn.

5. **`nBmpHeight`**:
- **Type**: Numeric
- **Description**: Height of the bitmaps used in the combo box.

6. **`nBmpWidth`**:
- **Type**: Numeric
- **Description**: Width of the bitmaps used in the combo box.

7. **`nAt`**:
- **Type**: Numeric
- **Description**: Index of the currently selected item in the combo box.

8. **`bDrawItem`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle custom drawing of items in the combo box.

9. **`bCloseUp`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle the close-up event of the combo box.

10. **`bOwnerDraw`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle owner-drawn events.

11. **`cError`**:
- **Type**: String
- **Description**: Stores error messages related to the combo box.

12. **`oGet`**:
- **Type**: Object (TGet)
- **Description**: Reference to the associated `TGet` object for the combo box.

13. **`cSearchKey`**:
- **Type**: String
- **Description**: Holds the current search key for incremental search.

14. **`lIncSearch`**:
- **Type**: Logical
- **Description**: Indicates whether incremental search is enabled.

15. **`lCaseSensitive`**:
- **Type**: Logical
- **Description**: Indicates whether the search is case-sensitive.

16. **`nOldClrPane`**:
- **Type**: Numeric
- **Description**: Stores the old background color if the color changes with focus.

17. **`lDir`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is used for directory listing.

18. **`lSelDir`**:
- **Type**: Logical
- **Description**: Indicates whether a directory is selected.

19. **`cDir`**:
- **Type**: String
- **Description**: Stores the directory path for directory combo boxes.

20. **`nDirStyle`**:
- **Type**: Numeric
- **Description**: Style for directory combo boxes.

21. **`oSayDir`**:
- **Type**: Object (TSay)
- **Description**: Reference to the associated `TSay` object for directory combo boxes.

22. **`hSelectionHeight`**:
- **Type**: Numeric
- **Description**: Height of the selection area in the combo box.

23. **`hItemHeight`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

24. **`hDropWidth`**:
- **Type**: Numeric
- **Description**: Width of the drop-down list in the combo box.

25. **`lClrFocus`**:
- **Type**: Logical
- **Description**: Indicates whether the color changes when the combo box gets focus.

26. **`nClrFocus`**:
- **Type**: Numeric
- **Description**: Color to use when the combo box is focused.

27. **`aProperties`**:
- **Type**: Array
- **Description**: List of properties for the combo box.

#### Methods

1. **`New()`**:
- **Description**: Constructor method for creating a new `TComboBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block for getting/setting the combo box value.
- `aItems`: Array of items to populate the combo box.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help context ID.
- `bChange`, `bValid`: Code blocks for change and validation events.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Logical indicating whether dimensions are in pixels.
- `oFont`: Font object.
- `cMsg`: Tooltip message.
- `lUpdate`: Logical indicating whether to update the combo box.
- `bWhen`: Code block for the "when" event.
- `lDesign`: Logical indicating whether the combo box is in design mode.
- `acBitmaps`: Array of bitmaps for owner-drawn combo boxes.
- `bDrawItem`: Code block for custom drawing.
- `nStyle`: Style of the combo box.
- `cPict`: Picture clause for the combo box.
- `bEChange`: Code block for edit change event.
- `cVarName`: Variable name for the combo box.
- `nHGet`: Height of the combo box.
- `nSelHt`, `nItmHt`: Selection and item heights.
- `nListWidth`: Width of the drop-down list.
- `cDir`: Directory path for directory combo boxes.
- `nAttr`: Attributes for directory combo boxes.
- `oSayDir`: Associated `TSay` object for directory combo boxes.
- `bOwnerDraw`: Code block for owner-drawn events.

2. **`ReDefine()`**:
- **Description**: Redefines an existing combo box.
- **Parameters**: Similar to `New()`.

3. **`Add()`**:
- **Description**: Adds an item to the combo box.
- **Parameters**:
- `cItem`: Item to add.
- `nAt`: Position to add the item.

4. **`GenLocals()`**:
- **Description**: Generates local variables for the combo box.

5. **`cGenPrg()`**:
- **Description**: Generates the code for the combo box in a program.

6. **`Change()`**:
- **Description**: Handles the change event of the combo box.

7. **`Close()`**:
- **Description**: Closes the drop-down list of the combo box.

8. **`CloseUp()`**:
- **Description**: Handles the close-up event of the combo box.

9. **`DropDown()`**:
- **Description**: Handles the drop-down event of the combo box.

10. **`CtlColor()`**:
- **Description**: Handles the control color event.

11. **`Default()`**:
- **Description**: Sets default values for the combo box.

12. **`DefControl()`**:
- **Description**: Defines a control within the combo box.

13. **`Del()`**:
- **Description**: Deletes an item from the combo box.
- **Parameters**:
- `nAt`: Position of the item to delete.

14. **`Destroy()`**:
- **Description**: Destroys the combo box and releases resources.

15. **`DrawItem()`**:
- **Description**: Handles custom drawing of items in the combo box.
- **Parameters**:
- `nIdCtl`: Control ID.
- `nPStruct`: Pointer to the draw item structure.

16. **`End()`**:
- **Description**: Ends the combo box and hides it.

17. **`FillMeasure()`**:
- **Description**: Measures the items in the combo box.

18. **`FindString()`**:
- **Description**: Finds a string in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

19. **`Find()`**:
- **Description**: Checks if an item exists in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

20. **`GetKeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.

21. **`GetMinVisible()`**:
- **Description**: Gets the minimum number of visible items in the combo box.

22. **`GotFocus()`**:
- **Description**: Handles the focus event of the combo box.

23. **`HandleEvent()`**:
- **Description**: Handles events for the combo box.
- **Parameters**:
- `nMsg`: Message ID.
- `nWParam`: WPARAM value.
- `nLParam`: LPARAM value.

24. **`Initiate()`**:
- **Description**: Initializes the combo box.
- **Parameters**:
- `hDlg`: Handle to the dialog.

25. **`Insert()`**:
- **Description**: Inserts an item into the combo box.
- **Parameters**:
- `cItem`: Item to insert.
- `nAt`: Position to insert the item.

26. **`IsClosed()`**:
- **Description**: Checks if the combo box is closed.

27. **`IsOpen()`**:
- **Description**: Checks if the combo box is open.

28. **`KeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

29. **`KeyDown()`**:
- **Description**: Handles key down events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

30. **`LostFocus()`**:
- **Description**: Handles the lost focus event.
- **Parameters**:
- `hWndGetFocus`: Handle to the window that gets focus.

31. **`lValid()`**:
- **Description**: Validates the combo box.

32. **`Modify()`**:
- **Description**: Modifies an item in the combo box.
- **Parameters**:
- `cItem`: New item value.
- `nAt`: Position of the item to modify.

33. **`MouseMove()`**:
- **Description**: Handles mouse move events.
- **Parameters**:
- `nRow`, `nCol`: Mouse coordinates.
- `nKeyFlags`: Key flags.

34. **`Open()`**:
- **Description**: Opens the drop-down list of the combo box.

35. **`Refresh()`**:
- **Description**: Refreshes the combo box.

36. **`Reset()`**:
- **Description**: Resets the combo box.
- **Parameters**:
- `lChanged`: Logical indicating whether to trigger the change event.

37. **`Select()`**:
- **Description**: Selects an item in the combo box.
- **Parameters**:
- `nItem`: Index of the item to select.

38. **`Set()`**:
- **Description**: Sets the value of the combo box.
- **Parameters**:
- `cNewItem`: New value to set.

39. **`SetBitmaps()`**:
- **Description**: Sets bitmaps for the combo box.
- **Parameters**:
- `acBitmaps`: Array of bitmaps.

40. **`SetColorFocus()`**:
- **Description**: Sets the focus color for the combo box.
- **Parameters**:
- `nClrFocus`: Color to set.

41. **`SetItems()`**:
- **Description**: Sets the items in the combo box.
- **Parameters**:
- `aItems`: Array of items.
- `lChanged`: Logical indicating whether to trigger the change event.

42. **`SetMinVisible()`**:
- **Description**: Sets the minimum number of visible items in the combo box.
- **Parameters**:
- `nItems`: Number of items.

43. **`ShowToolTip()`**:
- **Description**: Shows a tooltip for the combo box.

44. **`VarGet()`**:
- **Description**: Gets the value of the combo box.

45. **`State()`**:
- **Description**: Gets the state of the combo box (open or closed).

46. **`HGet()`**:
- **Description**: Sets the height of the combo box.
- **Parameters**:
- `nHeight`: Height to set.

47. **`nSelectionHeight()`**:
- **Description**: Gets or sets the selection height of the combo box.
- **Parameters**:
- `nNew`: New selection height.

48. **`nItemHeight()`**:
- **Description**: Gets or sets the item height of the combo box.
- **Parameters**:
- `nNew`: New item height.

49. **`nDropWidth()`**:
- **Description**: Gets or sets the drop-down width of the combo box.
- **Parameters**:
- `nNew`: New drop-down width.

50. **`GetSelText()`**:
- **Description**: Gets the selected text in the combo box.

51. **`SetDir()`**:
- **Description**: Sets the directory for directory combo boxes.
- **Parameters**:
- `cDir`: Directory path.
- `nType`: Directory style.

52. **`SetFont()`**:
- **Description**: Sets the font for the combo box.
- **Parameters**:
- `oFont`: Font object.

#### Additional Notes
- The `TComboBox` class is designed to be highly customizable, allowing for owner-drawn items, custom event handling, and integration with other controls like `TGet` and `TSay`.
- The class supports incremental search, directory listing, and various styles and behaviors typical of combo boxes in Windows applications.
- The class also includes methods for handling focus, color changes, and tooltips, making it a versatile control for user interfaces.
]]>
### Class Documentation: `TComboBox`

#### Overview
The `TComboBox` class is a custom control class that extends the `TControl` class. It represents a combo box control, which is a combination of a drop-down list and an editable text box. This class provides functionality for managing items in the combo box, handling user interactions, and customizing the appearance and behavior of the combo box.

#### Data Members (Attributes)

1. **`aItems`**:
- **Type**: Array
- **Description**: Stores the list of items in the combo box.

2. **`aBitmaps`**:
- **Type**: Array
- **Description**: Stores bitmaps associated with the combo box items (used for owner-drawn combo boxes).

3. **`nItemHt`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

4. **`lOwnerDraw`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is owner-drawn.

5. **`nBmpHeight`**:
- **Type**: Numeric
- **Description**: Height of the bitmaps used in the combo box.

6. **`nBmpWidth`**:
- **Type**: Numeric
- **Description**: Width of the bitmaps used in the combo box.

7. **`nAt`**:
- **Type**: Numeric
- **Description**: Index of the currently selected item in the combo box.

8. **`bDrawItem`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle custom drawing of items in the combo box.

9. **`bCloseUp`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle the close-up event of the combo box.

10. **`bOwnerDraw`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle owner-drawn events.

11. **`cError`**:
- **Type**: String
- **Description**: Stores error messages related to the combo box.

12. **`oGet`**:
- **Type**: Object (TGet)
- **Description**: Reference to the associated `TGet` object for the combo box.

13. **`cSearchKey`**:
- **Type**: String
- **Description**: Holds the current search key for incremental search.

14. **`lIncSearch`**:
- **Type**: Logical
- **Description**: Indicates whether incremental search is enabled.

15. **`lCaseSensitive`**:
- **Type**: Logical
- **Description**: Indicates whether the search is case-sensitive.

16. **`nOldClrPane`**:
- **Type**: Numeric
- **Description**: Stores the old background color if the color changes with focus.

17. **`lDir`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is used for directory listing.

18. **`lSelDir`**:
- **Type**: Logical
- **Description**: Indicates whether a directory is selected.

19. **`cDir`**:
- **Type**: String
- **Description**: Stores the directory path for directory combo boxes.

20. **`nDirStyle`**:
- **Type**: Numeric
- **Description**: Style for directory combo boxes.

21. **`oSayDir`**:
- **Type**: Object (TSay)
- **Description**: Reference to the associated `TSay` object for directory combo boxes.

22. **`hSelectionHeight`**:
- **Type**: Numeric
- **Description**: Height of the selection area in the combo box.

23. **`hItemHeight`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

24. **`hDropWidth`**:
- **Type**: Numeric
- **Description**: Width of the drop-down list in the combo box.

25. **`lClrFocus`**:
- **Type**: Logical
- **Description**: Indicates whether the color changes when the combo box gets focus.

26. **`nClrFocus`**:
- **Type**: Numeric
- **Description**: Color to use when the combo box is focused.

27. **`aProperties`**:
- **Type**: Array
- **Description**: List of properties for the combo box.

#### Methods

1. **`New()`**:
- **Description**: Constructor method for creating a new `TComboBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block for getting/setting the combo box value.
- `aItems`: Array of items to populate the combo box.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help context ID.
- `bChange`, `bValid`: Code blocks for change and validation events.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Logical indicating whether dimensions are in pixels.
- `oFont`: Font object.
- `cMsg`: Tooltip message.
- `lUpdate`: Logical indicating whether to update the combo box.
- `bWhen`: Code block for the "when" event.
- `lDesign`: Logical indicating whether the combo box is in design mode.
- `acBitmaps`: Array of bitmaps for owner-drawn combo boxes.
- `bDrawItem`: Code block for custom drawing.
- `nStyle`: Style of the combo box.
- `cPict`: Picture clause for the combo box.
- `bEChange`: Code block for edit change event.
- `cVarName`: Variable name for the combo box.
- `nHGet`: Height of the combo box.
- `nSelHt`, `nItmHt`: Selection and item heights.
- `nListWidth`: Width of the drop-down list.
- `cDir`: Directory path for directory combo boxes.
- `nAttr`: Attributes for directory combo boxes.
- `oSayDir`: Associated `TSay` object for directory combo boxes.
- `bOwnerDraw`: Code block for owner-drawn events.

2. **`ReDefine()`**:
- **Description**: Redefines an existing combo box.
- **Parameters**: Similar to `New()`.

3. **`Add()`**:
- **Description**: Adds an item to the combo box.
- **Parameters**:
- `cItem`: Item to add.
- `nAt`: Position to add the item.

4. **`GenLocals()`**:
- **Description**: Generates local variables for the combo box.

5. **`cGenPrg()`**:
- **Description**: Generates the code for the combo box in a program.

6. **`Change()`**:
- **Description**: Handles the change event of the combo box.

7. **`Close()`**:
- **Description**: Closes the drop-down list of the combo box.

8. **`CloseUp()`**:
- **Description**: Handles the close-up event of the combo box.

9. **`DropDown()`**:
- **Description**: Handles the drop-down event of the combo box.

10. **`CtlColor()`**:
- **Description**: Handles the control color event.

11. **`Default()`**:
- **Description**: Sets default values for the combo box.

12. **`DefControl()`**:
- **Description**: Defines a control within the combo box.

13. **`Del()`**:
- **Description**: Deletes an item from the combo box.
- **Parameters**:
- `nAt`: Position of the item to delete.

14. **`Destroy()`**:
- **Description**: Destroys the combo box and releases resources.

15. **`DrawItem()`**:
- **Description**: Handles custom drawing of items in the combo box.
- **Parameters**:
- `nIdCtl`: Control ID.
- `nPStruct`: Pointer to the draw item structure.

16. **`End()`**:
- **Description**: Ends the combo box and hides it.

17. **`FillMeasure()`**:
- **Description**: Measures the items in the combo box.

18. **`FindString()`**:
- **Description**: Finds a string in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

19. **`Find()`**:
- **Description**: Checks if an item exists in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

20. **`GetKeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.

21. **`GetMinVisible()`**:
- **Description**: Gets the minimum number of visible items in the combo box.

22. **`GotFocus()`**:
- **Description**: Handles the focus event of the combo box.

23. **`HandleEvent()`**:
- **Description**: Handles events for the combo box.
- **Parameters**:
- `nMsg`: Message ID.
- `nWParam`: WPARAM value.
- `nLParam`: LPARAM value.

24. **`Initiate()`**:
- **Description**: Initializes the combo box.
- **Parameters**:
- `hDlg`: Handle to the dialog.

25. **`Insert()`**:
- **Description**: Inserts an item into the combo box.
- **Parameters**:
- `cItem`: Item to insert.
- `nAt`: Position to insert the item.

26. **`IsClosed()`**:
- **Description**: Checks if the combo box is closed.

27. **`IsOpen()`**:
- **Description**: Checks if the combo box is open.

28. **`KeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

29. **`KeyDown()`**:
- **Description**: Handles key down events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

30. **`LostFocus()`**:
- **Description**: Handles the lost focus event.
- **Parameters**:
- `hWndGetFocus`: Handle to the window that gets focus.

31. **`lValid()`**:
- **Description**: Validates the combo box.

32. **`Modify()`**:
- **Description**: Modifies an item in the combo box.
- **Parameters**:
- `cItem`: New item value.
- `nAt`: Position of the item to modify.

33. **`MouseMove()`**:
- **Description**: Handles mouse move events.
- **Parameters**:
- `nRow`, `nCol`: Mouse coordinates.
- `nKeyFlags`: Key flags.

34. **`Open()`**:
- **Description**: Opens the drop-down list of the combo box.

35. **`Refresh()`**:
- **Description**: Refreshes the combo box.

36. **`Reset()`**:
- **Description**: Resets the combo box.
- **Parameters**:
- `lChanged`: Logical indicating whether to trigger the change event.

37. **`Select()`**:
- **Description**: Selects an item in the combo box.
- **Parameters**:
- `nItem`: Index of the item to select.

38. **`Set()`**:
- **Description**: Sets the value of the combo box.
- **Parameters**:
- `cNewItem`: New value to set.

39. **`SetBitmaps()`**:
- **Description**: Sets bitmaps for the combo box.
- **Parameters**:
- `acBitmaps`: Array of bitmaps.

40. **`SetColorFocus()`**:
- **Description**: Sets the focus color for the combo box.
- **Parameters**:
- `nClrFocus`: Color to set.

41. **`SetItems()`**:
- **Description**: Sets the items in the combo box.
- **Parameters**:
- `aItems`: Array of items.
- `lChanged`: Logical indicating whether to trigger the change event.

42. **`SetMinVisible()`**:
- **Description**: Sets the minimum number of visible items in the combo box.
- **Parameters**:
- `nItems`: Number of items.

43. **`ShowToolTip()`**:
- **Description**: Shows a tooltip for the combo box.

44. **`VarGet()`**:
- **Description**: Gets the value of the combo box.

45. **`State()`**:
- **Description**: Gets the state of the combo box (open or closed).

46. **`HGet()`**:
- **Description**: Sets the height of the combo box.
- **Parameters**:
- `nHeight`: Height to set.

47. **`nSelectionHeight()`**:
- **Description**: Gets or sets the selection height of the combo box.
- **Parameters**:
- `nNew`: New selection height.

48. **`nItemHeight()`**:
- **Description**: Gets or sets the item height of the combo box.
- **Parameters**:
- `nNew`: New item height.

49. **`nDropWidth()`**:
- **Description**: Gets or sets the drop-down width of the combo box.
- **Parameters**:
- `nNew`: New drop-down width.

50. **`GetSelText()`**:
- **Description**: Gets the selected text in the combo box.

51. **`SetDir()`**:
- **Description**: Sets the directory for directory combo boxes.
- **Parameters**:
- `cDir`: Directory path.
- `nType`: Directory style.

52. **`SetFont()`**:
- **Description**: Sets the font for the combo box.
- **Parameters**:
- `oFont`: Font object.

#### Additional Notes
- The `TComboBox` class is designed to be highly customizable, allowing for owner-drawn items, custom event handling, and integration with other controls like `TGet` and `TSay`.
- The class supports incremental search, directory listing, and various styles and behaviors typical of combo boxes in Windows applications.
- The class also includes methods for handling focus, color changes, and tooltips, making it a versatile control for user interfaces.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-17T16:13:20-07:00 2025-01-17T16:13:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=276992#p276992
### Class Documentation: `TComboMetro`

#### Overview
The `TComboMetro` class is a custom control class derived from `TControl`. It represents a Metro-style combo box control, which is a graphical user interface element that allows users to select an item from a dropdown list. This class provides functionality for handling user interactions, displaying items, and managing the visual appearance of the combo box.

#### Data Members (DATAs)

1. **`lRegistered` (CLASSDATA)**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the class has been registered. This is a class-level data member.

2. **`nMargin`**
- **Type:** `NUMERIC`
- **Description:** The margin size around the combo box. Initialized to `8`.

3. **`oWndParent`**
- **Type:** `OBJECT`
- **Description:** Reference to the parent window of the combo box.

4. **`nClrBorder`**
- **Type:** `NUMERIC`
- **Description:** The color of the combo box border. Initialized to `CLR_GRAY`.

5. **`lWorking`, `lBtnUp`, `lBtnDown`, `lPressed`**
- **Type:** `LOGICAL`
- **Description:** Flags to track the state of the combo box (e.g., whether it is being interacted with, whether a button is pressed, etc.).

6. **`lBorder`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box has a border. Initialized to `.f.` (false).

7. **`hPenButton`**
- **Type:** `HANDLE`
- **Description:** Handle to the pen used for drawing the combo box button.

8. **`nAt`**
- **Type:** `NUMERIC`
- **Description:** The index of the currently selected item in the combo box.

9. **`aItems`**
- **Type:** `ARRAY`
- **Description:** An array containing the items to be displayed in the combo box.

10. **`lNumeric`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box items are numeric. Initialized to `.f.` (false).

#### Methods

1. **`New( nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign )`**
- **Description:** Constructor method for the `TComboMetro` class. Initializes the combo box with the specified parameters.
- **Parameters:**
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block to get/set the combo box value.
- `aItems`: Array of items to display.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help ID for the combo box.
- `bChange`: Code block to execute when the combo box value changes.
- `bValid`: Code block to validate the combo box value.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Indicates whether dimensions are in pixels.
- `oFont`: Font to use for the combo box.
- `cMsg`: Tooltip message.
- `lUpdate`: Indicates whether to update the combo box value.
- `bWhen`: Code block to execute before the combo box is activated.
- `lDesign`: Indicates whether the combo box is in design mode.

2. **`Initiate( hDlg )`**
- **Description:** Initializes the combo box control within a dialog.
- **Parameters:**
- `hDlg`: Handle to the dialog.

3. **`Default()`**
- **Description:** Sets the default value for the combo box based on the current selection.

4. **`Destroy()`**
- **Description:** Destroys the combo box control and releases associated resources.

5. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the combo box gains focus.
- **Parameters:**
- `hCtlLost`: Handle to the control that lost focus.

6. **`LostFocus( hWndGetFocus )`**
- **Description:** Handles the event when the combo box loses focus.
- **Parameters:**
- `hWndGetFocus`: Handle to the control that gained focus.

7. **`Set( cNewItem )`**
- **Description:** Sets the selected item in the combo box.
- **Parameters:**
- `cNewItem`: The new item to select.

8. **`Refresh()`**
- **Description:** Refreshes the combo box display.

9. **`Click()`**
- **Description:** Handles the click event on the combo box.

10. **`Display()`**
- **Description:** Displays the combo box by painting it.

11. **`Paint()`**
- **Description:** Paints the combo box on the screen.

12. **`LButtonDown( nRow, nCol, nFlags, lTouch )`**
- **Description:** Handles the left mouse button down event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.
- `nFlags`: Flags indicating the state of the mouse buttons.
- `lTouch`: Indicates whether the event was triggered by a touch input.

13. **`LButtonUp( nRow, nCol )`**
- **Description:** Handles the left mouse button up event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.

14. **`KeyChar( nKey, nFlags )`**
- **Description:** Handles key press events.
- **Parameters:**
- `nKey`: The key code of the pressed key.
- `nFlags`: Flags indicating the state of the keyboard.

#### Additional Notes
- The `TComboMetro` class is designed to be used in a graphical user interface (GUI) environment, where it provides a dropdown list for user selection.
- The class includes methods for handling user interactions, such as mouse clicks and key presses, and for managing the visual appearance of the combo box.
- The `TX8` class is a helper class used internally by `TComboMetro` to manage the dropdown list and handle scrolling and selection within the list.

This documentation provides a comprehensive overview of the `TComboMetro` class, its data members, and methods, along with a brief description of each.
]]>
### Class Documentation: `TComboMetro`

#### Overview
The `TComboMetro` class is a custom control class derived from `TControl`. It represents a Metro-style combo box control, which is a graphical user interface element that allows users to select an item from a dropdown list. This class provides functionality for handling user interactions, displaying items, and managing the visual appearance of the combo box.

#### Data Members (DATAs)

1. **`lRegistered` (CLASSDATA)**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the class has been registered. This is a class-level data member.

2. **`nMargin`**
- **Type:** `NUMERIC`
- **Description:** The margin size around the combo box. Initialized to `8`.

3. **`oWndParent`**
- **Type:** `OBJECT`
- **Description:** Reference to the parent window of the combo box.

4. **`nClrBorder`**
- **Type:** `NUMERIC`
- **Description:** The color of the combo box border. Initialized to `CLR_GRAY`.

5. **`lWorking`, `lBtnUp`, `lBtnDown`, `lPressed`**
- **Type:** `LOGICAL`
- **Description:** Flags to track the state of the combo box (e.g., whether it is being interacted with, whether a button is pressed, etc.).

6. **`lBorder`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box has a border. Initialized to `.f.` (false).

7. **`hPenButton`**
- **Type:** `HANDLE`
- **Description:** Handle to the pen used for drawing the combo box button.

8. **`nAt`**
- **Type:** `NUMERIC`
- **Description:** The index of the currently selected item in the combo box.

9. **`aItems`**
- **Type:** `ARRAY`
- **Description:** An array containing the items to be displayed in the combo box.

10. **`lNumeric`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box items are numeric. Initialized to `.f.` (false).

#### Methods

1. **`New( nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign )`**
- **Description:** Constructor method for the `TComboMetro` class. Initializes the combo box with the specified parameters.
- **Parameters:**
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block to get/set the combo box value.
- `aItems`: Array of items to display.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help ID for the combo box.
- `bChange`: Code block to execute when the combo box value changes.
- `bValid`: Code block to validate the combo box value.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Indicates whether dimensions are in pixels.
- `oFont`: Font to use for the combo box.
- `cMsg`: Tooltip message.
- `lUpdate`: Indicates whether to update the combo box value.
- `bWhen`: Code block to execute before the combo box is activated.
- `lDesign`: Indicates whether the combo box is in design mode.

2. **`Initiate( hDlg )`**
- **Description:** Initializes the combo box control within a dialog.
- **Parameters:**
- `hDlg`: Handle to the dialog.

3. **`Default()`**
- **Description:** Sets the default value for the combo box based on the current selection.

4. **`Destroy()`**
- **Description:** Destroys the combo box control and releases associated resources.

5. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the combo box gains focus.
- **Parameters:**
- `hCtlLost`: Handle to the control that lost focus.

6. **`LostFocus( hWndGetFocus )`**
- **Description:** Handles the event when the combo box loses focus.
- **Parameters:**
- `hWndGetFocus`: Handle to the control that gained focus.

7. **`Set( cNewItem )`**
- **Description:** Sets the selected item in the combo box.
- **Parameters:**
- `cNewItem`: The new item to select.

8. **`Refresh()`**
- **Description:** Refreshes the combo box display.

9. **`Click()`**
- **Description:** Handles the click event on the combo box.

10. **`Display()`**
- **Description:** Displays the combo box by painting it.

11. **`Paint()`**
- **Description:** Paints the combo box on the screen.

12. **`LButtonDown( nRow, nCol, nFlags, lTouch )`**
- **Description:** Handles the left mouse button down event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.
- `nFlags`: Flags indicating the state of the mouse buttons.
- `lTouch`: Indicates whether the event was triggered by a touch input.

13. **`LButtonUp( nRow, nCol )`**
- **Description:** Handles the left mouse button up event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.

14. **`KeyChar( nKey, nFlags )`**
- **Description:** Handles key press events.
- **Parameters:**
- `nKey`: The key code of the pressed key.
- `nFlags`: Flags indicating the state of the keyboard.

#### Additional Notes
- The `TComboMetro` class is designed to be used in a graphical user interface (GUI) environment, where it provides a dropdown list for user selection.
- The class includes methods for handling user interactions, such as mouse clicks and key presses, and for managing the visual appearance of the combo box.
- The `TX8` class is a helper class used internally by `TComboMetro` to manage the dropdown list and handle scrolling and selection within the list.

This documentation provides a comprehensive overview of the `TComboMetro` class, its data members, and methods, along with a brief description of each.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-18T15:24:12-07:00 2025-01-18T15:24:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277016#p277016
### **Class Documentation: `TControl`**

The `TControl` class is a fundamental class in the FiveWin library, which is used for creating and managing GUI controls in Windows applications. It inherits from the `TWindow` class and provides a wide range of functionalities for handling user interactions, resizing, dragging, and other control-related operations.

This class is designed to be the base class for various GUI controls like buttons, checkboxes, textboxes, etc. It includes methods and data members that allow for customization, event handling, and control manipulation.

---

### **Key Features**
- **Drag and Drop Support**: The class supports dragging controls within the window, with grid alignment and resizing capabilities.
- **Event Handling**: It provides methods to handle mouse events, keyboard events, and focus changes.
- **Customizable Properties**: The class allows for customization of control properties such as size, position, alignment, and appearance.
- **Dynamic Resizing**: Controls can be resized dynamically, with support for relative and absolute positioning.
- **Transparency and 3D Look**: The class supports transparent controls and a 3D look for controls.

---

### **Data Members**

#### **Control State and Behavior**
- **`bSetGet`**: A codeblock used to get or set the value of the control.
- **`bChange`**: A codeblock executed when the control's value changes.
- **`bDragBegin`**: A codeblock executed when dragging begins.
- **`lCaptured`**: Logical flag indicating whether the control has captured the mouse.
- **`lDrag`**: Logical flag indicating whether the control is in drag mode.
- **`lMouseDown`**: Logical flag indicating whether the mouse button is pressed on the control.
- **`lUpdate`**: Logical flag indicating whether the control should be updated.
- **`l3DLook`**: Logical flag indicating whether the control has a 3D look.
- **`nLastRow`, `nLastCol`**: Numeric values storing the last mouse position.
- **`nMResize`**: Numeric value indicating the type of mouse resizing (e.g., RES_NW, RES_N, etc.).
- **`nDlgCode`**: Numeric value returned by `GetDlgCode()` for default behavior.
- **`oJump`**: Reference to the next control to focus after validation.
- **`l97Look`**: Logical flag indicating whether the control has a Windows 97 look.
- **`bSysKeyDown`**: A codeblock executed when a system key is pressed.
- **`bPreDelControl`, `bPostDelControl`**: Codeblocks executed before and after deleting the control.
- **`bDrag`, `bPostDrag`, `bPreDrag`**: Codeblocks executed during and after dragging.
- **`nClientBevel`**: Numeric value indicating the bevel size of the client area.
- **`lTransparent`**: Logical flag indicating whether the control is transparent.
- **`aSizeRect`**: Array storing the size and position of the control.
- **`ResizeType`**: String indicating the type of resizing (e.g., "NW", "NE", etc.).
- **`LastValidValue`**: The last valid value of the control (read-only).
- **`uOriginalValue`**: The original value of the control (read-only).

#### **Class Variables**
- **`nInitID`**: Static numeric value used to generate unique control IDs.
- **`nPoint`**: Static numeric value used for mouse position tracking.
- **`aDots`**: Static array storing the dots used for resizing controls in design mode.
- **`aProperties`**: Static array listing the properties of the control (e.g., `cTitle`, `cVarName`, etc.).
- **`bDelete`**: Static codeblock executed when deleting a control.

---

### **Methods**

#### **Control Positioning and Sizing**
- **`nTop(nNewTop)`**: Gets or sets the top position of the control.
- **`nLeft(nNewLeft)`**: Gets or sets the left position of the control.
- **`AdjBottom()`**: Adjusts the bottom position of the control.
- **`AdjClient()`**: Adjusts the client area of the control.
- **`AdjLeft()`**: Adjusts the left position of the control.
- **`AdjRight()`**: Adjusts the right position of the control.
- **`AdjTop()`**: Adjusts the top position of the control.
- **`Move(nTop, nLeft, nWidth, nHeight, lRepaint)`**: Moves the control to a new position and size.
- **`CalcSize(nTop, nLeft, nWidth, nHeight, lRelative, oWnd, nBottom, nRight)`**: Calculates the size and position of the control relative to its parent window.

#### **Event Handling**
- **`Change()`**: Virtual method called when the control's value changes.
- **`ChangeFocus()`**: Changes the focus to the next control.
- **`Click()`**: Handles the click event of the control.
- **`LDblClick(nRow, nCol, nFlags)`**: Handles the double-click event of the control.
- **`LButtonDown(nRow, nCol, nKeyFlags, lTouch)`**: Handles the left mouse button down event.
- **`LButtonUp(nRow, nCol, nKeyFlags)`**: Handles the left mouse button up event.
- **`MouseMove(nRow, nCol, nKeyFlags)`**: Handles the mouse move event.
- **`KeyChar(nKey, nFlags)`**: Handles the key press event.
- **`KeyDown(nKey, nFlags)`**: Handles the key down event.
- **`KeyUp(nKey, nFlags)`**: Handles the key up event.
- **`SysChar(nKey, nFlags)`**: Handles the system character event.
- **`SysKeyDown(nKey, nFlags)`**: Handles the system key down event.

#### **Focus and Validation**
- **`GotFocus(hCtlLost)`**: Handles the focus gain event.
- **`LostFocus(hWndGetFocus)`**: Handles the focus loss event.
- **`lValid()`**: Validates the control's value.
- **`ForWhen()`**: Evaluates the `WHEN` clause of the control.

#### **Drag and Drop**
- **`DragBegin(nRow, nCol, nKeyFlags)`**: Begins the drag operation.
- **`MResize(nType, nRow, nCol, oDot)`**: Resizes the control using the mouse.
- **`ShowDots()`**: Shows the resize dots around the control.
- **`HideDots()`**: Hides the resize dots.

#### **Rendering and Appearance**
- **`Paint()`**: Virtual method for painting the control.
- **`PaintBack(hDC)`**: Paints the background of the control.
- **`EraseBkGnd(hDC)`**: Erases the background of the control.
- **`Colors(hDC)`**: Sets the text and background colors of the control.
- **`Set3DLook(lOnOff)`**: Enables or disables the 3D look of the control.

#### **Utility Methods**
- **`cToChar(cCtrlClass)`**: Converts the control to a character representation.
- **`GenLocals()`**: Generates local variables for the control.
- **`GetCtrlIndex()`**: Returns the index of the control in its parent window.
- **`Html()`**: Returns an empty string (placeholder for HTML representation).
- **`Init()`**: Virtual method for initializing the control.
- **`Initiate(hDlg)`**: Initializes the control within a dialog.
- **`Default()`**: Sets default values for the control.
- **`GetDlgCode(nLastKey)`**: Returns the dialog code for the control.
- **`GetNewId()`**: Generates a new unique ID for the control.
- **`Inspect(cDataName)`**: Inspects the control's properties.
- **`VarPut(uVal)`**: Sets the value of the control.
- **`VarGet()`**: Gets the value of the control.

#### **System Commands**
- **`SysCommand(nType, nLoWord, nHiWord)`**: Handles system commands like Alt+key combinations.
- **`HandleEvent(nMsg, nWParam, nLParam)`**: Handles various Windows messages.

---

### **Additional Notes**
- The class supports **grid-based resizing** and **dragging** of controls, which is useful in design mode.
- It provides **transparency** and **3D look** options for controls.
- The class is designed to work seamlessly with **FiveWin's event-driven architecture**, making it easy to handle user interactions.

---

### **Example Usage**
```xBase
// Create a new TControl instance
oControl := TControl():New()

// Set the control's position and size
oControl:Move(100, 100, 200, 50)

// Enable dragging
oControl:lDrag := .T.

// Handle the click event
oControl:bLClicked := { || MsgInfo("Control Clicked!") }

// Add the control to a window
oWnd:AddControl(oControl)
```

This class is a cornerstone of the FiveWin library, providing the foundation for creating interactive and customizable GUI controls in Windows applications.
]]>
### **Class Documentation: `TControl`**

The `TControl` class is a fundamental class in the FiveWin library, which is used for creating and managing GUI controls in Windows applications. It inherits from the `TWindow` class and provides a wide range of functionalities for handling user interactions, resizing, dragging, and other control-related operations.

This class is designed to be the base class for various GUI controls like buttons, checkboxes, textboxes, etc. It includes methods and data members that allow for customization, event handling, and control manipulation.

---

### **Key Features**
- **Drag and Drop Support**: The class supports dragging controls within the window, with grid alignment and resizing capabilities.
- **Event Handling**: It provides methods to handle mouse events, keyboard events, and focus changes.
- **Customizable Properties**: The class allows for customization of control properties such as size, position, alignment, and appearance.
- **Dynamic Resizing**: Controls can be resized dynamically, with support for relative and absolute positioning.
- **Transparency and 3D Look**: The class supports transparent controls and a 3D look for controls.

---

### **Data Members**

#### **Control State and Behavior**
- **`bSetGet`**: A codeblock used to get or set the value of the control.
- **`bChange`**: A codeblock executed when the control's value changes.
- **`bDragBegin`**: A codeblock executed when dragging begins.
- **`lCaptured`**: Logical flag indicating whether the control has captured the mouse.
- **`lDrag`**: Logical flag indicating whether the control is in drag mode.
- **`lMouseDown`**: Logical flag indicating whether the mouse button is pressed on the control.
- **`lUpdate`**: Logical flag indicating whether the control should be updated.
- **`l3DLook`**: Logical flag indicating whether the control has a 3D look.
- **`nLastRow`, `nLastCol`**: Numeric values storing the last mouse position.
- **`nMResize`**: Numeric value indicating the type of mouse resizing (e.g., RES_NW, RES_N, etc.).
- **`nDlgCode`**: Numeric value returned by `GetDlgCode()` for default behavior.
- **`oJump`**: Reference to the next control to focus after validation.
- **`l97Look`**: Logical flag indicating whether the control has a Windows 97 look.
- **`bSysKeyDown`**: A codeblock executed when a system key is pressed.
- **`bPreDelControl`, `bPostDelControl`**: Codeblocks executed before and after deleting the control.
- **`bDrag`, `bPostDrag`, `bPreDrag`**: Codeblocks executed during and after dragging.
- **`nClientBevel`**: Numeric value indicating the bevel size of the client area.
- **`lTransparent`**: Logical flag indicating whether the control is transparent.
- **`aSizeRect`**: Array storing the size and position of the control.
- **`ResizeType`**: String indicating the type of resizing (e.g., "NW", "NE", etc.).
- **`LastValidValue`**: The last valid value of the control (read-only).
- **`uOriginalValue`**: The original value of the control (read-only).

#### **Class Variables**
- **`nInitID`**: Static numeric value used to generate unique control IDs.
- **`nPoint`**: Static numeric value used for mouse position tracking.
- **`aDots`**: Static array storing the dots used for resizing controls in design mode.
- **`aProperties`**: Static array listing the properties of the control (e.g., `cTitle`, `cVarName`, etc.).
- **`bDelete`**: Static codeblock executed when deleting a control.

---

### **Methods**

#### **Control Positioning and Sizing**
- **`nTop(nNewTop)`**: Gets or sets the top position of the control.
- **`nLeft(nNewLeft)`**: Gets or sets the left position of the control.
- **`AdjBottom()`**: Adjusts the bottom position of the control.
- **`AdjClient()`**: Adjusts the client area of the control.
- **`AdjLeft()`**: Adjusts the left position of the control.
- **`AdjRight()`**: Adjusts the right position of the control.
- **`AdjTop()`**: Adjusts the top position of the control.
- **`Move(nTop, nLeft, nWidth, nHeight, lRepaint)`**: Moves the control to a new position and size.
- **`CalcSize(nTop, nLeft, nWidth, nHeight, lRelative, oWnd, nBottom, nRight)`**: Calculates the size and position of the control relative to its parent window.

#### **Event Handling**
- **`Change()`**: Virtual method called when the control's value changes.
- **`ChangeFocus()`**: Changes the focus to the next control.
- **`Click()`**: Handles the click event of the control.
- **`LDblClick(nRow, nCol, nFlags)`**: Handles the double-click event of the control.
- **`LButtonDown(nRow, nCol, nKeyFlags, lTouch)`**: Handles the left mouse button down event.
- **`LButtonUp(nRow, nCol, nKeyFlags)`**: Handles the left mouse button up event.
- **`MouseMove(nRow, nCol, nKeyFlags)`**: Handles the mouse move event.
- **`KeyChar(nKey, nFlags)`**: Handles the key press event.
- **`KeyDown(nKey, nFlags)`**: Handles the key down event.
- **`KeyUp(nKey, nFlags)`**: Handles the key up event.
- **`SysChar(nKey, nFlags)`**: Handles the system character event.
- **`SysKeyDown(nKey, nFlags)`**: Handles the system key down event.

#### **Focus and Validation**
- **`GotFocus(hCtlLost)`**: Handles the focus gain event.
- **`LostFocus(hWndGetFocus)`**: Handles the focus loss event.
- **`lValid()`**: Validates the control's value.
- **`ForWhen()`**: Evaluates the `WHEN` clause of the control.

#### **Drag and Drop**
- **`DragBegin(nRow, nCol, nKeyFlags)`**: Begins the drag operation.
- **`MResize(nType, nRow, nCol, oDot)`**: Resizes the control using the mouse.
- **`ShowDots()`**: Shows the resize dots around the control.
- **`HideDots()`**: Hides the resize dots.

#### **Rendering and Appearance**
- **`Paint()`**: Virtual method for painting the control.
- **`PaintBack(hDC)`**: Paints the background of the control.
- **`EraseBkGnd(hDC)`**: Erases the background of the control.
- **`Colors(hDC)`**: Sets the text and background colors of the control.
- **`Set3DLook(lOnOff)`**: Enables or disables the 3D look of the control.

#### **Utility Methods**
- **`cToChar(cCtrlClass)`**: Converts the control to a character representation.
- **`GenLocals()`**: Generates local variables for the control.
- **`GetCtrlIndex()`**: Returns the index of the control in its parent window.
- **`Html()`**: Returns an empty string (placeholder for HTML representation).
- **`Init()`**: Virtual method for initializing the control.
- **`Initiate(hDlg)`**: Initializes the control within a dialog.
- **`Default()`**: Sets default values for the control.
- **`GetDlgCode(nLastKey)`**: Returns the dialog code for the control.
- **`GetNewId()`**: Generates a new unique ID for the control.
- **`Inspect(cDataName)`**: Inspects the control's properties.
- **`VarPut(uVal)`**: Sets the value of the control.
- **`VarGet()`**: Gets the value of the control.

#### **System Commands**
- **`SysCommand(nType, nLoWord, nHiWord)`**: Handles system commands like Alt+key combinations.
- **`HandleEvent(nMsg, nWParam, nLParam)`**: Handles various Windows messages.

---

### **Additional Notes**
- The class supports **grid-based resizing** and **dragging** of controls, which is useful in design mode.
- It provides **transparency** and **3D look** options for controls.
- The class is designed to work seamlessly with **FiveWin's event-driven architecture**, making it easy to handle user interactions.

---

### **Example Usage**
```xBase
// Create a new TControl instance
oControl := TControl():New()

// Set the control's position and size
oControl:Move(100, 100, 200, 50)

// Enable dragging
oControl:lDrag := .T.

// Handle the click event
oControl:bLClicked := { || MsgInfo("Control Clicked!") }

// Add the control to a window
oWnd:AddControl(oControl)
```

This class is a cornerstone of the FiveWin library, providing the foundation for creating interactive and customizable GUI controls in Windows applications.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-24T03:05:07-07:00 2025-01-24T03:05:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277174#p277174
documenta esta clase proporcionando una explicación general de la misma, asi como listando todas sus DATAs y Métodos asi como una descripción de cada uno de ellos, describiendo cada parámetro usado asi como el valor de retorno. A ser posible proporciona un breve ejemplo de uso de cada método.
]]>
documenta esta clase proporcionando una explicación general de la misma, asi como listando todas sus DATAs y Métodos asi como una descripción de cada uno de ellos, describiendo cada parámetro usado asi como el valor de retorno. A ser posible proporciona un breve ejemplo de uso de cada método.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-24T03:28:03-07:00 2025-01-24T03:28:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277175#p277175
Generated with https://aistudio.google.com/prompts/new_chat and the new Gemini Flash 2.0 Thinking Experimental 01-21

Gemini requires a PDF so in order to generate it we opened the PRG from Chrome then printed it as a PDF.

Code: Select all | Expand

Methods of the TXBrowse Class

Here's a detailed list of the methods of the TXBrowse class, including parameters, return values, and usage examples:

1. New( oWnd )

Description: Constructor for the TXBrowse class. Creates a new TXBrowse object as a child of the specified window.

Parameters:

oWnd: OBJECT - The parent TWindow object for the browse control.

Return Value: OBJECT - Returns the newly created TXBrowse object (Self).

Usage Example:

oBrw := TXBrowse():New( oWnd )
content_copy
download
Use code with caution.
Harbour

2. Destroy()

Description: Destructor for the TXBrowse class. Releases resources associated with the browse control, including bitmaps, pens, brushes, and data connections.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Destroy()
content_copy
download
Use code with caution.
Harbour

3. SetStyle( nStyle )

Description: Sets the visual style of the browse control.

Parameters:

nStyle: NUMERIC or CODEBLOCK - Style number (e.g., 2007, flat) or a codeblock that returns a color gradient specification.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetStyle( 2007 ) // Sets the style to the 2007 visual style.
oBrw:SetStyle( { |lInvert| { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, { 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } } ) // Sets a custom gradient.
content_copy
download
Use code with caution.
Harbour

4. SetDarkTheme( nTheme )

Description: Sets the browse control to a dark theme appearance.

Parameters:

nTheme: NUMERIC - Theme number (currently only 1 is supported for dark theme).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetDarkTheme( 1 ) // Enables dark theme.
content_copy
download
Use code with caution.
Harbour

5. SetRecSelBmp( uNew )

Description: Sets the bitmap used for the record selector triangle.

Parameters:

uNew: CHARACTER or NUMERIC - Path to a bitmap file or 0 to use the default arrow bitmap or NIL for no bitmap.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelBmp( "myarrow.bmp" ) // Sets a custom bitmap for record selector.
oBrw:SetRecSelBmp( 0 ) // Uses default arrow bitmap.
oBrw:SetRecSelBmp( nil ) // Removes the bitmap.
content_copy
download
Use code with caution.
Harbour

6. SetRecSelSl( nType )

Description: Sets the record selector to display either record numbers or key numbers.

Parameters:

nType: NUMERIC - 1 to display record numbers (RecNo), 2 to display key numbers (KeyNo), or any other value to display nothing.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelSl( 1 ) // Displays record numbers in the selector column.
oBrw:SetRecSelSl( 2 ) // Displays key numbers in the selector column.
oBrw:SetRecSelSl( 0 ) // Hides the record number/key number display.
content_copy
download
Use code with caution.
Harbour

7. SetRightFreeze( oCol )

Description: Sets a column as the right-freeze column, which remains visible when horizontally scrolling.

Parameters:

oCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to be frozen on the right side, or NIL to remove right-freeze column.

Return Value: OBJECT - Returns the right-freeze TxBrwColumn object or NIL if no right-freeze column is set.

Usage Example:

oBrw:SetRightFreeze( oBrw:aCols[ 3 ] ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( 3 ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( nil ) // Removes any right-freeze column.
content_copy
download
Use code with caution.
Harbour

8. nAt()

Description: Returns the index of the currently selected column within the displayed columns array.

Parameters: None

Return Value: NUMERIC - Index of the selected column in aDisplay array.

Usage Example:

nColIndex := oBrw:nAt()
content_copy
download
Use code with caution.
Harbour

9. EraseBkGnd()

Description: Erases the background of the browse control.

Parameters: None

Return Value: NUMERIC - Always returns 1.

Usage Example:

oBrw:EraseBkGnd()
content_copy
download
Use code with caution.
Harbour

10. cGenPrg( lDlgUnits )

Description: Generates a code snippet (PRG code) to recreate the browse control with its current settings.

Parameters:

lDlgUnits: LOGICAL - Flag indicating if dialog units should be used for size and position.

Return Value: CHARACTER - String containing the generated PRG code.

Usage Example:

cPrgCode := oBrw:cGenPrg( .T. ) // Generates PRG code using dialog units.
content_copy
download
Use code with caution.
Harbour

11. SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows )

Description: Sets the data source to an RDD (e.g., DBF database).

Parameters:

lAddColumns: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable automatic ordering based on index tags, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

aRows: ARRAY - Array data (optional, if array data is used instead of RDD).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRDD( .T., .T. ) // Sets DBF as datasource, automatically adding columns and enabling auto-order.
oBrw:SetRDD( .F., .F., { "FIELD1", "FIELD2" } ) // Sets DBF and specifies columns to add.
content_copy
download
Use code with caution.
Harbour

12. SQLRDD_OrdKeyNo( n )

Description: Sets or gets the order key number for SQLRDD data source.

Parameters:

n: NUMERIC - Order key number to set (optional).

Return Value: NUMERIC - Returns the current order key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_OrdKeyNo() // Gets current order key number.
oBrw:SQLRDD_OrdKeyNo( 5 ) // Sets the order key number to 5.
content_copy
download
Use code with caution.
Harbour

13. SQLRDD_OrdkeyGoto( n )

Description: Moves the record pointer in SQLRDD to the specified order key number.

Parameters:

n: NUMERIC - Order key number to go to.

Return Value: None

Usage Example:

oBrw:SQLRDD_OrdkeyGoto( 10 ) // Moves to order key number 10.
content_copy
download
Use code with caution.
Harbour

14. SQLRDD_CalcKeyNo()

Description: Recalculates and returns the current key number for SQLRDD data source.

Parameters: None

Return Value: NUMERIC - Returns the calculated key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_CalcKeyNo()
content_copy
download
Use code with caution.
Harbour

15. SQLRDD_BookMark( nGoTo )

Description: Sets or gets a bookmark for SQLRDD data source based on record number.

Parameters:

nGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmark := oBrw:SQLRDD_BookMark() // Gets current bookmark.
oBrw:SQLRDD_BookMark( 25 ) // Sets bookmark to record number 25.
content_copy
download
Use code with caution.
Harbour

16. SQLRDD_Skipper( n )

Description: Skips records forward or backward in SQLRDD data source.

Parameters:

n: NUMERIC - Number of records to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Returns the number of records actually skipped.

Usage Example:

nSkipped := oBrw:SQLRDD_Skipper( 10 ) // Skips 10 records forward.
nSkipped := oBrw:SQLRDD_Skipper( -5 ) // Skips 5 records backward.
content_copy
download
Use code with caution.
Harbour

17. SQLRDD_Adjust()

Description: Adjusts the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

18. SQLRDD_SaveState()

Description: Saves the state of the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

19. ResetData( uSrc, aCols )

Description: Resets the browse control's data and columns.

Parameters:

uSrc: - New data source (can be array, DBF alias, or other supported types).

aCols: ARRAY - Array of column specifications for the new data (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetData( "NEW_DBF_ALIAS" ) // Resets data to a new DBF alias.
oBrw:ResetData( myNewArray, myColumnSpecs ) // Resets data to a new array with specified columns.
content_copy
download
Use code with caution.
Harbour

20. SetArray( aData, lAutoOrder, nColOrder, aCols, bOnSkip )

Description: Sets the data source to an array.

Parameters:

aData: ARRAY - Two-dimensional array containing the data to display.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

nColOrder: NUMERIC - Column index to order the array data by (if lAutoOrder is .T.).

aCols: ARRAY - Array of column specifications (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetArray( myDataArray, .T., 2 ) // Sets array data, enables auto-order by 2nd column.
oBrw:SetArray( myDataArray, .F., , myColumnSpecs ) // Sets array data with custom column specs.
content_copy
download
Use code with caution.
Harbour

21. SetoDbf( oDbf, aCols, lAutoSort, lAutoCols, aRows )

Description: Sets the data source to an ODBF object.

Parameters:

oDbf: OBJECT - ODBF object representing the database table.

aCols: ARRAY - Array of column specifications (optional).

lAutoSort: LOGICAL - .T. to enable auto-sorting, .F. otherwise.

lAutoCols: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

aRows: ARRAY - Array data (optional, if array data is used instead of DBF).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetoDbf( myDbfObject, myColumnSpecs, .T., .F. ) // Sets ODBF object as datasource with custom columns and auto-sorting enabled.
content_copy
download
Use code with caution.
Harbour

22. SetExcelRange( oRange, lHeaders, aCols )

Description: Sets the data source to an Excel range object.

Parameters:

oRange: OBJECT - Excel Range object.

lHeaders: LOGICAL - .T. if the first row of the range contains headers, .F. otherwise.

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetExcelRange( myExcelRange, .T. ) // Sets Excel range as data source with headers.
content_copy
download
Use code with caution.
Harbour

23. SetAdo( oRs, lAddCols, lAutoOrder, aFldNames )

Description: Sets the data source to an ADO recordset object.

Parameters:

oRs: OBJECT - ADO Recordset object.

lAddCols: LOGICAL - .T. to automatically add columns based on recordset fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetAdo( myAdoRecordset, .T., .T. ) // Sets ADO recordset as data source with auto-columns and auto-order.
content_copy
download
Use code with caution.
Harbour

24. SetTree( oTree, aResource, bOnSkip, aCols )

Description: Sets the data source to a Tree object.

Parameters:

oTree: OBJECT - Tree object.

aResource: - Resource for tree bitmaps (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetTree( myTreeObject, "tree_bmp_resource" ) // Sets Tree object as data source.
content_copy
download
Use code with caution.
Harbour

25. SetColsForTree( uData )

Description: Sets columns for a tree browse based on data type.

Parameters:

uData: - Data type indicator for tree browse columns.

Return Value: None

Usage Example: (Internal use, called within SetTree)

26. InvertPivot()

Description: Inverts the pivot of the browse control (rotates data 90 degrees).

Parameters: None

Return Value: None

Usage Example:

oBrw:InvertPivot()
content_copy
download
Use code with caution.
Harbour

27. ArrCalcWidths( aData, aCols, nMaxRows )

Description: Calculates column widths based on array data and column specifications.

Parameters:

aData: ARRAY - Data array.

aCols: ARRAY - Column specifications array.

nMaxRows: NUMERIC - Maximum number of rows to consider for width calculation.

Return Value: ARRAY - Array containing calculated column widths.

Usage Example: (Internal use, called within AutoFit)

28. GetColsData( cData, lByCreationOrder )

Description: Retrieves column data as an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to retrieve (e.g., "cHeader", "nWidth").

lByCreationOrder: LOGICAL - .T. to return data in creation order, .F. in display order.

Return Value: ARRAY - Array of values for the specified column DATA member.

Usage Example:

aColumnHeaders := oBrw:GetColsData( "cHeader" ) // Gets all column headers.
aColumnWidths := oBrw:GetColsData( "nWidth", .T. ) // Gets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

29. SetColsData( cData, aValues, lByCreationOrder )

Description: Sets column data based on an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to set (e.g., "cHeader", "nWidth").

aValues: ARRAY - Array of values to set for the column DATA member.

lByCreationOrder: LOGICAL - .T. to set data in creation order, .F. in display order.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetColsData( "cHeader", myColumnHeaders ) // Sets column headers.
oBrw:SetColsData( "nWidth", myWidthValues, .T. ) // Sets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

30. SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign, nHeight )

Description: Sets a group header for a range of columns.

Parameters:

cGrpHdr: CHARACTER - Group header text.

nFrom: NUMERIC - Starting column index for the group.

nUpto: NUMERIC - Ending column index for the group.

oFont: OBJECT - Font object for the group header (optional).

nAlign: NUMERIC - Alignment for the group header text (AL_LEFT, AL_CENTER, AL_RIGHT).

nHeight: NUMERIC - Height of the group header (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetGroupHeader( "Customer Information", 1, 3, myHeaderFont, AL_CENTER, 30 ) // Sets group header for columns 1-3.
content_copy
download
Use code with caution.
Harbour

31. SetGroupTotal( aCols, cHead, nType, oFont )

Description: Sets a group total row for specified columns.

Parameters:

aCols: ARRAY - Array of column indices to calculate totals for.

cHead: CHARACTER - Header text for the group total row.

nType: NUMERIC - Aggregation type (AGGR_SUM, AGGR_AVG, AGGR_MIN, AGGR_MAX, AGGR_COUNT, AGGR_STD, AGGR_STDEVP).

oFont: OBJECT - Font object for the group total row (optional).

Return Value: None

Usage Example:

oBrw:SetGroupTotal( { 4, 5 }, "Total Sales", AGGR_SUM, myTotalFont ) // Sets group total row for columns 4 and 5 with sum aggregation.
content_copy
download
Use code with caution.
Harbour

32. ResetBrowse()

Description: Resets the browse control to its initial state, clearing data, columns, and settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetBrowse()
content_copy
download
Use code with caution.
Harbour

33. SetColFromADO( cnCol, lAutoOrder, aRsColNames, l1900, cAdoDB )

Description: Sets column properties from an ADO field object.

Parameters:

cnCol: - Column identifier (field name or index).

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aRsColNames: ARRAY - Array of ADO column names (optional).

l1900: LOGICAL - Flag for 1900 date handling (optional).

cAdoDB: CHARACTER - ADO database connection string (optional).

Return Value: OBJECT - Returns the TxBrwColumn object.

Usage Example: (Internal use, called within SetADO)

34. ArrCell( nRow, nCol, cPic, lDispZeros )

Description: Retrieves the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

cPic: CHARACTER - Picture format string (optional).

lDispZeros: LOGICAL - .T. to display zeros, .F. otherwise (optional).

Return Value: - Content of the cell (data type depends on array data).

Usage Example:

cellValue := oBrw:ArrCell( 2, 3 ) // Gets value from row 2, column 3.
content_copy
download
Use code with caution.
Harbour

35. ArrCellSet( nRow, nCol, uNewVal, lTrim )

Description: Sets the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

uNewVal: - New value to set for the cell.

lTrim: LOGICAL - .T. to trim string values, .F. otherwise.

Return Value: - Content of the cell after setting the new value.

Usage Example:

oBrw:ArrCellSet( 3, 1, "New Value" ) // Sets value in row 3, column 1.
content_copy
download
Use code with caution.
Harbour

36. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a temporary message box within the browse control.

Parameters:

cMsg: CHARACTER - Message text to display.

nSecs: NUMERIC - Duration to display the message in seconds (0 for indefinite).

nClrText: - Text color for the message (optional).

nClrBack: - Background color for the message (optional).

Return Value: None

Usage Example:

oBrw:ShowMessage( "Processing data...", 5 ) // Shows message for 5 seconds.
content_copy
download
Use code with caution.
Harbour

37. CloseMessage()

Description: Closes the message box displayed by ShowMessage().

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage()
content_copy
download
Use code with caution.
Harbour

38. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the browse cursor position to a specific cell.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

lPixel: LOGICAL - .T. if row/col are pixel coordinates, .F. if row/col are row/column indices.

bAction: CODEBLOCK - Codeblock to execute after repositioning (optional).

Return Value: None

Usage Example:

oBrw:SetPos( 10, 2 ) // Sets cursor to row 10, column 2.
oBrw:SetPos( 50, 100, .T. ) // Sets cursor position by pixel coordinates.
content_copy
download
Use code with caution.
Harbour

39. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control.

Parameters:

uBack: - Background color or bitmap resource.

uBckMode: - Background mode (gradient style or bitmap tiling, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_WHITE ) // Sets white background color.
oBrw:SetBackGround( "background.bmp", 1 ) // Sets background bitmap with vertical gradient.
content_copy
download
Use code with caution.
Harbour

40. MakeBrush()

Description: Creates a brush object for painting the background (internal method).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only)

41. DataRect()

Description: Returns a TRect object representing the data area of the browse (internal method).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only)

42. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment, creating one if needed.

Parameters:

cFile: CHARACTER - Path to a bitmap file (optional, for SET mode).

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example:

oBrw:cBmpAdjBrush( "my_background_brush.bmp" ) // Sets a bitmap brush from file.
hBrush := oBrw:cBmpAdjBrush() // Gets the current bitmap brush.
content_copy
download
Use code with caution.
Harbour

43. ColStretch( nStretchCol )

Description: Stretches a column to fill available space in the browse control.

Parameters:

nStretchCol: NUMERIC - Column index to stretch (optional, if not provided, stretches last column).

Return Value: None

Usage Example:

oBrw:ColStretch( 2 ) // Stretches the 2nd column.
oBrw:ColStretch() // Stretches the last column.
content_copy
download
Use code with caution.
Harbour

44. DestroyToolTip()

Description: Destroys the tooltip control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

45. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

46. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

47. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

48. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

49. uDataSource()

Description: Accessor for the data source object (ODBF, ADO, MySQL, or Array) (internal method).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only)

50. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates or edits a data row object (TXBrwRow).

Parameters:

lNew: LOGICAL - .T. to create a new row, .F. to edit current row.

cFieldList: CHARACTER - Comma-separated string of field names (optional).

lSourceData: LOGICAL - .T. if using source data, .F. otherwise (optional).

aInitVals: ARRAY - Array of initial values for new row (optional).

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example:

oNewRow := oBrw:DataRow( .T. ) // Creates a new data row object.
oEditRow := oBrw:DataRow( .F. ) // Edits the current data row.
content_copy
download
Use code with caution.
Harbour

51. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits the data source (RDD, Array) in a modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

aInitVals: ARRAY - Array of initial values for new record (optional).

bSetup: CODEBLOCK - Codeblock to customize the edit dialog (optional).

Return Value: OBJECT - Returns the edited TXBrowse object (Self).

Usage Example:

oBrw:EditSource( .F., "FIELD1, FIELD2" ) // Edits current record in a dialog, displaying only FIELD1 and FIELD2.
content_copy
download
Use code with caution.
Harbour

52. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits the data source (RDD, Array) in a browse-like modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:EditBrowse( .T. ) // Opens a browse-like dialog to add a new record.
content_copy
download
Use code with caution.
Harbour

53. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: General method for editing data in a modal dialog, automatically choosing between EditSource and EditBrowse based on lSourceData flag.

Parameters: (Same as EditSource and EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

54. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes current record with confirmation message.
content_copy
download
Use code with caution.
Harbour

55. SetOrderNatural()

Description: Sets the browse order to natural order (no sorting).

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural()
content_copy
download
Use code with caution.
Harbour

56. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes in a column for logical data type.

Parameters:

aBmp: ARRAY - Array of bitmaps for checkbox states (optional).

lEdit: LOGICAL - .T. to enable editing checkboxes, .F. otherwise.

aPrompt: CHARACTER - Prompt text for checkboxes (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Enables editable checkboxes in the first column (if logical).
content_copy
download
Use code with caution.
Harbour

57. SetMultiSelectCol( uCol, lFooter )

Description: Sets a column as the multi-select column, enabling row selection using checkboxes.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index for multi-select column.

lFooter: LOGICAL - .T. to show selected row count in footer, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column a multi-select column, showing selected count in footer.
content_copy
download
Use code with caution.
Harbour

58. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Safely evaluates a codeblock, returning a default value if an error occurs (internal method).

Parameters:

RetVal_ifFailed: - Value to return if codeblock evaluation fails.

bBlock: CODEBLOCK - Codeblock to evaluate.

params_for_bBlock: - Optional parameters to pass to the codeblock.

Return Value: - Result of codeblock evaluation or RetVal_ifFailed if error.

Usage Example: (Internal use only)

59. AddVar( uKey, uVal )

Description: Adds a variable to the hCargo hash table for storing custom data associated with the browse control.

Parameters:

uKey: - Key for the variable in the hCargo hash.

uVal: - Value to store for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "MyCustomSetting", "Some Value" ) // Adds a custom setting to the browse.
content_copy
download
Use code with caution.
Harbour

60. lPasteReady()

Description: Checks if clipboard content is in a paste-ready format (internal method).

Parameters: None

Return Value: LOGICAL - .T. if paste-ready, .F. otherwise.

Usage Example: (Internal use only)

61. OnError()

Description: Default error handler for the TXBrowse class (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

62. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Sets properties of a specific column (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

63. GoNextCtrl( hWnd )

Description: Moves focus to the next control in the window (internal method).

Parameters:

hWnd: - Handle to the current control window.

Return Value: None

Usage Example: (Internal use only)

64. GoPrevCtrl()

Description: Moves focus to the previous control in the window (virtual method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, Virtual method for overriding)

65. SelFont()

Description: Selects the current font for the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

66. SetFont( oFont, lResizeCols )

Description: Sets the font for the browse control.

Parameters:

oFont: OBJECT - Font object to set.

lResizeCols: LOGICAL - .T. to resize columns to fit new font, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFontObject ) // Sets a new font for the browse.
oBrw:SetFont( myFontObject, .T. ) // Sets new font and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

67. FontSize( nPlus )

Description: Adjusts the font size by a specified increment.

Parameters:

nPlus: NUMERIC - Font size increment (positive to increase, negative to decrease).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 2 ) // Increases font size by 2 points.
oBrw:FontSize( -1 ) // Decreases font size by 1 point.
content_copy
download
Use code with caution.
Harbour

68. ReCalcWH()

Description: Recalculates width and height of browse elements based on current settings (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

69. DrawSelect()

Description: Draws the selection indicator line (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

70. RefreshCurrent()

Description: Refreshes the currently selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

71. oRow()

Description: Accessor for the current row data in array data source (internal method).

Parameters: None

Return Value: - Returns the current row data as an array element.

Usage Example: (Internal use only)

72. oCol( u )

Description: Retrieves a TxBrwColumn object by its index or object reference.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object or NIL if not found.

Usage Example:

oColumn := oBrw:oCol( 2 ) // Gets the TxBrwColumn object for the 2nd column.
content_copy
download
Use code with caution.
Harbour

73. RefreshHeaders()

Description: Refreshes the header area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

74. RefreshFooters()

Description: Refreshes the footer area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

75. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies a row to the clipboard in text format.

Parameters:

lFullRow: LOGICAL - .T. to copy the entire row, .F. to copy only selected columns.

aCols: ARRAY - Array of column indices to copy (if lFullRow is .F., optional).

lFormatted: LOGICAL - .T. to format data for MSWord export, .F. otherwise.

Return Value: CHARACTER - String containing the row data in text format.

Usage Example:

cRowText := oBrw:ClpRow( .T. ) // Copies the entire current row to clipboard.
content_copy
download
Use code with caution.
Harbour

76. Copy( laRows, aCols )

Description: Copies rows to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - .T. to copy all rows, FALSE to copy current row, or ARRAY of row indices to copy.

aCols: ARRAY - Array of column indices to copy (optional).

Return Value: None

Usage Example:

oBrw:Copy( .T. ) // Copies all rows to clipboard.
oBrw:Copy( .F. ) // Copies current row to clipboard.
oBrw:Copy( { 1, 3, 5 } ) // Copies rows 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

77. Paste( cText )

Description: Pastes text from the clipboard into the browse control.

Parameters:

cText: CHARACTER - Text to paste (optional, if not provided, reads from clipboard).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes from clipboard to current cell.
oBrw:Paste( "Some Text to Paste" ) // Pastes provided text to current cell.
content_copy
download
Use code with caution.
Harbour

78. aCellCoor( nRow, nCol )

Description: Returns coordinates of a cell in pixels (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: ARRAY - Array containing cell coordinates {nTop, nLeft, nBottom, nRight}.

Usage Example: (Internal use only)

79. CellBitmap( nRow, nCol )

Description: Creates a bitmap of a cell (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: OBJECT - Returns the bitmap handle.

Usage Example: (Internal use only)

80. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message in the browse control (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ShowMessage)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading Data..." }, 0 ) // Shows message using a codeblock.
content_copy
download
Use code with caution.
Harbour

81. CloseMessage()

Description: Closes the message box (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage( { || .t. } ) // Closes message using a codeblock.
content_copy
download
Use code with caution.
Harbour

82. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetPos)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 1, .F., { || MsgInfo( "Cursor repositioned" ) } ) // Repositions cursor and executes codeblock.
content_copy
download
Use code with caution.
Harbour

83. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetBackGround)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_BLUE, 2 ) // Sets blue background with gradient using a codeblock.
content_copy
download
Use code with caution.
Harbour

84. MakeBrush()

Description: Creates a brush (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only - method version for codeblock usage)

85. DataRect()

Description: Returns DataRect (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

86. cBmpAdjBrush( cFile )

Description: Sets or gets bitmap brush (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

87. ColStretch( nStretchCol )

Description: Stretches column (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

88. DestroyToolTip()

Description: Destroys tooltip (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

89. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

90. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

91. uDataSource()

Description: Accessor for DataSource (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

92. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

93. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

94. EditBrowse( lNew, cFieldList, lNavigate )

Description: Ed
]]>

Generated with https://aistudio.google.com/prompts/new_chat and the new Gemini Flash 2.0 Thinking Experimental 01-21

Gemini requires a PDF so in order to generate it we opened the PRG from Chrome then printed it as a PDF.

Code: Select all | Expand

Methods of the TXBrowse Class

Here's a detailed list of the methods of the TXBrowse class, including parameters, return values, and usage examples:

1. New( oWnd )

Description: Constructor for the TXBrowse class. Creates a new TXBrowse object as a child of the specified window.

Parameters:

oWnd: OBJECT - The parent TWindow object for the browse control.

Return Value: OBJECT - Returns the newly created TXBrowse object (Self).

Usage Example:

oBrw := TXBrowse():New( oWnd )
content_copy
download
Use code with caution.
Harbour

2. Destroy()

Description: Destructor for the TXBrowse class. Releases resources associated with the browse control, including bitmaps, pens, brushes, and data connections.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Destroy()
content_copy
download
Use code with caution.
Harbour

3. SetStyle( nStyle )

Description: Sets the visual style of the browse control.

Parameters:

nStyle: NUMERIC or CODEBLOCK - Style number (e.g., 2007, flat) or a codeblock that returns a color gradient specification.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetStyle( 2007 ) // Sets the style to the 2007 visual style.
oBrw:SetStyle( { |lInvert| { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, { 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } } ) // Sets a custom gradient.
content_copy
download
Use code with caution.
Harbour

4. SetDarkTheme( nTheme )

Description: Sets the browse control to a dark theme appearance.

Parameters:

nTheme: NUMERIC - Theme number (currently only 1 is supported for dark theme).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetDarkTheme( 1 ) // Enables dark theme.
content_copy
download
Use code with caution.
Harbour

5. SetRecSelBmp( uNew )

Description: Sets the bitmap used for the record selector triangle.

Parameters:

uNew: CHARACTER or NUMERIC - Path to a bitmap file or 0 to use the default arrow bitmap or NIL for no bitmap.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelBmp( "myarrow.bmp" ) // Sets a custom bitmap for record selector.
oBrw:SetRecSelBmp( 0 ) // Uses default arrow bitmap.
oBrw:SetRecSelBmp( nil ) // Removes the bitmap.
content_copy
download
Use code with caution.
Harbour

6. SetRecSelSl( nType )

Description: Sets the record selector to display either record numbers or key numbers.

Parameters:

nType: NUMERIC - 1 to display record numbers (RecNo), 2 to display key numbers (KeyNo), or any other value to display nothing.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelSl( 1 ) // Displays record numbers in the selector column.
oBrw:SetRecSelSl( 2 ) // Displays key numbers in the selector column.
oBrw:SetRecSelSl( 0 ) // Hides the record number/key number display.
content_copy
download
Use code with caution.
Harbour

7. SetRightFreeze( oCol )

Description: Sets a column as the right-freeze column, which remains visible when horizontally scrolling.

Parameters:

oCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to be frozen on the right side, or NIL to remove right-freeze column.

Return Value: OBJECT - Returns the right-freeze TxBrwColumn object or NIL if no right-freeze column is set.

Usage Example:

oBrw:SetRightFreeze( oBrw:aCols[ 3 ] ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( 3 ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( nil ) // Removes any right-freeze column.
content_copy
download
Use code with caution.
Harbour

8. nAt()

Description: Returns the index of the currently selected column within the displayed columns array.

Parameters: None

Return Value: NUMERIC - Index of the selected column in aDisplay array.

Usage Example:

nColIndex := oBrw:nAt()
content_copy
download
Use code with caution.
Harbour

9. EraseBkGnd()

Description: Erases the background of the browse control.

Parameters: None

Return Value: NUMERIC - Always returns 1.

Usage Example:

oBrw:EraseBkGnd()
content_copy
download
Use code with caution.
Harbour

10. cGenPrg( lDlgUnits )

Description: Generates a code snippet (PRG code) to recreate the browse control with its current settings.

Parameters:

lDlgUnits: LOGICAL - Flag indicating if dialog units should be used for size and position.

Return Value: CHARACTER - String containing the generated PRG code.

Usage Example:

cPrgCode := oBrw:cGenPrg( .T. ) // Generates PRG code using dialog units.
content_copy
download
Use code with caution.
Harbour

11. SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows )

Description: Sets the data source to an RDD (e.g., DBF database).

Parameters:

lAddColumns: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable automatic ordering based on index tags, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

aRows: ARRAY - Array data (optional, if array data is used instead of RDD).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRDD( .T., .T. ) // Sets DBF as datasource, automatically adding columns and enabling auto-order.
oBrw:SetRDD( .F., .F., { "FIELD1", "FIELD2" } ) // Sets DBF and specifies columns to add.
content_copy
download
Use code with caution.
Harbour

12. SQLRDD_OrdKeyNo( n )

Description: Sets or gets the order key number for SQLRDD data source.

Parameters:

n: NUMERIC - Order key number to set (optional).

Return Value: NUMERIC - Returns the current order key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_OrdKeyNo() // Gets current order key number.
oBrw:SQLRDD_OrdKeyNo( 5 ) // Sets the order key number to 5.
content_copy
download
Use code with caution.
Harbour

13. SQLRDD_OrdkeyGoto( n )

Description: Moves the record pointer in SQLRDD to the specified order key number.

Parameters:

n: NUMERIC - Order key number to go to.

Return Value: None

Usage Example:

oBrw:SQLRDD_OrdkeyGoto( 10 ) // Moves to order key number 10.
content_copy
download
Use code with caution.
Harbour

14. SQLRDD_CalcKeyNo()

Description: Recalculates and returns the current key number for SQLRDD data source.

Parameters: None

Return Value: NUMERIC - Returns the calculated key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_CalcKeyNo()
content_copy
download
Use code with caution.
Harbour

15. SQLRDD_BookMark( nGoTo )

Description: Sets or gets a bookmark for SQLRDD data source based on record number.

Parameters:

nGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmark := oBrw:SQLRDD_BookMark() // Gets current bookmark.
oBrw:SQLRDD_BookMark( 25 ) // Sets bookmark to record number 25.
content_copy
download
Use code with caution.
Harbour

16. SQLRDD_Skipper( n )

Description: Skips records forward or backward in SQLRDD data source.

Parameters:

n: NUMERIC - Number of records to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Returns the number of records actually skipped.

Usage Example:

nSkipped := oBrw:SQLRDD_Skipper( 10 ) // Skips 10 records forward.
nSkipped := oBrw:SQLRDD_Skipper( -5 ) // Skips 5 records backward.
content_copy
download
Use code with caution.
Harbour

17. SQLRDD_Adjust()

Description: Adjusts the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

18. SQLRDD_SaveState()

Description: Saves the state of the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

19. ResetData( uSrc, aCols )

Description: Resets the browse control's data and columns.

Parameters:

uSrc: - New data source (can be array, DBF alias, or other supported types).

aCols: ARRAY - Array of column specifications for the new data (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetData( "NEW_DBF_ALIAS" ) // Resets data to a new DBF alias.
oBrw:ResetData( myNewArray, myColumnSpecs ) // Resets data to a new array with specified columns.
content_copy
download
Use code with caution.
Harbour

20. SetArray( aData, lAutoOrder, nColOrder, aCols, bOnSkip )

Description: Sets the data source to an array.

Parameters:

aData: ARRAY - Two-dimensional array containing the data to display.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

nColOrder: NUMERIC - Column index to order the array data by (if lAutoOrder is .T.).

aCols: ARRAY - Array of column specifications (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetArray( myDataArray, .T., 2 ) // Sets array data, enables auto-order by 2nd column.
oBrw:SetArray( myDataArray, .F., , myColumnSpecs ) // Sets array data with custom column specs.
content_copy
download
Use code with caution.
Harbour

21. SetoDbf( oDbf, aCols, lAutoSort, lAutoCols, aRows )

Description: Sets the data source to an ODBF object.

Parameters:

oDbf: OBJECT - ODBF object representing the database table.

aCols: ARRAY - Array of column specifications (optional).

lAutoSort: LOGICAL - .T. to enable auto-sorting, .F. otherwise.

lAutoCols: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

aRows: ARRAY - Array data (optional, if array data is used instead of DBF).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetoDbf( myDbfObject, myColumnSpecs, .T., .F. ) // Sets ODBF object as datasource with custom columns and auto-sorting enabled.
content_copy
download
Use code with caution.
Harbour

22. SetExcelRange( oRange, lHeaders, aCols )

Description: Sets the data source to an Excel range object.

Parameters:

oRange: OBJECT - Excel Range object.

lHeaders: LOGICAL - .T. if the first row of the range contains headers, .F. otherwise.

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetExcelRange( myExcelRange, .T. ) // Sets Excel range as data source with headers.
content_copy
download
Use code with caution.
Harbour

23. SetAdo( oRs, lAddCols, lAutoOrder, aFldNames )

Description: Sets the data source to an ADO recordset object.

Parameters:

oRs: OBJECT - ADO Recordset object.

lAddCols: LOGICAL - .T. to automatically add columns based on recordset fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetAdo( myAdoRecordset, .T., .T. ) // Sets ADO recordset as data source with auto-columns and auto-order.
content_copy
download
Use code with caution.
Harbour

24. SetTree( oTree, aResource, bOnSkip, aCols )

Description: Sets the data source to a Tree object.

Parameters:

oTree: OBJECT - Tree object.

aResource: - Resource for tree bitmaps (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetTree( myTreeObject, "tree_bmp_resource" ) // Sets Tree object as data source.
content_copy
download
Use code with caution.
Harbour

25. SetColsForTree( uData )

Description: Sets columns for a tree browse based on data type.

Parameters:

uData: - Data type indicator for tree browse columns.

Return Value: None

Usage Example: (Internal use, called within SetTree)

26. InvertPivot()

Description: Inverts the pivot of the browse control (rotates data 90 degrees).

Parameters: None

Return Value: None

Usage Example:

oBrw:InvertPivot()
content_copy
download
Use code with caution.
Harbour

27. ArrCalcWidths( aData, aCols, nMaxRows )

Description: Calculates column widths based on array data and column specifications.

Parameters:

aData: ARRAY - Data array.

aCols: ARRAY - Column specifications array.

nMaxRows: NUMERIC - Maximum number of rows to consider for width calculation.

Return Value: ARRAY - Array containing calculated column widths.

Usage Example: (Internal use, called within AutoFit)

28. GetColsData( cData, lByCreationOrder )

Description: Retrieves column data as an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to retrieve (e.g., "cHeader", "nWidth").

lByCreationOrder: LOGICAL - .T. to return data in creation order, .F. in display order.

Return Value: ARRAY - Array of values for the specified column DATA member.

Usage Example:

aColumnHeaders := oBrw:GetColsData( "cHeader" ) // Gets all column headers.
aColumnWidths := oBrw:GetColsData( "nWidth", .T. ) // Gets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

29. SetColsData( cData, aValues, lByCreationOrder )

Description: Sets column data based on an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to set (e.g., "cHeader", "nWidth").

aValues: ARRAY - Array of values to set for the column DATA member.

lByCreationOrder: LOGICAL - .T. to set data in creation order, .F. in display order.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetColsData( "cHeader", myColumnHeaders ) // Sets column headers.
oBrw:SetColsData( "nWidth", myWidthValues, .T. ) // Sets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

30. SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign, nHeight )

Description: Sets a group header for a range of columns.

Parameters:

cGrpHdr: CHARACTER - Group header text.

nFrom: NUMERIC - Starting column index for the group.

nUpto: NUMERIC - Ending column index for the group.

oFont: OBJECT - Font object for the group header (optional).

nAlign: NUMERIC - Alignment for the group header text (AL_LEFT, AL_CENTER, AL_RIGHT).

nHeight: NUMERIC - Height of the group header (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetGroupHeader( "Customer Information", 1, 3, myHeaderFont, AL_CENTER, 30 ) // Sets group header for columns 1-3.
content_copy
download
Use code with caution.
Harbour

31. SetGroupTotal( aCols, cHead, nType, oFont )

Description: Sets a group total row for specified columns.

Parameters:

aCols: ARRAY - Array of column indices to calculate totals for.

cHead: CHARACTER - Header text for the group total row.

nType: NUMERIC - Aggregation type (AGGR_SUM, AGGR_AVG, AGGR_MIN, AGGR_MAX, AGGR_COUNT, AGGR_STD, AGGR_STDEVP).

oFont: OBJECT - Font object for the group total row (optional).

Return Value: None

Usage Example:

oBrw:SetGroupTotal( { 4, 5 }, "Total Sales", AGGR_SUM, myTotalFont ) // Sets group total row for columns 4 and 5 with sum aggregation.
content_copy
download
Use code with caution.
Harbour

32. ResetBrowse()

Description: Resets the browse control to its initial state, clearing data, columns, and settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetBrowse()
content_copy
download
Use code with caution.
Harbour

33. SetColFromADO( cnCol, lAutoOrder, aRsColNames, l1900, cAdoDB )

Description: Sets column properties from an ADO field object.

Parameters:

cnCol: - Column identifier (field name or index).

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aRsColNames: ARRAY - Array of ADO column names (optional).

l1900: LOGICAL - Flag for 1900 date handling (optional).

cAdoDB: CHARACTER - ADO database connection string (optional).

Return Value: OBJECT - Returns the TxBrwColumn object.

Usage Example: (Internal use, called within SetADO)

34. ArrCell( nRow, nCol, cPic, lDispZeros )

Description: Retrieves the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

cPic: CHARACTER - Picture format string (optional).

lDispZeros: LOGICAL - .T. to display zeros, .F. otherwise (optional).

Return Value: - Content of the cell (data type depends on array data).

Usage Example:

cellValue := oBrw:ArrCell( 2, 3 ) // Gets value from row 2, column 3.
content_copy
download
Use code with caution.
Harbour

35. ArrCellSet( nRow, nCol, uNewVal, lTrim )

Description: Sets the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

uNewVal: - New value to set for the cell.

lTrim: LOGICAL - .T. to trim string values, .F. otherwise.

Return Value: - Content of the cell after setting the new value.

Usage Example:

oBrw:ArrCellSet( 3, 1, "New Value" ) // Sets value in row 3, column 1.
content_copy
download
Use code with caution.
Harbour

36. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a temporary message box within the browse control.

Parameters:

cMsg: CHARACTER - Message text to display.

nSecs: NUMERIC - Duration to display the message in seconds (0 for indefinite).

nClrText: - Text color for the message (optional).

nClrBack: - Background color for the message (optional).

Return Value: None

Usage Example:

oBrw:ShowMessage( "Processing data...", 5 ) // Shows message for 5 seconds.
content_copy
download
Use code with caution.
Harbour

37. CloseMessage()

Description: Closes the message box displayed by ShowMessage().

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage()
content_copy
download
Use code with caution.
Harbour

38. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the browse cursor position to a specific cell.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

lPixel: LOGICAL - .T. if row/col are pixel coordinates, .F. if row/col are row/column indices.

bAction: CODEBLOCK - Codeblock to execute after repositioning (optional).

Return Value: None

Usage Example:

oBrw:SetPos( 10, 2 ) // Sets cursor to row 10, column 2.
oBrw:SetPos( 50, 100, .T. ) // Sets cursor position by pixel coordinates.
content_copy
download
Use code with caution.
Harbour

39. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control.

Parameters:

uBack: - Background color or bitmap resource.

uBckMode: - Background mode (gradient style or bitmap tiling, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_WHITE ) // Sets white background color.
oBrw:SetBackGround( "background.bmp", 1 ) // Sets background bitmap with vertical gradient.
content_copy
download
Use code with caution.
Harbour

40. MakeBrush()

Description: Creates a brush object for painting the background (internal method).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only)

41. DataRect()

Description: Returns a TRect object representing the data area of the browse (internal method).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only)

42. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment, creating one if needed.

Parameters:

cFile: CHARACTER - Path to a bitmap file (optional, for SET mode).

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example:

oBrw:cBmpAdjBrush( "my_background_brush.bmp" ) // Sets a bitmap brush from file.
hBrush := oBrw:cBmpAdjBrush() // Gets the current bitmap brush.
content_copy
download
Use code with caution.
Harbour

43. ColStretch( nStretchCol )

Description: Stretches a column to fill available space in the browse control.

Parameters:

nStretchCol: NUMERIC - Column index to stretch (optional, if not provided, stretches last column).

Return Value: None

Usage Example:

oBrw:ColStretch( 2 ) // Stretches the 2nd column.
oBrw:ColStretch() // Stretches the last column.
content_copy
download
Use code with caution.
Harbour

44. DestroyToolTip()

Description: Destroys the tooltip control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

45. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

46. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

47. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

48. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

49. uDataSource()

Description: Accessor for the data source object (ODBF, ADO, MySQL, or Array) (internal method).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only)

50. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates or edits a data row object (TXBrwRow).

Parameters:

lNew: LOGICAL - .T. to create a new row, .F. to edit current row.

cFieldList: CHARACTER - Comma-separated string of field names (optional).

lSourceData: LOGICAL - .T. if using source data, .F. otherwise (optional).

aInitVals: ARRAY - Array of initial values for new row (optional).

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example:

oNewRow := oBrw:DataRow( .T. ) // Creates a new data row object.
oEditRow := oBrw:DataRow( .F. ) // Edits the current data row.
content_copy
download
Use code with caution.
Harbour

51. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits the data source (RDD, Array) in a modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

aInitVals: ARRAY - Array of initial values for new record (optional).

bSetup: CODEBLOCK - Codeblock to customize the edit dialog (optional).

Return Value: OBJECT - Returns the edited TXBrowse object (Self).

Usage Example:

oBrw:EditSource( .F., "FIELD1, FIELD2" ) // Edits current record in a dialog, displaying only FIELD1 and FIELD2.
content_copy
download
Use code with caution.
Harbour

52. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits the data source (RDD, Array) in a browse-like modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:EditBrowse( .T. ) // Opens a browse-like dialog to add a new record.
content_copy
download
Use code with caution.
Harbour

53. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: General method for editing data in a modal dialog, automatically choosing between EditSource and EditBrowse based on lSourceData flag.

Parameters: (Same as EditSource and EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

54. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes current record with confirmation message.
content_copy
download
Use code with caution.
Harbour

55. SetOrderNatural()

Description: Sets the browse order to natural order (no sorting).

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural()
content_copy
download
Use code with caution.
Harbour

56. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes in a column for logical data type.

Parameters:

aBmp: ARRAY - Array of bitmaps for checkbox states (optional).

lEdit: LOGICAL - .T. to enable editing checkboxes, .F. otherwise.

aPrompt: CHARACTER - Prompt text for checkboxes (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Enables editable checkboxes in the first column (if logical).
content_copy
download
Use code with caution.
Harbour

57. SetMultiSelectCol( uCol, lFooter )

Description: Sets a column as the multi-select column, enabling row selection using checkboxes.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index for multi-select column.

lFooter: LOGICAL - .T. to show selected row count in footer, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column a multi-select column, showing selected count in footer.
content_copy
download
Use code with caution.
Harbour

58. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Safely evaluates a codeblock, returning a default value if an error occurs (internal method).

Parameters:

RetVal_ifFailed: - Value to return if codeblock evaluation fails.

bBlock: CODEBLOCK - Codeblock to evaluate.

params_for_bBlock: - Optional parameters to pass to the codeblock.

Return Value: - Result of codeblock evaluation or RetVal_ifFailed if error.

Usage Example: (Internal use only)

59. AddVar( uKey, uVal )

Description: Adds a variable to the hCargo hash table for storing custom data associated with the browse control.

Parameters:

uKey: - Key for the variable in the hCargo hash.

uVal: - Value to store for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "MyCustomSetting", "Some Value" ) // Adds a custom setting to the browse.
content_copy
download
Use code with caution.
Harbour

60. lPasteReady()

Description: Checks if clipboard content is in a paste-ready format (internal method).

Parameters: None

Return Value: LOGICAL - .T. if paste-ready, .F. otherwise.

Usage Example: (Internal use only)

61. OnError()

Description: Default error handler for the TXBrowse class (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

62. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Sets properties of a specific column (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

63. GoNextCtrl( hWnd )

Description: Moves focus to the next control in the window (internal method).

Parameters:

hWnd: - Handle to the current control window.

Return Value: None

Usage Example: (Internal use only)

64. GoPrevCtrl()

Description: Moves focus to the previous control in the window (virtual method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, Virtual method for overriding)

65. SelFont()

Description: Selects the current font for the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

66. SetFont( oFont, lResizeCols )

Description: Sets the font for the browse control.

Parameters:

oFont: OBJECT - Font object to set.

lResizeCols: LOGICAL - .T. to resize columns to fit new font, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFontObject ) // Sets a new font for the browse.
oBrw:SetFont( myFontObject, .T. ) // Sets new font and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

67. FontSize( nPlus )

Description: Adjusts the font size by a specified increment.

Parameters:

nPlus: NUMERIC - Font size increment (positive to increase, negative to decrease).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 2 ) // Increases font size by 2 points.
oBrw:FontSize( -1 ) // Decreases font size by 1 point.
content_copy
download
Use code with caution.
Harbour

68. ReCalcWH()

Description: Recalculates width and height of browse elements based on current settings (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

69. DrawSelect()

Description: Draws the selection indicator line (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

70. RefreshCurrent()

Description: Refreshes the currently selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

71. oRow()

Description: Accessor for the current row data in array data source (internal method).

Parameters: None

Return Value: - Returns the current row data as an array element.

Usage Example: (Internal use only)

72. oCol( u )

Description: Retrieves a TxBrwColumn object by its index or object reference.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object or NIL if not found.

Usage Example:

oColumn := oBrw:oCol( 2 ) // Gets the TxBrwColumn object for the 2nd column.
content_copy
download
Use code with caution.
Harbour

73. RefreshHeaders()

Description: Refreshes the header area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

74. RefreshFooters()

Description: Refreshes the footer area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

75. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies a row to the clipboard in text format.

Parameters:

lFullRow: LOGICAL - .T. to copy the entire row, .F. to copy only selected columns.

aCols: ARRAY - Array of column indices to copy (if lFullRow is .F., optional).

lFormatted: LOGICAL - .T. to format data for MSWord export, .F. otherwise.

Return Value: CHARACTER - String containing the row data in text format.

Usage Example:

cRowText := oBrw:ClpRow( .T. ) // Copies the entire current row to clipboard.
content_copy
download
Use code with caution.
Harbour

76. Copy( laRows, aCols )

Description: Copies rows to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - .T. to copy all rows, FALSE to copy current row, or ARRAY of row indices to copy.

aCols: ARRAY - Array of column indices to copy (optional).

Return Value: None

Usage Example:

oBrw:Copy( .T. ) // Copies all rows to clipboard.
oBrw:Copy( .F. ) // Copies current row to clipboard.
oBrw:Copy( { 1, 3, 5 } ) // Copies rows 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

77. Paste( cText )

Description: Pastes text from the clipboard into the browse control.

Parameters:

cText: CHARACTER - Text to paste (optional, if not provided, reads from clipboard).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes from clipboard to current cell.
oBrw:Paste( "Some Text to Paste" ) // Pastes provided text to current cell.
content_copy
download
Use code with caution.
Harbour

78. aCellCoor( nRow, nCol )

Description: Returns coordinates of a cell in pixels (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: ARRAY - Array containing cell coordinates {nTop, nLeft, nBottom, nRight}.

Usage Example: (Internal use only)

79. CellBitmap( nRow, nCol )

Description: Creates a bitmap of a cell (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: OBJECT - Returns the bitmap handle.

Usage Example: (Internal use only)

80. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message in the browse control (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ShowMessage)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading Data..." }, 0 ) // Shows message using a codeblock.
content_copy
download
Use code with caution.
Harbour

81. CloseMessage()

Description: Closes the message box (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage( { || .t. } ) // Closes message using a codeblock.
content_copy
download
Use code with caution.
Harbour

82. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetPos)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 1, .F., { || MsgInfo( "Cursor repositioned" ) } ) // Repositions cursor and executes codeblock.
content_copy
download
Use code with caution.
Harbour

83. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetBackGround)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_BLUE, 2 ) // Sets blue background with gradient using a codeblock.
content_copy
download
Use code with caution.
Harbour

84. MakeBrush()

Description: Creates a brush (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only - method version for codeblock usage)

85. DataRect()

Description: Returns DataRect (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

86. cBmpAdjBrush( cFile )

Description: Sets or gets bitmap brush (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

87. ColStretch( nStretchCol )

Description: Stretches column (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

88. DestroyToolTip()

Description: Destroys tooltip (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

89. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

90. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

91. uDataSource()

Description: Accessor for DataSource (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

92. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

93. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

94. EditBrowse( lNew, cFieldList, lNavigate )

Description: Ed
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-24T03:37:14-07:00 2025-01-24T03:37:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277176#p277176

Code: Select all | Expand

95. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup ) (Continued)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

96. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message box before deletion, .F. for silent deletion.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes the current record with a confirmation prompt.
oBrw:Delete( .F. ) // Deletes the current record without confirmation.
content_copy
download
Use code with caution.
Harbour

97. SetOrderNatural()

Description: Resets the sorting order of the browse to its natural (unsorted) order.

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural() // Removes any sorting applied to the browse.
content_copy
download
Use code with caution.
Harbour

98. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes for the first column of the browse, typically used for selecting rows.

Parameters:

aBmp: ARRAY - Optional array containing bitmap handles for the checkbox states (checked, unchecked, null). If not provided, default bitmaps are used.

lEdit: LOGICAL - .T. to allow users to edit the checkbox state directly in the browse, .F. for read-only checkboxes.

aPrompt: CHARACTER - Optional prompt text associated with the checkboxes.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Adds editable checkboxes to the first column.
oBrw:SetChecks( { hBmpChecked, hBmpUnchecked }, .F., "Select Rows" ) // Adds read-only checkboxes with custom bitmaps and prompt.
content_copy
download
Use code with caution.
Harbour

99. SetMultiSelectCol( uCol, lFooter )

Description: Designates a specific column to function as a multi-select column, enabling row selection using checkboxes in that column.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to designate as the multi-select column.

lFooter: LOGICAL - .T. to display the count of selected rows in the footer, .F. to hide the count.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column the multi-select column, displaying selected count in the footer.
oBrw:SetMultiSelectCol( oBrw:oCol( "MyColumn" ), .F. ) // Makes "MyColumn" the multi-select column, hiding footer count.
content_copy
download
Use code with caution.
Harbour

100. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Provides a safe way to evaluate a codeblock, trapping potential runtime errors and returning a default value if an error occurs. This is useful for preventing browse errors from crashing the application.

Parameters:

RetVal_ifFailed: - The value to be returned if the evaluation of bBlock results in an error.

bBlock: CODEBLOCK - The codeblock to be evaluated.

params_for_bBlock: - Optional parameters to be passed to the codeblock during evaluation.

Return Value: - The result of the codeblock evaluation if successful, or RetVal_ifFailed if an error occurs.

Usage Example: (Primarily for internal use, but can be used in custom codeblocks within TXBrowse)

nValue := oBrw:SafeEval( 0, { || Val( oBrw:ArrCell( 1, 1 ) ) } ) // Safely evaluates Val() on a cell, returns 0 if Val() fails.
content_copy
download
Use code with caution.
Harbour

101. AddVar( uKey, uVal )

Description: Allows adding custom variables to the hCargo hash table associated with the TXBrowse object. This provides a mechanism to store and retrieve custom data related to the browse.

Parameters:

uKey: - The key (identifier) for the variable within the hCargo hash table.

uVal: - The value to be stored for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "UserPreference", "Dark Mode" ) // Stores a user preference setting in hCargo.
customSetting := oBrw:hCargo[ "UserPreference" ] // Retrieves the custom setting.
content_copy
download
Use code with caution.
Harbour

102. lPasteReady()

Description: Checks if the data currently in the clipboard is in a format suitable for pasting into the TXBrowse control.

Parameters: None

Return Value: LOGICAL - Returns .T. if the clipboard data is paste-ready, .F. otherwise.

Usage Example: (Primarily used internally to determine if pasting functionality should be enabled)

103. OnError()

Description: Default error handler method for the TXBrowse class. This method is called when an error occurs within the browse control.

Parameters: None

Return Value: None

Usage Example: (Primarily for internal use; you can override this method to implement custom error handling)

104. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Used internally to set properties of a specific column at a given row and column position, likely during column resizing or layout adjustments.

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

105. GoNextCtrl( hWnd )

Description: Moves the input focus to the next control within the same window as the TXBrowse control. This is often used for navigation between controls in a form or dialog.

Parameters:

hWnd: - Handle of the current control that has focus.

Return Value: None

Usage Example: (Used internally for control navigation)

106. GoPrevCtrl()

Description: Moves the input focus to the previous control in the window. This is a VIRTUAL method, meaning it's designed to be overridden in derived classes to customize the behavior of moving to the previous control.

Parameters: None

Return Value: None

Usage Example: (Virtual method, override in derived classes for custom behavior)

107. SelFont()

Description: Selects and retrieves the currently active font for the TXBrowse control.

Parameters: None

Return Value: None

Usage Example: (Internal use only, likely related to font handling within the control)

108. SetFont( oFont, lResizeCols )

Description: Sets the font to be used for displaying data within the TXBrowse control.

Parameters:

oFont: OBJECT - The TFont object representing the font to be applied.

lResizeCols: LOGICAL - .T. to automatically adjust column widths to fit the new font, .F. to keep column widths unchanged.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFont, .T. ) // Applies 'myFont' and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

109. FontSize( nPlus )

Description: Dynamically adjusts the font size of the browse control, either increasing or decreasing it.

Parameters:

nPlus: NUMERIC - A positive value to increase the font size, or a negative value to decrease it.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 1 ) // Increases the font size by 1 point.
oBrw:FontSize( -2 ) // Decreases the font size by 2 points.
content_copy
download
Use code with caution.
Harbour

110. ReCalcWH()

Description: Recalculates the widths and heights of various elements within the TXBrowse control, such as headers, footers, and rows, based on the current font and other style settings. This is typically called internally after changes that might affect layout.

Parameters: None

Return Value: None

Usage Example: (Internal use only, called automatically when layout changes occur)

111. DrawSelect()

Description: Draws the visual indicator for the currently selected row (the record selector).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting to visually highlight the selected row)

112. RefreshCurrent()

Description: Refreshes the display of the currently selected row in the browse control. This is useful to update the display after data changes.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshCurrent() // Updates the display of the current row.
content_copy
download
Use code with caution.
Harbour

113. aRow()

Description: Accessor method to retrieve the data for the currently selected row when using an array as the data source.

Parameters: None

Return Value: - Returns the data for the current row as an array element.

Usage Example:

currentRowData := oBrw:aRow // Retrieves data of the current row in array browse.
content_copy
download
Use code with caution.
Harbour

114. oCol( u )

Description: Retrieves a TxBrwColumn object associated with the TXBrowse control.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or a direct reference to a TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object if found, otherwise returns NIL.

Usage Example:

oFirstColumn := oBrw:oCol( 1 ) // Retrieves the TxBrwColumn object for the first column.
content_copy
download
Use code with caution.
Harbour

115. RefreshHeaders()

Description: Refreshes the visual display of the header area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshHeaders() // Redraws the header area to reflect changes.
content_copy
download
Use code with caution.
Harbour

116. RefreshFooters()

Description: Refreshes the visual display of the footer area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshFooters() // Redraws the footer area to reflect changes, like updated totals.
content_copy
download
Use code with caution.
Harbour

117. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies the data of a row to the clipboard, formatting it as text.

Parameters:

lFullRow: LOGICAL - .T. to copy all columns of the row, .F. to copy only specified columns.

aCols: ARRAY - (Optional) Array of column indices to copy if lFullRow is .F..

lFormatted: LOGICAL - .T. to format the text output for better compatibility with MS Word, .F. for plain text.

Return Value: CHARACTER - Returns a character string containing the formatted row data for the clipboard.

Usage Example:

clipboardText := oBrw:ClpRow( .T. ) // Copies the entire current row to the clipboard as formatted text.
content_copy
download
Use code with caution.
Harbour

118. Copy( laRows, aCols )

Description: Copies one or more rows from the browse to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - Specifies which rows to copy:

.T. : Copy all rows in the browse.

.F. : Copy only the currently selected row.

ARRAY : Copy rows at the specified indices in the array.

aCols: ARRAY - (Optional) Array of column indices to copy for the specified rows.

Return Value: None

Usage Example:

oBrw:Copy( .F. ) // Copies the currently selected row.
oBrw:Copy( .T., { 1, 3, 5 } ) // Copies all rows but only columns 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

119. Paste( cText )

Description: Pastes data from the clipboard into the browse control, starting at the currently selected cell.

Parameters:

cText: CHARACTER - (Optional) Text string to paste. If omitted, the method reads data from the clipboard.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes clipboard data into the browse.
oBrw:Paste( "Data to paste" ) // Pastes the provided text directly.
content_copy
download
Use code with caution.
Harbour

120. aCellCoor( nRow, nCol )

Description: Retrieves the screen coordinates (top, left, bottom, right) of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: ARRAY - Returns an array containing the coordinates: { nTop, nLeft, nBottom, nRight } in pixels.

Usage Example:

cellCoords := oBrw:aCellCoor( 5, 2 ) // Gets coordinates of the cell at row 5, column 2.
content_copy
download
Use code with caution.
Harbour

121. CellBitmap( nRow, nCol )

Description: Creates a bitmap image of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: OBJECT - Returns a bitmap handle (HBITMAP) of the cell's content.

Usage Example:

hCellBitmap := oBrw:CellBitmap( 1, 1 ) // Creates a bitmap of the cell at row 1, column 1.
content_copy
download
Use code with caution.
Harbour

122. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message overlay within the TXBrowse control. This is a method version of the ShowMessage DATA member, allowing for codeblock parameters.

Parameters: (Same as for the ShowMessage DATA member)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading data..." }, 0 ) // Displays a message using a codeblock for the message text.
content_copy
download
Use code with caution.
Harbour

123. CloseMessage()

Description: Closes any message box currently displayed by ShowMessage.

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage() // Closes the message box.
content_copy
download
Use code with caution.
Harbour

124. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position within the browse. This is a method version of the SetPos DATA member, allowing for a codeblock to be executed after repositioning.

Parameters: (Same as for the SetPos DATA member)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 2, .F., { || MsgInfo( "Cursor moved" ) } ) // Repositions the cursor and executes a codeblock.
content_copy
download
Use code with caution.
Harbour

125. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control. This is a method version of the SetBackGround DATA member, allowing for codeblock parameters.

Parameters: (Same as for the SetBackGround DATA member)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( { || CLR_BLUE }, 2 ) // Sets background using a codeblock for the color and gradient mode.
content_copy
download
Use code with caution.
Harbour

126. MakeBrush()

Description: Creates a brush object for painting the browse background. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only, method version for codeblock use)

127. DataRect()

Description: Returns a TRect object representing the data display area of the browse. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

128. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment. Method version for use within codeblocks.

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

129. ColStretch( nStretchCol )

Description: Stretches a column to fill available space. Method version for use within codeblocks.

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

130. DestroyToolTip()

Description: Destroys the tooltip control. Method version for use within codeblocks.

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

131. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message. Method version for use within codeblocks.

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

132. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave event. Method version for use within codeblocks.

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

133. uDataSource()

Description: Accessor for DataSource. Method version for use within codeblocks.

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

134. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow. Method version for use within codeblocks.

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

135. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source. Method version for use within codeblocks.

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

136. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits Browse. Method version for use within codeblocks.

Parameters: (Same as DATA member EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

137. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: Edits data (general edit method). Method version for use within codeblocks.

Parameters: (Same as DATA member Edit)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

138. Delete( lMsg )

Description: Deletes a record. Method version for use within codeblocks.

Parameters: (Same as DATA member Delete)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

139. GoFltRow( n )

Description: Navigates to a specific row within a filtered browse based on its filter row index.

Parameters:

n: NUMERIC - The filter row index to navigate to (1-based).

Return Value: LOGICAL - Returns .T. if navigation was successful, .F. otherwise.

Usage Example:

oBrw:GoFltRow( 3 ) // Moves the browse cursor to the 3rd row in the filtered dataset.
content_copy
download
Use code with caution.
Harbour

140. GoFltRow( n ) (Second Definition)

Description: Retrieves the filter row index if no parameters are passed.

Parameters:

n: NUMERIC - (Optional) If NIL it returns the current filter row index, otherwise it sets the filter row index.

Return Value: NUMERIC - Returns the current filter row index.

Usage Example:

nCurrentFilterRow := oBrw:GoFltRow() // Gets the current filter row index.
content_copy
download
Use code with caution.
Harbour

141. SaveState( aAdditionalData )

Description: Saves the current state of the browse control, allowing for later restoration.

Parameters:

aAdditionalData: ARRAY - (Optional) Array for saving additional custom data with the browse state.

Return Value: None

Usage Example:

oBrw:SaveState() // Saves the current browse state.
oBrw:SaveState( { "CustomData1", "CustomData2" } ) // Saves state with additional data.
content_copy
download
Use code with caution.
Harbour

142. RestoreState( cState )

Description: Restores the browse control to a previously saved state, using a state string obtained from SaveState().

Parameters:

cState: CHARACTER - State string obtained from SaveState().

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:RestoreState( savedStateString ) // Restores browse state from the saved string.
content_copy
download
Use code with caution.
Harbour

143. OldRestoreState( cState )

Description: Retained for compatibility with older versions (10.8) of the TXBrowse class. Restores browse state from a state string.

Parameters:

cState: CHARACTER - State string in the older format.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (For backward compatibility with older saved states)

144. Lock()

Description: Locks the browse control, preventing data modifications.

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

lLocked := oBrw:Lock()
content_copy
download
Use code with caution.
Harbour

145. UnLock()

Description: Unlocks the browse control, allowing data modifications.

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock()
content_copy
download
Use code with caution.
Harbour

146. SaveData( lRefresh )

Description: Saves any pending data changes to the underlying data source.

Parameters:

lRefresh: LOGICAL - .T. to refresh the browse after saving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

lSaved := oBrw:SaveData( .T. ) // Saves data changes and refreshes the browse.
content_copy
download
Use code with caution.
Harbour

147. ShowSeek()

Description: Shows or hides the incremental seek input control (TGet object).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows the incremental seek input control.
content_copy
download
Use code with caution.
Harbour

148. Seek( cSeek )

Description: Performs an incremental seek operation based on the provided search string.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:Seek( "customer name" ) // Performs incremental seek for "customer name".
content_copy
download
Use code with caution.
Harbour

149. RddIncrSeek( cExpr, uSeek )

Description: Performs incremental seek on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for each record during the seek.

uSeek: - Search string to match against the expression result.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example: (Advanced usage for custom incremental seek logic)

150. RddIncrFilter( cExpr, uSeek )

Description: Performs incremental filtering on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for filtering.

uSeek: - Search string for filtering criteria.

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example: (Advanced usage for custom incremental filtering logic)

151. ArrayIncrSeek( cSeek, nGoTo )

Description: Performs incremental seek on an array data source.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

nGoTo: NUMERIC - Row index to go to if a match is found (optional).

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:ArrayIncrSeek( "item description" ) // Incremental seek in array data.
content_copy
download
Use code with caution.
Harbour

152. ArrayIncrFilter( cSeek, nGoTo )

Description: Performs incremental filtering on an array data source.

Parameters:

cSeek: CHARACTER - String to filter by.

nGoTo: NUMERIC - Row index to navigate to after filtering (optional).

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example:

oBrw:ArrayIncrFilter( "status: pending" ) // Incremental filter on array data.
content_copy
download
Use code with caution.
Harbour

153. AdoIncrSeek( uSeek )

Description: Performs incremental seek on an ADO recordset data source.

Parameters:

uSeek: - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:AdoIncrSeek( "product name" ) // Incremental seek in ADO recordset.
content_copy
download
Use code with caution.
Harbour

154. Select( nOperation )

Description: Selects or deselects rows in multi-select mode based on different operations.

Parameters:

nOperation: NUMERIC - Operation code:

0: Deselect all rows.

1: Add current row to selection.

2: Swap current row selection (toggle).

3: Select a range of rows (Shift+click).

4: Select all rows.

Return Value: None

Usage Example:

oBrw:Select( 1 ) // Adds the current row to the selection.
oBrw:Select( 0 ) // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

155. SelectAll()

Description: Selects all rows in the browse control (shortcut for Select(4)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectAll() // Selects all rows in the browse.
content_copy
download
Use code with caution.
Harbour

156. SelectNone()

Description: Deselects all rows in the browse control (shortcut for Select(0)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectNone() // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

157. IsSelectedRow()

Description: Checks if the current row is selected in multi-select mode.

Parameters: None

Return Value: LOGICAL - .T. if the current row is selected, .F. otherwise.

Usage Example:

if oBrw:IsSelectedRow()
    MsgInfo( "Current row is selected." )
endif
content_copy
download
Use code with caution.
Harbour

158. SelectRow( nOperation )

Description: Selects or deselects the current row in multi-select mode (internal method, likely used by Select).

Parameters:

nOperation: NUMERIC - Operation code (similar to Select, but specifically for the current row).

Return Value: None

Usage Example: (Internal use only)

159. Adjust()

Description: Adjusts the layout and appearance of the browse control, recalculating heights, widths, and other visual elements based on current settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Recalculates and adjusts browse layout.
content_copy
download
Use code with caution.
Harbour

160. Check_oSeek()

Description: Checks and handles the oSeek object (incremental seek input) (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

161. SetSortBmp()

Description: Sets the bitmaps used for sort indicators in column headers (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

162. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Automatically adjusts column widths to fit their content.

Parameters:

aColsToFit: ARRAY - Array of column indices or TxBrwColumn objects to auto-fit. If NIL, auto-fits all columns.

nRows: NUMERIC - Number of rows to consider when calculating column widths. If NIL, considers all rows.

lDataOnly: LOGICAL - .T. to consider only data rows for width calculation, .F. to include header and footer.

nMaxWidth: NUMERIC - Maximum width for columns (optional).

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example:

oBrw:AutoFit() // Auto-fits all columns to their content.
oBrw:AutoFit( { 1, 3 } ) // Auto-fits columns 1 and 3.
oBrw:AutoFit( , 100 ) // Auto-fits columns considering only the first 100 rows.
content_copy
download
Use code with caution.
Harbour

163. CheckSize()

Description: Checks and adjusts the size of the browse control based on margins and padding (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

164. Resize( nSizeType, nWidth, nHeight )

Description: Resizes the browse control to the specified dimensions or using predefined size types.

Parameters:

nSizeType: NUMERIC - Size type code (e.g., SIZE_PIXEL, SIZE_CLIENT, SIZE_WINDOW).

nWidth: NUMERIC - New width in pixels (if nSizeType is SIZE_PIXEL).

nHeight: NUMERIC - New height in pixels (if nSizeType is SIZE_PIXEL).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Resize( SIZE_PIXEL, 800, 600 ) // Resizes browse to 800x600 pixels.
oBrw:Resize( SIZE_CLIENT ) // Resizes browse to fill client area of parent window.
content_copy
download
Use code with caution.
Harbour

165. Change( lRow )

Description: Handles the change event, triggered when the selected row changes or a column is modified.

Parameters:

lRow: LOGICAL - .T. if the change is due to row selection, .F. if due to column change.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use, called automatically when row or column selection changes)

166. MakeTotals( aCols )

Description: Calculates totals for specified columns and prepares them for display in the footer (internal method).

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to calculate totals for.

Return Value: None

Usage Example: (Internal use only)

167. SaveTotals( lBlank )

Description: Saves the calculated totals (internal method).

Parameters:

lBlank: LOGICAL - .T. to blank out existing totals before saving, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

168. ReCalcTotals( lReduce )

Description: Recalculates totals based on changes in data or filtering (internal method).

Parameters:

lReduce: LOGICAL - .T. to reduce totals based on filtered data, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

169. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: General-purpose evaluation method for codeblocks, allowing iteration over browse rows with conditions and limits.

Parameters:

bBlock: CODEBLOCK - Codeblock to be evaluated for each row.

bFor: CODEBLOCK - Codeblock to be evaluated before each row (condition for row processing).

bWhile: CODEBLOCK - Codeblock for loop continuation condition.

nNext: NUMERIC - Number of rows to process (optional).

nRec: NUMERIC - Starting record number (optional).

lRest: LOGICAL - .T. to process from current record to end, .F. otherwise (optional).

Return Value: None

Usage Example:

oBrw:Eval( { |o| MsgInfo( o:Column1 ) }, , { || oBrw:Eof() } ) // Iterates through all rows and displays "Column1" value in each row.
content_copy
download
Use code with caution.
Harbour

170. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Generates a report from the browse data, allowing for preview, printing, and exporting to PDF.

Parameters:

cTitle: CHARACTER - Title for the report.

lPreview: LOGICAL - .T. to show print preview dialog, .F. for direct printing.

lModal: LOGICAL - .T. to show print preview dialog as modal, .F. as modeless.

bSetUp: CODEBLOCK - Codeblock to customize report setup (optional).

aGroupBy: ARRAY - Array of column indices or TxBrwColumn objects to group data by (optional).

cPDF: CHARACTER - Path to save the report as PDF (optional, if provided, exports to PDF directly).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the report (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Report( "Customer Report", .T., .T., , { 2 }, "customer_report.pdf" ) // Generates a previewable PDF report grouped by the 2nd column.
content_copy
download
Use code with caution.
Harbour

171. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Exports browse data to a Microsoft Word document.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the Word document (optional).

nWrdTblFormat: NUMERIC - Word table format code (optional).

nPageOrientation: NUMERIC - Page orientation (0 for portrait, 1 for landscape, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ToWord( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, , 5 ) // Exports data to Word with progress display.
content_copy
download
Use code with caution.
Harbour

172. ToHTML( cHtml, lShow )

Description: Exports browse data to an HTML file.

Parameters:

cHtml: CHARACTER - Path to save the HTML file.

lShow: LOGICAL - .T. to open the HTML file after export, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToHTML( "browse_data.html", .T. ) // Exports data to HTML and opens the file in browser.
content_copy
download
Use code with caution.
Harbour

173. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Exports browse data to a CSV (Comma Separated Values) file.

Parameters:

cFile: CHARACTER - Path to save the CSV file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in CSV (optional).

lHeaders: LOGICAL - .T. to include column headers in CSV, .F. otherwise.

cTrue: CHARACTER - String representation for logical TRUE value in CSV (optional).

cFalse: CHARACTER - String representation for logical FALSE value in CSV (optional).

cDelim: CHARACTER - Delimiter character for CSV (optional, default is comma).

Return Value: None

Usage Example:

oBrw:ToCSV( "browse_data.csv", , .T., "Yes", "No", ";" ) // Exports to CSV with custom delimiter and logical value representations.
content_copy
download
Use code with caution.
Harbour

174. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Exports browse data to an Excel spreadsheet file (XLS or XLSX).

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Excel (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Excel (optional).

lShow: LOGICAL - .T. to open Excel after export, .F. otherwise.

cPDF: CHARACTER - Path to save as PDF in addition to Excel (optional).

bPrePDF: CODEBLOCK - Codeblock to execute before PDF export (optional).

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToExcel( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, , .T., "browse_data.pdf" ) // Exports to Excel with grouping, progress display, and PDF export.
content_copy
download
Use code with caution.
Harbour

175. ToXlsx( cFileXls, aCols )

Description: Exports browse data to an XLSX (Excel 2007+) file.

Parameters:

cFileXls: CHARACTER - Path to save the XLSX file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in XLSX (optional).

Return Value: None

Usage Example:

oBrw:ToXlsx( "browse_data.xlsx" ) // Exports data to XLSX file.
content_copy
download
Use code with caution.
Harbour

176. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Exports browse data to a LibreOffice Calc spreadsheet file.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Calc (optional).

nPasteMode: NUMERIC - Paste mode for Calc (optional).

aSaveAs: ARRAY - Array for save-as options (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Calc (optional).

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToCalc( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, 2 ) // Exports to Calc with grouping and paste mode 2.
content_copy
download
Use code with caution.
Harbour

177. ToDbf( cFile, bProgress, aCols, lPrompt )

Description: Exports browse data to a DBF (dBase) file.

Parameters:

cFile: CHARACTER - Path to save the DBF file.

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in DBF (optional).

lPrompt: LOGICAL - .T. to prompt user for file overwrite confirmation, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToDbf( "browse_data.dbf", , , .T. ) // Exports to DBF with overwrite prompt enabled.
content_copy
download
Use code with caution.
Harbour

178. ToArray( aCols )

Description: Exports browse data to a two-dimensional array.

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in array (optional).

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example:

myDataArray := oBrw:ToArray() // Exports all visible columns to an array.
content_copy
download
Use code with caution.
Harbour

179. CurrentRow()

Description: Returns a TXBrwRow object representing the data of the currently selected row.

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example:

oCurrentRow := oBrw:CurrentRow() // Gets a TXBrwRow object for the current row.
content_copy
download
Use code with caution.
Harbour

180. AddBitmap( uBmp, aResize )

Description: Adds a bitmap to the browse control's bitmap collection for use in columns or other visual elements.

Parameters:

uBmp: CHARACTER or NUMERIC - Path to bitmap file or bitmap handle.

aResize: - Resize parameters (optional).

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example:

nBitmapIndex := oBrw:AddBitmap( "mybitmap.bmp" ) // Adds a bitmap to the browse's bitmap collection.
content_copy
download
Use code with caution.
Harbour

181. aBitmap( n )

Description: Accessor method to retrieve a bitmap from the browse control's bitmap collection by its index.

Parameters:

n: NUMERIC - Index of the bitmap in the aBitmaps array.

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example:

hBitmap := oBrw:aBitmap( nBitmapIndex ) // Retrieves a bitmap by its index.
content_copy
download
Use code with caution.
Harbour

182. Initiate( hDlg )

Description: Initializes the browse control (internal method).

Parameters:

hDlg: - Handle to the dialog window (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

183. Display()

Description: Displays the browse control (internal method).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only)

184. Paint()

Description: Paints the browse control's content (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called by the windowing system during redraw)

185. DrawBorder()

Description: Draws the border around the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting)

186. CheckSortCbx()

Description: Checks and updates the sort checkbox control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

187. GetPaintCols( nLast )

Description: Retrieves an array of columns to be painted, optimized for performance (internal method).

Parameters:

nLast: NUMERIC - Last displayed column index.

Return Value: ARRAY - Array of TxBrwColumn objects to paint.

Usage Example: (Internal use only)

188. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Paints a horizontal divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nRow: NUMERIC - Row position.

nLeft: NUMERIC - Left position.

nRight: NUMERIC - Right position.

nStyle: NUMERIC - Line style.

hRowPen: OBJECT - Pen handle for row lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

189. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Paints a vertical divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nCol: NUMERIC - Column position.

nTop: NUMERIC - Top position.

nBottom: NUMERIC - Bottom position.

nStyle: NUMERIC - Line style.

hColPen: OBJECT - Pen handle for column lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

190. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Paints the header area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

hColPen: OBJECT - Pen handle for column lines.

Return Value: None

Usage Example: (Internal use only)

191. PaintTopBar( hDC, hGrayPen )

Description: Paints the top bar area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

192. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Paints the footer area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

nGridWidth: NUMERIC - Grid width.

nBrwHeight: NUMERIC - Browse height.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

193. Refresh( lComplete )

Description: Refreshes the browse control, redrawing its content.

Parameters:

lComplete: LOGICAL - .T. for a full refresh, .F. for partial refresh (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Refresh() // Performs a full refresh.
oBrw:Refresh( .F. ) // Performs a partial refresh.
content_copy
download
Use code with caution.
Harbour

194. CalcRowSelPos()

Description: Calculates the position of the selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

195. DelRepos()

Description: Repositions browse after record deletion (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

196. KeyCount()

Description: Returns the total number of rows in the data source.

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

nRowCount := oBrw:KeyCount()
content_copy
download
Use code with caution.
Harbour

197. BookMark( uGoTo )

Description: Sets or gets the bookmark position (record number).

Parameters:

uGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmarkValue := oBrw:BookMark() // Gets current bookmark value.
oBrw:BookMark( 15 ) // Sets bookmark to record number 15.
content_copy
download
Use code with caution.
Harbour

198. KeyNo( nKeyGoTo )

Description: Sets or gets the key number (vertical scroll position).

Parameters:

nKeyGoTo: NUMERIC - Key number to set (optional).

Return Value: NUMERIC - Returns the current key number.

Usage Example:

nKeyNumber := oBrw:KeyNo() // Gets current key number.
oBrw:KeyNo( 50 ) // Sets key number to 50.
content_copy
download
Use code with caution.
Harbour

199. Skip( n )

Description: Skips rows forward or backward.

Parameters:

n: NUMERIC - Number of rows to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Number of rows actually skipped.

Usage Example:

nSkippedRows := oBrw:Skip( 5 ) // Skips 5 rows forward.
content_copy
download
Use code with caution.
Harbour

200. Bof()

Description: Checks if the browse is at the Beginning Of File (BOF).

Parameters: None

Return Value: LOGICAL - .T. if BOF, .F. otherwise.

Usage Example:

if oBrw:Bof()
    MsgInfo( "At the beginning of the data." )
endif
content_copy
download
Use code with caution.
Harbour

201. Eof()

Description: Checks if the browse is at the End Of File (EOF).

Parameters: None

Return Value: LOGICAL - .T. if EOF, .F. otherwise.

Usage Example:

if oBrw:Eof()
    MsgInfo( "At the end of the data." )
endif
content_copy
download
Use code with caution.
Harbour

202. GoTop()

Description: Moves the browse cursor to the first row (Top of File - TOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to the first row.
content_copy
download
Use code with caution.
Harbour

203. GoBottom()

Description: Moves the browse cursor to the last row (Bottom of File - BOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to the last row.
content_copy
download
Use code with caution.
Harbour

204. GoUp( nUp )

Description: Moves the browse cursor up by a specified number of rows.

Parameters:

nUp: NUMERIC - Number of rows to move up (default is 1).

Return Value: None

Usage Example:

oBrw:GoUp() // Moves up one row.
oBrw:GoUp( 3 ) // Moves up three rows.
content_copy
download
Use code with caution.
Harbour

205. GoDown( nDown, nKey )

Description: Moves the browse cursor down by a specified number of rows.

Parameters:

nDown: NUMERIC - Number of rows to move down (default is 1).

nKey: NUMERIC - Key code (optional, used internally).

Return Value: None

Usage Example:

oBrw:GoDown() // Moves down one row.
oBrw:GoDown( 5 ) // Moves down five rows.
content_copy
download
Use code with caution.
Harbour

206. PageUp( nLines )

Description: Moves the browse cursor up by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page up (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageUp() // Pages up one page of data.
content_copy
download
Use code with caution.
Harbour

207. PageDown( nLines )

Description: Moves the browse cursor down by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page down (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageDown() // Pages down one page of data.
content_copy
download
Use code with caution.
Harbour

208. GoLeft()

Description: Moves the browse cursor one column to the left.

Parameters:

lOffset: NUMERIC - Offset to move left (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoLeft() // Moves one column to the left.
content_copy
download
Use code with caution.
Harbour

209. GoRight()

Description: Moves the browse cursor one column to the right.

Parameters:

lOffset: NUMERIC - Offset to move right (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoRight() // Moves one column to the right.
content_copy
download
Use code with caution.
Harbour

210. GoLeftMost()

Description: Moves the browse cursor to the leftmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoLeftMost() // Moves to the first visible column.
content_copy
download
Use code with caution.
Harbour

211. GoRightMost()

Description: Moves the browse cursor to the rightmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoRightMost() // Moves to the last visible column.
content_copy
download
Use code with caution.
Harbour

212. GoFirstEditCol()

Description: Moves the browse cursor to the first editable column in the current row.

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example:

oEditColumn := oBrw:GoFirstEditCol() // Moves cursor to the first editable column.
content_copy
download
Use code with caution.
Harbour

213. HandleEvent( nMsg, nWParam, nLParam )

Description: Handles window messages (internal method, event dispatcher).

Parameters:

nMsg: NUMERIC - Windows message code.

nWParam: NUMERIC - WPARAM parameter of the message.

nLParam: NUMERIC - LPARAM parameter of the message.

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - handles Windows messages)

214. HandleGesture( nGesture, nLParam )

Description: Handles gesture events (internal method, for kinetic scrolling and touch gestures).

Parameters:

nGesture: NUMERIC - Gesture ID.

nLParam: NUMERIC - LPARAM parameter of the gesture event.

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - handles touch and kinetic scrolling)

215. GesturePan( aPanInfo )

Description: Handles pan gestures (used for kinetic scrolling, internal method).

Parameters:

aPanInfo: ARRAY - Array containing pan gesture information.

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - handles kinetic scrolling gestures)

216. KeyCount()

Description: Returns the number of records (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

rowCount := oBrw:KeyCount() // Gets row count using codeblock.
content_copy
download
Use code with caution.
Harbour

217. BookMark()

Description: Accessor for Bookmark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example:

bookmarkValue := oBrw:BookMark() // Gets bookmark value using codeblock.
content_copy
download
Use code with caution.
Harbour

218. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the key number.

Usage Example:

keyNumber := oBrw:KeyNo() // Gets key number using codeblock.
content_copy
download
Use code with caution.
Harbour

219. Skip()

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: - Returns the number of rows skipped.

Usage Example:

rowsSkipped := oBrw:Skip( 2 ) // Skips rows using codeblock.
content_copy
download
Use code with caution.
Harbour

220. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example:

isBOF := oBrw:Bof() // Checks BOF using codeblock.
content_copy
download
Use code with caution.
Harbour

221. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example:

isEOF := oBrw:Eof() // Checks EOF using codeblock.
content_copy
download
Use code with caution.
Harbour

222. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to top using codeblock.
content_copy
download
Use code with caution.
Harbour

223. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to bottom using codeblock.
content_copy
download
Use code with caution.
Harbour

224. GoFltRow( n )

Description: Accessor for GoFltRow (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Filter row index.

Return Value: NUMERIC - Returns the filter row index.

Usage Example: (Internal use only - method version for codeblock usage)

225. SaveState( aAdditionalData )

Description: Accessor for SaveState (same as DATA member, method version for codeblock usage).

Parameters:

aAdditionalData: ARRAY - Additional data array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

226. RestoreState( cState )

Description: Accessor for RestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

227. OldRestoreState( cState )

Description: Accessor for OldRestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

228. Lock()

Description: Accessor for Lock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

isLocked := oBrw:Lock() // Locks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

229. UnLock()

Description: Accessor for UnLock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock() // Unlocks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

230. SaveData( lRefresh )

Description: Accessor for SaveData (same as DATA member, method version for codeblock usage).

Parameters:

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

isSaved := oBrw:SaveData( .T. ) // Saves data using codeblock.
content_copy
download
Use code with caution.
Harbour

231. ShowSeek()

Description: Accessor for ShowSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows seek input using codeblock.
content_copy
download
Use code with caution.
Harbour

232. Seek( cSeek )

Description: Accessor for Seek (same as DATA member, method version for codeblock usage).

Parameters:

cSeek: CHARACTER - Seek string.

Return Value: LOGICAL - Returns .T. if seek is successful, .F. otherwise.

Usage Example:

isFound := oBrw:Seek( "Search String" ) // Performs seek using codeblock.
content_copy
download
Use code with caution.
Harbour

233. Adjust()

Description: Accessor for Adjust (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Adjusts layout using codeblock.
content_copy
download
Use code with caution.
Harbour

234. Check_oSeek()

Description: Accessor for Check_oSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

235. SetSortBmp()

Description: Accessor for SetSortBmp (same as DATA member, method version for codeblock usage).

Parameters:

aBmp: ARRAY - Bitmap array.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

236. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Accessor for AutoFit (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AutoFit)

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example: (Internal use only - method version for codeblock usage)

237. CheckSize()

Description: Accessor for CheckSize (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

238. Resize( nSizeType, nWidth, nHeight )

Description: Accessor for Resize (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Resize)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

239. Change( lRow )

Description: Accessor for Change (same as DATA member, method version for codeblock usage).

Parameters:

lRow: LOGICAL - Row flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)
]]>

Code: Select all | Expand

95. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup ) (Continued)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

96. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message box before deletion, .F. for silent deletion.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes the current record with a confirmation prompt.
oBrw:Delete( .F. ) // Deletes the current record without confirmation.
content_copy
download
Use code with caution.
Harbour

97. SetOrderNatural()

Description: Resets the sorting order of the browse to its natural (unsorted) order.

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural() // Removes any sorting applied to the browse.
content_copy
download
Use code with caution.
Harbour

98. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes for the first column of the browse, typically used for selecting rows.

Parameters:

aBmp: ARRAY - Optional array containing bitmap handles for the checkbox states (checked, unchecked, null). If not provided, default bitmaps are used.

lEdit: LOGICAL - .T. to allow users to edit the checkbox state directly in the browse, .F. for read-only checkboxes.

aPrompt: CHARACTER - Optional prompt text associated with the checkboxes.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Adds editable checkboxes to the first column.
oBrw:SetChecks( { hBmpChecked, hBmpUnchecked }, .F., "Select Rows" ) // Adds read-only checkboxes with custom bitmaps and prompt.
content_copy
download
Use code with caution.
Harbour

99. SetMultiSelectCol( uCol, lFooter )

Description: Designates a specific column to function as a multi-select column, enabling row selection using checkboxes in that column.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to designate as the multi-select column.

lFooter: LOGICAL - .T. to display the count of selected rows in the footer, .F. to hide the count.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column the multi-select column, displaying selected count in the footer.
oBrw:SetMultiSelectCol( oBrw:oCol( "MyColumn" ), .F. ) // Makes "MyColumn" the multi-select column, hiding footer count.
content_copy
download
Use code with caution.
Harbour

100. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Provides a safe way to evaluate a codeblock, trapping potential runtime errors and returning a default value if an error occurs. This is useful for preventing browse errors from crashing the application.

Parameters:

RetVal_ifFailed: - The value to be returned if the evaluation of bBlock results in an error.

bBlock: CODEBLOCK - The codeblock to be evaluated.

params_for_bBlock: - Optional parameters to be passed to the codeblock during evaluation.

Return Value: - The result of the codeblock evaluation if successful, or RetVal_ifFailed if an error occurs.

Usage Example: (Primarily for internal use, but can be used in custom codeblocks within TXBrowse)

nValue := oBrw:SafeEval( 0, { || Val( oBrw:ArrCell( 1, 1 ) ) } ) // Safely evaluates Val() on a cell, returns 0 if Val() fails.
content_copy
download
Use code with caution.
Harbour

101. AddVar( uKey, uVal )

Description: Allows adding custom variables to the hCargo hash table associated with the TXBrowse object. This provides a mechanism to store and retrieve custom data related to the browse.

Parameters:

uKey: - The key (identifier) for the variable within the hCargo hash table.

uVal: - The value to be stored for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "UserPreference", "Dark Mode" ) // Stores a user preference setting in hCargo.
customSetting := oBrw:hCargo[ "UserPreference" ] // Retrieves the custom setting.
content_copy
download
Use code with caution.
Harbour

102. lPasteReady()

Description: Checks if the data currently in the clipboard is in a format suitable for pasting into the TXBrowse control.

Parameters: None

Return Value: LOGICAL - Returns .T. if the clipboard data is paste-ready, .F. otherwise.

Usage Example: (Primarily used internally to determine if pasting functionality should be enabled)

103. OnError()

Description: Default error handler method for the TXBrowse class. This method is called when an error occurs within the browse control.

Parameters: None

Return Value: None

Usage Example: (Primarily for internal use; you can override this method to implement custom error handling)

104. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Used internally to set properties of a specific column at a given row and column position, likely during column resizing or layout adjustments.

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

105. GoNextCtrl( hWnd )

Description: Moves the input focus to the next control within the same window as the TXBrowse control. This is often used for navigation between controls in a form or dialog.

Parameters:

hWnd: - Handle of the current control that has focus.

Return Value: None

Usage Example: (Used internally for control navigation)

106. GoPrevCtrl()

Description: Moves the input focus to the previous control in the window. This is a VIRTUAL method, meaning it's designed to be overridden in derived classes to customize the behavior of moving to the previous control.

Parameters: None

Return Value: None

Usage Example: (Virtual method, override in derived classes for custom behavior)

107. SelFont()

Description: Selects and retrieves the currently active font for the TXBrowse control.

Parameters: None

Return Value: None

Usage Example: (Internal use only, likely related to font handling within the control)

108. SetFont( oFont, lResizeCols )

Description: Sets the font to be used for displaying data within the TXBrowse control.

Parameters:

oFont: OBJECT - The TFont object representing the font to be applied.

lResizeCols: LOGICAL - .T. to automatically adjust column widths to fit the new font, .F. to keep column widths unchanged.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFont, .T. ) // Applies 'myFont' and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

109. FontSize( nPlus )

Description: Dynamically adjusts the font size of the browse control, either increasing or decreasing it.

Parameters:

nPlus: NUMERIC - A positive value to increase the font size, or a negative value to decrease it.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 1 ) // Increases the font size by 1 point.
oBrw:FontSize( -2 ) // Decreases the font size by 2 points.
content_copy
download
Use code with caution.
Harbour

110. ReCalcWH()

Description: Recalculates the widths and heights of various elements within the TXBrowse control, such as headers, footers, and rows, based on the current font and other style settings. This is typically called internally after changes that might affect layout.

Parameters: None

Return Value: None

Usage Example: (Internal use only, called automatically when layout changes occur)

111. DrawSelect()

Description: Draws the visual indicator for the currently selected row (the record selector).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting to visually highlight the selected row)

112. RefreshCurrent()

Description: Refreshes the display of the currently selected row in the browse control. This is useful to update the display after data changes.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshCurrent() // Updates the display of the current row.
content_copy
download
Use code with caution.
Harbour

113. aRow()

Description: Accessor method to retrieve the data for the currently selected row when using an array as the data source.

Parameters: None

Return Value: - Returns the data for the current row as an array element.

Usage Example:

currentRowData := oBrw:aRow // Retrieves data of the current row in array browse.
content_copy
download
Use code with caution.
Harbour

114. oCol( u )

Description: Retrieves a TxBrwColumn object associated with the TXBrowse control.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or a direct reference to a TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object if found, otherwise returns NIL.

Usage Example:

oFirstColumn := oBrw:oCol( 1 ) // Retrieves the TxBrwColumn object for the first column.
content_copy
download
Use code with caution.
Harbour

115. RefreshHeaders()

Description: Refreshes the visual display of the header area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshHeaders() // Redraws the header area to reflect changes.
content_copy
download
Use code with caution.
Harbour

116. RefreshFooters()

Description: Refreshes the visual display of the footer area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshFooters() // Redraws the footer area to reflect changes, like updated totals.
content_copy
download
Use code with caution.
Harbour

117. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies the data of a row to the clipboard, formatting it as text.

Parameters:

lFullRow: LOGICAL - .T. to copy all columns of the row, .F. to copy only specified columns.

aCols: ARRAY - (Optional) Array of column indices to copy if lFullRow is .F..

lFormatted: LOGICAL - .T. to format the text output for better compatibility with MS Word, .F. for plain text.

Return Value: CHARACTER - Returns a character string containing the formatted row data for the clipboard.

Usage Example:

clipboardText := oBrw:ClpRow( .T. ) // Copies the entire current row to the clipboard as formatted text.
content_copy
download
Use code with caution.
Harbour

118. Copy( laRows, aCols )

Description: Copies one or more rows from the browse to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - Specifies which rows to copy:

.T. : Copy all rows in the browse.

.F. : Copy only the currently selected row.

ARRAY : Copy rows at the specified indices in the array.

aCols: ARRAY - (Optional) Array of column indices to copy for the specified rows.

Return Value: None

Usage Example:

oBrw:Copy( .F. ) // Copies the currently selected row.
oBrw:Copy( .T., { 1, 3, 5 } ) // Copies all rows but only columns 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

119. Paste( cText )

Description: Pastes data from the clipboard into the browse control, starting at the currently selected cell.

Parameters:

cText: CHARACTER - (Optional) Text string to paste. If omitted, the method reads data from the clipboard.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes clipboard data into the browse.
oBrw:Paste( "Data to paste" ) // Pastes the provided text directly.
content_copy
download
Use code with caution.
Harbour

120. aCellCoor( nRow, nCol )

Description: Retrieves the screen coordinates (top, left, bottom, right) of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: ARRAY - Returns an array containing the coordinates: { nTop, nLeft, nBottom, nRight } in pixels.

Usage Example:

cellCoords := oBrw:aCellCoor( 5, 2 ) // Gets coordinates of the cell at row 5, column 2.
content_copy
download
Use code with caution.
Harbour

121. CellBitmap( nRow, nCol )

Description: Creates a bitmap image of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: OBJECT - Returns a bitmap handle (HBITMAP) of the cell's content.

Usage Example:

hCellBitmap := oBrw:CellBitmap( 1, 1 ) // Creates a bitmap of the cell at row 1, column 1.
content_copy
download
Use code with caution.
Harbour

122. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message overlay within the TXBrowse control. This is a method version of the ShowMessage DATA member, allowing for codeblock parameters.

Parameters: (Same as for the ShowMessage DATA member)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading data..." }, 0 ) // Displays a message using a codeblock for the message text.
content_copy
download
Use code with caution.
Harbour

123. CloseMessage()

Description: Closes any message box currently displayed by ShowMessage.

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage() // Closes the message box.
content_copy
download
Use code with caution.
Harbour

124. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position within the browse. This is a method version of the SetPos DATA member, allowing for a codeblock to be executed after repositioning.

Parameters: (Same as for the SetPos DATA member)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 2, .F., { || MsgInfo( "Cursor moved" ) } ) // Repositions the cursor and executes a codeblock.
content_copy
download
Use code with caution.
Harbour

125. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control. This is a method version of the SetBackGround DATA member, allowing for codeblock parameters.

Parameters: (Same as for the SetBackGround DATA member)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( { || CLR_BLUE }, 2 ) // Sets background using a codeblock for the color and gradient mode.
content_copy
download
Use code with caution.
Harbour

126. MakeBrush()

Description: Creates a brush object for painting the browse background. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only, method version for codeblock use)

127. DataRect()

Description: Returns a TRect object representing the data display area of the browse. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

128. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment. Method version for use within codeblocks.

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

129. ColStretch( nStretchCol )

Description: Stretches a column to fill available space. Method version for use within codeblocks.

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

130. DestroyToolTip()

Description: Destroys the tooltip control. Method version for use within codeblocks.

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

131. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message. Method version for use within codeblocks.

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

132. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave event. Method version for use within codeblocks.

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

133. uDataSource()

Description: Accessor for DataSource. Method version for use within codeblocks.

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

134. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow. Method version for use within codeblocks.

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

135. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source. Method version for use within codeblocks.

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

136. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits Browse. Method version for use within codeblocks.

Parameters: (Same as DATA member EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

137. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: Edits data (general edit method). Method version for use within codeblocks.

Parameters: (Same as DATA member Edit)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

138. Delete( lMsg )

Description: Deletes a record. Method version for use within codeblocks.

Parameters: (Same as DATA member Delete)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

139. GoFltRow( n )

Description: Navigates to a specific row within a filtered browse based on its filter row index.

Parameters:

n: NUMERIC - The filter row index to navigate to (1-based).

Return Value: LOGICAL - Returns .T. if navigation was successful, .F. otherwise.

Usage Example:

oBrw:GoFltRow( 3 ) // Moves the browse cursor to the 3rd row in the filtered dataset.
content_copy
download
Use code with caution.
Harbour

140. GoFltRow( n ) (Second Definition)

Description: Retrieves the filter row index if no parameters are passed.

Parameters:

n: NUMERIC - (Optional) If NIL it returns the current filter row index, otherwise it sets the filter row index.

Return Value: NUMERIC - Returns the current filter row index.

Usage Example:

nCurrentFilterRow := oBrw:GoFltRow() // Gets the current filter row index.
content_copy
download
Use code with caution.
Harbour

141. SaveState( aAdditionalData )

Description: Saves the current state of the browse control, allowing for later restoration.

Parameters:

aAdditionalData: ARRAY - (Optional) Array for saving additional custom data with the browse state.

Return Value: None

Usage Example:

oBrw:SaveState() // Saves the current browse state.
oBrw:SaveState( { "CustomData1", "CustomData2" } ) // Saves state with additional data.
content_copy
download
Use code with caution.
Harbour

142. RestoreState( cState )

Description: Restores the browse control to a previously saved state, using a state string obtained from SaveState().

Parameters:

cState: CHARACTER - State string obtained from SaveState().

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:RestoreState( savedStateString ) // Restores browse state from the saved string.
content_copy
download
Use code with caution.
Harbour

143. OldRestoreState( cState )

Description: Retained for compatibility with older versions (10.8) of the TXBrowse class. Restores browse state from a state string.

Parameters:

cState: CHARACTER - State string in the older format.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (For backward compatibility with older saved states)

144. Lock()

Description: Locks the browse control, preventing data modifications.

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

lLocked := oBrw:Lock()
content_copy
download
Use code with caution.
Harbour

145. UnLock()

Description: Unlocks the browse control, allowing data modifications.

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock()
content_copy
download
Use code with caution.
Harbour

146. SaveData( lRefresh )

Description: Saves any pending data changes to the underlying data source.

Parameters:

lRefresh: LOGICAL - .T. to refresh the browse after saving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

lSaved := oBrw:SaveData( .T. ) // Saves data changes and refreshes the browse.
content_copy
download
Use code with caution.
Harbour

147. ShowSeek()

Description: Shows or hides the incremental seek input control (TGet object).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows the incremental seek input control.
content_copy
download
Use code with caution.
Harbour

148. Seek( cSeek )

Description: Performs an incremental seek operation based on the provided search string.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:Seek( "customer name" ) // Performs incremental seek for "customer name".
content_copy
download
Use code with caution.
Harbour

149. RddIncrSeek( cExpr, uSeek )

Description: Performs incremental seek on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for each record during the seek.

uSeek: - Search string to match against the expression result.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example: (Advanced usage for custom incremental seek logic)

150. RddIncrFilter( cExpr, uSeek )

Description: Performs incremental filtering on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for filtering.

uSeek: - Search string for filtering criteria.

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example: (Advanced usage for custom incremental filtering logic)

151. ArrayIncrSeek( cSeek, nGoTo )

Description: Performs incremental seek on an array data source.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

nGoTo: NUMERIC - Row index to go to if a match is found (optional).

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:ArrayIncrSeek( "item description" ) // Incremental seek in array data.
content_copy
download
Use code with caution.
Harbour

152. ArrayIncrFilter( cSeek, nGoTo )

Description: Performs incremental filtering on an array data source.

Parameters:

cSeek: CHARACTER - String to filter by.

nGoTo: NUMERIC - Row index to navigate to after filtering (optional).

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example:

oBrw:ArrayIncrFilter( "status: pending" ) // Incremental filter on array data.
content_copy
download
Use code with caution.
Harbour

153. AdoIncrSeek( uSeek )

Description: Performs incremental seek on an ADO recordset data source.

Parameters:

uSeek: - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:AdoIncrSeek( "product name" ) // Incremental seek in ADO recordset.
content_copy
download
Use code with caution.
Harbour

154. Select( nOperation )

Description: Selects or deselects rows in multi-select mode based on different operations.

Parameters:

nOperation: NUMERIC - Operation code:

0: Deselect all rows.

1: Add current row to selection.

2: Swap current row selection (toggle).

3: Select a range of rows (Shift+click).

4: Select all rows.

Return Value: None

Usage Example:

oBrw:Select( 1 ) // Adds the current row to the selection.
oBrw:Select( 0 ) // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

155. SelectAll()

Description: Selects all rows in the browse control (shortcut for Select(4)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectAll() // Selects all rows in the browse.
content_copy
download
Use code with caution.
Harbour

156. SelectNone()

Description: Deselects all rows in the browse control (shortcut for Select(0)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectNone() // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

157. IsSelectedRow()

Description: Checks if the current row is selected in multi-select mode.

Parameters: None

Return Value: LOGICAL - .T. if the current row is selected, .F. otherwise.

Usage Example:

if oBrw:IsSelectedRow()
    MsgInfo( "Current row is selected." )
endif
content_copy
download
Use code with caution.
Harbour

158. SelectRow( nOperation )

Description: Selects or deselects the current row in multi-select mode (internal method, likely used by Select).

Parameters:

nOperation: NUMERIC - Operation code (similar to Select, but specifically for the current row).

Return Value: None

Usage Example: (Internal use only)

159. Adjust()

Description: Adjusts the layout and appearance of the browse control, recalculating heights, widths, and other visual elements based on current settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Recalculates and adjusts browse layout.
content_copy
download
Use code with caution.
Harbour

160. Check_oSeek()

Description: Checks and handles the oSeek object (incremental seek input) (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

161. SetSortBmp()

Description: Sets the bitmaps used for sort indicators in column headers (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

162. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Automatically adjusts column widths to fit their content.

Parameters:

aColsToFit: ARRAY - Array of column indices or TxBrwColumn objects to auto-fit. If NIL, auto-fits all columns.

nRows: NUMERIC - Number of rows to consider when calculating column widths. If NIL, considers all rows.

lDataOnly: LOGICAL - .T. to consider only data rows for width calculation, .F. to include header and footer.

nMaxWidth: NUMERIC - Maximum width for columns (optional).

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example:

oBrw:AutoFit() // Auto-fits all columns to their content.
oBrw:AutoFit( { 1, 3 } ) // Auto-fits columns 1 and 3.
oBrw:AutoFit( , 100 ) // Auto-fits columns considering only the first 100 rows.
content_copy
download
Use code with caution.
Harbour

163. CheckSize()

Description: Checks and adjusts the size of the browse control based on margins and padding (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

164. Resize( nSizeType, nWidth, nHeight )

Description: Resizes the browse control to the specified dimensions or using predefined size types.

Parameters:

nSizeType: NUMERIC - Size type code (e.g., SIZE_PIXEL, SIZE_CLIENT, SIZE_WINDOW).

nWidth: NUMERIC - New width in pixels (if nSizeType is SIZE_PIXEL).

nHeight: NUMERIC - New height in pixels (if nSizeType is SIZE_PIXEL).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Resize( SIZE_PIXEL, 800, 600 ) // Resizes browse to 800x600 pixels.
oBrw:Resize( SIZE_CLIENT ) // Resizes browse to fill client area of parent window.
content_copy
download
Use code with caution.
Harbour

165. Change( lRow )

Description: Handles the change event, triggered when the selected row changes or a column is modified.

Parameters:

lRow: LOGICAL - .T. if the change is due to row selection, .F. if due to column change.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use, called automatically when row or column selection changes)

166. MakeTotals( aCols )

Description: Calculates totals for specified columns and prepares them for display in the footer (internal method).

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to calculate totals for.

Return Value: None

Usage Example: (Internal use only)

167. SaveTotals( lBlank )

Description: Saves the calculated totals (internal method).

Parameters:

lBlank: LOGICAL - .T. to blank out existing totals before saving, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

168. ReCalcTotals( lReduce )

Description: Recalculates totals based on changes in data or filtering (internal method).

Parameters:

lReduce: LOGICAL - .T. to reduce totals based on filtered data, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

169. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: General-purpose evaluation method for codeblocks, allowing iteration over browse rows with conditions and limits.

Parameters:

bBlock: CODEBLOCK - Codeblock to be evaluated for each row.

bFor: CODEBLOCK - Codeblock to be evaluated before each row (condition for row processing).

bWhile: CODEBLOCK - Codeblock for loop continuation condition.

nNext: NUMERIC - Number of rows to process (optional).

nRec: NUMERIC - Starting record number (optional).

lRest: LOGICAL - .T. to process from current record to end, .F. otherwise (optional).

Return Value: None

Usage Example:

oBrw:Eval( { |o| MsgInfo( o:Column1 ) }, , { || oBrw:Eof() } ) // Iterates through all rows and displays "Column1" value in each row.
content_copy
download
Use code with caution.
Harbour

170. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Generates a report from the browse data, allowing for preview, printing, and exporting to PDF.

Parameters:

cTitle: CHARACTER - Title for the report.

lPreview: LOGICAL - .T. to show print preview dialog, .F. for direct printing.

lModal: LOGICAL - .T. to show print preview dialog as modal, .F. as modeless.

bSetUp: CODEBLOCK - Codeblock to customize report setup (optional).

aGroupBy: ARRAY - Array of column indices or TxBrwColumn objects to group data by (optional).

cPDF: CHARACTER - Path to save the report as PDF (optional, if provided, exports to PDF directly).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the report (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Report( "Customer Report", .T., .T., , { 2 }, "customer_report.pdf" ) // Generates a previewable PDF report grouped by the 2nd column.
content_copy
download
Use code with caution.
Harbour

171. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Exports browse data to a Microsoft Word document.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the Word document (optional).

nWrdTblFormat: NUMERIC - Word table format code (optional).

nPageOrientation: NUMERIC - Page orientation (0 for portrait, 1 for landscape, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ToWord( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, , 5 ) // Exports data to Word with progress display.
content_copy
download
Use code with caution.
Harbour

172. ToHTML( cHtml, lShow )

Description: Exports browse data to an HTML file.

Parameters:

cHtml: CHARACTER - Path to save the HTML file.

lShow: LOGICAL - .T. to open the HTML file after export, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToHTML( "browse_data.html", .T. ) // Exports data to HTML and opens the file in browser.
content_copy
download
Use code with caution.
Harbour

173. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Exports browse data to a CSV (Comma Separated Values) file.

Parameters:

cFile: CHARACTER - Path to save the CSV file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in CSV (optional).

lHeaders: LOGICAL - .T. to include column headers in CSV, .F. otherwise.

cTrue: CHARACTER - String representation for logical TRUE value in CSV (optional).

cFalse: CHARACTER - String representation for logical FALSE value in CSV (optional).

cDelim: CHARACTER - Delimiter character for CSV (optional, default is comma).

Return Value: None

Usage Example:

oBrw:ToCSV( "browse_data.csv", , .T., "Yes", "No", ";" ) // Exports to CSV with custom delimiter and logical value representations.
content_copy
download
Use code with caution.
Harbour

174. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Exports browse data to an Excel spreadsheet file (XLS or XLSX).

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Excel (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Excel (optional).

lShow: LOGICAL - .T. to open Excel after export, .F. otherwise.

cPDF: CHARACTER - Path to save as PDF in addition to Excel (optional).

bPrePDF: CODEBLOCK - Codeblock to execute before PDF export (optional).

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToExcel( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, , .T., "browse_data.pdf" ) // Exports to Excel with grouping, progress display, and PDF export.
content_copy
download
Use code with caution.
Harbour

175. ToXlsx( cFileXls, aCols )

Description: Exports browse data to an XLSX (Excel 2007+) file.

Parameters:

cFileXls: CHARACTER - Path to save the XLSX file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in XLSX (optional).

Return Value: None

Usage Example:

oBrw:ToXlsx( "browse_data.xlsx" ) // Exports data to XLSX file.
content_copy
download
Use code with caution.
Harbour

176. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Exports browse data to a LibreOffice Calc spreadsheet file.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Calc (optional).

nPasteMode: NUMERIC - Paste mode for Calc (optional).

aSaveAs: ARRAY - Array for save-as options (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Calc (optional).

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToCalc( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, 2 ) // Exports to Calc with grouping and paste mode 2.
content_copy
download
Use code with caution.
Harbour

177. ToDbf( cFile, bProgress, aCols, lPrompt )

Description: Exports browse data to a DBF (dBase) file.

Parameters:

cFile: CHARACTER - Path to save the DBF file.

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in DBF (optional).

lPrompt: LOGICAL - .T. to prompt user for file overwrite confirmation, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToDbf( "browse_data.dbf", , , .T. ) // Exports to DBF with overwrite prompt enabled.
content_copy
download
Use code with caution.
Harbour

178. ToArray( aCols )

Description: Exports browse data to a two-dimensional array.

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in array (optional).

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example:

myDataArray := oBrw:ToArray() // Exports all visible columns to an array.
content_copy
download
Use code with caution.
Harbour

179. CurrentRow()

Description: Returns a TXBrwRow object representing the data of the currently selected row.

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example:

oCurrentRow := oBrw:CurrentRow() // Gets a TXBrwRow object for the current row.
content_copy
download
Use code with caution.
Harbour

180. AddBitmap( uBmp, aResize )

Description: Adds a bitmap to the browse control's bitmap collection for use in columns or other visual elements.

Parameters:

uBmp: CHARACTER or NUMERIC - Path to bitmap file or bitmap handle.

aResize: - Resize parameters (optional).

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example:

nBitmapIndex := oBrw:AddBitmap( "mybitmap.bmp" ) // Adds a bitmap to the browse's bitmap collection.
content_copy
download
Use code with caution.
Harbour

181. aBitmap( n )

Description: Accessor method to retrieve a bitmap from the browse control's bitmap collection by its index.

Parameters:

n: NUMERIC - Index of the bitmap in the aBitmaps array.

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example:

hBitmap := oBrw:aBitmap( nBitmapIndex ) // Retrieves a bitmap by its index.
content_copy
download
Use code with caution.
Harbour

182. Initiate( hDlg )

Description: Initializes the browse control (internal method).

Parameters:

hDlg: - Handle to the dialog window (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

183. Display()

Description: Displays the browse control (internal method).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only)

184. Paint()

Description: Paints the browse control's content (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called by the windowing system during redraw)

185. DrawBorder()

Description: Draws the border around the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting)

186. CheckSortCbx()

Description: Checks and updates the sort checkbox control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

187. GetPaintCols( nLast )

Description: Retrieves an array of columns to be painted, optimized for performance (internal method).

Parameters:

nLast: NUMERIC - Last displayed column index.

Return Value: ARRAY - Array of TxBrwColumn objects to paint.

Usage Example: (Internal use only)

188. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Paints a horizontal divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nRow: NUMERIC - Row position.

nLeft: NUMERIC - Left position.

nRight: NUMERIC - Right position.

nStyle: NUMERIC - Line style.

hRowPen: OBJECT - Pen handle for row lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

189. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Paints a vertical divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nCol: NUMERIC - Column position.

nTop: NUMERIC - Top position.

nBottom: NUMERIC - Bottom position.

nStyle: NUMERIC - Line style.

hColPen: OBJECT - Pen handle for column lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

190. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Paints the header area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

hColPen: OBJECT - Pen handle for column lines.

Return Value: None

Usage Example: (Internal use only)

191. PaintTopBar( hDC, hGrayPen )

Description: Paints the top bar area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

192. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Paints the footer area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

nGridWidth: NUMERIC - Grid width.

nBrwHeight: NUMERIC - Browse height.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

193. Refresh( lComplete )

Description: Refreshes the browse control, redrawing its content.

Parameters:

lComplete: LOGICAL - .T. for a full refresh, .F. for partial refresh (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Refresh() // Performs a full refresh.
oBrw:Refresh( .F. ) // Performs a partial refresh.
content_copy
download
Use code with caution.
Harbour

194. CalcRowSelPos()

Description: Calculates the position of the selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

195. DelRepos()

Description: Repositions browse after record deletion (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

196. KeyCount()

Description: Returns the total number of rows in the data source.

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

nRowCount := oBrw:KeyCount()
content_copy
download
Use code with caution.
Harbour

197. BookMark( uGoTo )

Description: Sets or gets the bookmark position (record number).

Parameters:

uGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmarkValue := oBrw:BookMark() // Gets current bookmark value.
oBrw:BookMark( 15 ) // Sets bookmark to record number 15.
content_copy
download
Use code with caution.
Harbour

198. KeyNo( nKeyGoTo )

Description: Sets or gets the key number (vertical scroll position).

Parameters:

nKeyGoTo: NUMERIC - Key number to set (optional).

Return Value: NUMERIC - Returns the current key number.

Usage Example:

nKeyNumber := oBrw:KeyNo() // Gets current key number.
oBrw:KeyNo( 50 ) // Sets key number to 50.
content_copy
download
Use code with caution.
Harbour

199. Skip( n )

Description: Skips rows forward or backward.

Parameters:

n: NUMERIC - Number of rows to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Number of rows actually skipped.

Usage Example:

nSkippedRows := oBrw:Skip( 5 ) // Skips 5 rows forward.
content_copy
download
Use code with caution.
Harbour

200. Bof()

Description: Checks if the browse is at the Beginning Of File (BOF).

Parameters: None

Return Value: LOGICAL - .T. if BOF, .F. otherwise.

Usage Example:

if oBrw:Bof()
    MsgInfo( "At the beginning of the data." )
endif
content_copy
download
Use code with caution.
Harbour

201. Eof()

Description: Checks if the browse is at the End Of File (EOF).

Parameters: None

Return Value: LOGICAL - .T. if EOF, .F. otherwise.

Usage Example:

if oBrw:Eof()
    MsgInfo( "At the end of the data." )
endif
content_copy
download
Use code with caution.
Harbour

202. GoTop()

Description: Moves the browse cursor to the first row (Top of File - TOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to the first row.
content_copy
download
Use code with caution.
Harbour

203. GoBottom()

Description: Moves the browse cursor to the last row (Bottom of File - BOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to the last row.
content_copy
download
Use code with caution.
Harbour

204. GoUp( nUp )

Description: Moves the browse cursor up by a specified number of rows.

Parameters:

nUp: NUMERIC - Number of rows to move up (default is 1).

Return Value: None

Usage Example:

oBrw:GoUp() // Moves up one row.
oBrw:GoUp( 3 ) // Moves up three rows.
content_copy
download
Use code with caution.
Harbour

205. GoDown( nDown, nKey )

Description: Moves the browse cursor down by a specified number of rows.

Parameters:

nDown: NUMERIC - Number of rows to move down (default is 1).

nKey: NUMERIC - Key code (optional, used internally).

Return Value: None

Usage Example:

oBrw:GoDown() // Moves down one row.
oBrw:GoDown( 5 ) // Moves down five rows.
content_copy
download
Use code with caution.
Harbour

206. PageUp( nLines )

Description: Moves the browse cursor up by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page up (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageUp() // Pages up one page of data.
content_copy
download
Use code with caution.
Harbour

207. PageDown( nLines )

Description: Moves the browse cursor down by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page down (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageDown() // Pages down one page of data.
content_copy
download
Use code with caution.
Harbour

208. GoLeft()

Description: Moves the browse cursor one column to the left.

Parameters:

lOffset: NUMERIC - Offset to move left (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoLeft() // Moves one column to the left.
content_copy
download
Use code with caution.
Harbour

209. GoRight()

Description: Moves the browse cursor one column to the right.

Parameters:

lOffset: NUMERIC - Offset to move right (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoRight() // Moves one column to the right.
content_copy
download
Use code with caution.
Harbour

210. GoLeftMost()

Description: Moves the browse cursor to the leftmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoLeftMost() // Moves to the first visible column.
content_copy
download
Use code with caution.
Harbour

211. GoRightMost()

Description: Moves the browse cursor to the rightmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoRightMost() // Moves to the last visible column.
content_copy
download
Use code with caution.
Harbour

212. GoFirstEditCol()

Description: Moves the browse cursor to the first editable column in the current row.

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example:

oEditColumn := oBrw:GoFirstEditCol() // Moves cursor to the first editable column.
content_copy
download
Use code with caution.
Harbour

213. HandleEvent( nMsg, nWParam, nLParam )

Description: Handles window messages (internal method, event dispatcher).

Parameters:

nMsg: NUMERIC - Windows message code.

nWParam: NUMERIC - WPARAM parameter of the message.

nLParam: NUMERIC - LPARAM parameter of the message.

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - handles Windows messages)

214. HandleGesture( nGesture, nLParam )

Description: Handles gesture events (internal method, for kinetic scrolling and touch gestures).

Parameters:

nGesture: NUMERIC - Gesture ID.

nLParam: NUMERIC - LPARAM parameter of the gesture event.

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - handles touch and kinetic scrolling)

215. GesturePan( aPanInfo )

Description: Handles pan gestures (used for kinetic scrolling, internal method).

Parameters:

aPanInfo: ARRAY - Array containing pan gesture information.

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - handles kinetic scrolling gestures)

216. KeyCount()

Description: Returns the number of records (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

rowCount := oBrw:KeyCount() // Gets row count using codeblock.
content_copy
download
Use code with caution.
Harbour

217. BookMark()

Description: Accessor for Bookmark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example:

bookmarkValue := oBrw:BookMark() // Gets bookmark value using codeblock.
content_copy
download
Use code with caution.
Harbour

218. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the key number.

Usage Example:

keyNumber := oBrw:KeyNo() // Gets key number using codeblock.
content_copy
download
Use code with caution.
Harbour

219. Skip()

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: - Returns the number of rows skipped.

Usage Example:

rowsSkipped := oBrw:Skip( 2 ) // Skips rows using codeblock.
content_copy
download
Use code with caution.
Harbour

220. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example:

isBOF := oBrw:Bof() // Checks BOF using codeblock.
content_copy
download
Use code with caution.
Harbour

221. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example:

isEOF := oBrw:Eof() // Checks EOF using codeblock.
content_copy
download
Use code with caution.
Harbour

222. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to top using codeblock.
content_copy
download
Use code with caution.
Harbour

223. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to bottom using codeblock.
content_copy
download
Use code with caution.
Harbour

224. GoFltRow( n )

Description: Accessor for GoFltRow (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Filter row index.

Return Value: NUMERIC - Returns the filter row index.

Usage Example: (Internal use only - method version for codeblock usage)

225. SaveState( aAdditionalData )

Description: Accessor for SaveState (same as DATA member, method version for codeblock usage).

Parameters:

aAdditionalData: ARRAY - Additional data array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

226. RestoreState( cState )

Description: Accessor for RestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

227. OldRestoreState( cState )

Description: Accessor for OldRestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

228. Lock()

Description: Accessor for Lock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

isLocked := oBrw:Lock() // Locks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

229. UnLock()

Description: Accessor for UnLock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock() // Unlocks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

230. SaveData( lRefresh )

Description: Accessor for SaveData (same as DATA member, method version for codeblock usage).

Parameters:

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

isSaved := oBrw:SaveData( .T. ) // Saves data using codeblock.
content_copy
download
Use code with caution.
Harbour

231. ShowSeek()

Description: Accessor for ShowSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows seek input using codeblock.
content_copy
download
Use code with caution.
Harbour

232. Seek( cSeek )

Description: Accessor for Seek (same as DATA member, method version for codeblock usage).

Parameters:

cSeek: CHARACTER - Seek string.

Return Value: LOGICAL - Returns .T. if seek is successful, .F. otherwise.

Usage Example:

isFound := oBrw:Seek( "Search String" ) // Performs seek using codeblock.
content_copy
download
Use code with caution.
Harbour

233. Adjust()

Description: Accessor for Adjust (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Adjusts layout using codeblock.
content_copy
download
Use code with caution.
Harbour

234. Check_oSeek()

Description: Accessor for Check_oSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

235. SetSortBmp()

Description: Accessor for SetSortBmp (same as DATA member, method version for codeblock usage).

Parameters:

aBmp: ARRAY - Bitmap array.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

236. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Accessor for AutoFit (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AutoFit)

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example: (Internal use only - method version for codeblock usage)

237. CheckSize()

Description: Accessor for CheckSize (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

238. Resize( nSizeType, nWidth, nHeight )

Description: Accessor for Resize (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Resize)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

239. Change( lRow )

Description: Accessor for Change (same as DATA member, method version for codeblock usage).

Parameters:

lRow: LOGICAL - Row flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-24T03:38:41-07:00 2025-01-24T03:38:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277177#p277177

Code: Select all | Expand

240. MakeTotals( aCols )

Description: Accessor for MakeTotals (same as DATA member, method version for codeblock usage).

Parameters:

aCols: ARRAY - Columns array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

241. SaveTotals( lBlank )

Description: Accessor for SaveTotals (same as DATA member, method version for codeblock usage).

Parameters:

lBlank: LOGICAL - Blank flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

242. ReCalcTotals( lReduce )

Description: Accessor for ReCalcTotals (same as DATA member, method version for codeblock usage).

Parameters:

lReduce: LOGICAL - Reduce flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

243. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: Accessor for Eval (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Eval)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

244. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Accessor for Report (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Report)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

245. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Accessor for ToWord (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToWord)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

246. ToHTML( cHtml, lShow )

Description: Accessor for ToHTML (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToHTML)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

247. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Accessor for ToCSV (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCSV)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

248. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Accessor for ToExcel (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToExcel)

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

249. ToXlsx( cFileXls, aCols )

Description: Accessor for ToXlsx (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToXlsx)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

250. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Accessor for ToCalc (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCalc)

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

251. ToArray( aCols )

Description: Accessor for ToArray (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToArray)

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example: (Internal use only - method version for codeblock usage)

252. CurrentRow()

Description: Accessor for CurrentRow (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

253. AddBitmap( uBmp, aResize )

Description: Accessor for AddBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AddBitmap)

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example: (Internal use only - method version for codeblock usage)

254. aBitmap( n )

Description: Accessor for aBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member aBitmap)

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example: (Internal use only - method version for codeblock usage)

255. Initiate( hDlg )

Description: Accessor for Initiate (same as DATA member, method version for codeblock usage).

Parameters:

hDlg: - Handle to the dialog window.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

256. Display()

Description: Accessor for Display (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

257. Paint()

Description: Accessor for Paint (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

258. DrawBorder()

Description: Accessor for DrawBorder (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

259. CheckSortCbx()

Description: Accessor for CheckSortCbx (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

260. GetPaintCols( nLast )

Description: Accessor for GetPaintCols (same as DATA member, method version for codeblock usage).

Parameters:

nLast: NUMERIC - Last column index.

Return Value: ARRAY - Array of columns to paint.

Usage Example: (Internal use only - method version for codeblock usage)

261. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Accessor for PaintHDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

262. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Accessor for PaintVDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintVDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

263. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Accessor for PaintHeader (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHeader)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

264. PaintTopBar( hDC, hGrayPen )

Description: Accessor for PaintTopBar (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintTopBar)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

265. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Accessor for PaintFooter (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintFooter)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

266. Refresh( lComplete )

Description: Accessor for Refresh (same as DATA member, method version for codeblock usage).

Parameters:

lComplete: LOGICAL - Complete refresh flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

267. CalcRowSelPos()

Description: Accessor for CalcRowSelPos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

268. DelRepos()

Description: Accessor for DelRepos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

269. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

270. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters:

u: - Bookmark value.

Return Value: NUMERIC - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

271. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Key number.

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

272. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

273. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

274. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

275. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

276. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

277. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

278. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

279. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

280. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

281. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

282. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

283. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

284. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

285. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

286. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

287. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

288. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

289. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

290. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

291. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

292. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

293. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

294. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

295. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

296. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

297. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

298. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

299. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

300. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

301. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

302. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

303. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

304. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

305. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

306. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

307. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

308. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

309. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

310. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

311. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

312. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

313. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

314. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

315. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

316. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

317. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

318. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

319. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

320. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

321. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

322. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

323. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

324. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

325. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

]]>

Code: Select all | Expand

240. MakeTotals( aCols )

Description: Accessor for MakeTotals (same as DATA member, method version for codeblock usage).

Parameters:

aCols: ARRAY - Columns array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

241. SaveTotals( lBlank )

Description: Accessor for SaveTotals (same as DATA member, method version for codeblock usage).

Parameters:

lBlank: LOGICAL - Blank flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

242. ReCalcTotals( lReduce )

Description: Accessor for ReCalcTotals (same as DATA member, method version for codeblock usage).

Parameters:

lReduce: LOGICAL - Reduce flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

243. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: Accessor for Eval (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Eval)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

244. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Accessor for Report (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Report)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

245. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Accessor for ToWord (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToWord)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

246. ToHTML( cHtml, lShow )

Description: Accessor for ToHTML (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToHTML)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

247. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Accessor for ToCSV (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCSV)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

248. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Accessor for ToExcel (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToExcel)

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

249. ToXlsx( cFileXls, aCols )

Description: Accessor for ToXlsx (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToXlsx)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

250. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Accessor for ToCalc (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCalc)

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

251. ToArray( aCols )

Description: Accessor for ToArray (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToArray)

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example: (Internal use only - method version for codeblock usage)

252. CurrentRow()

Description: Accessor for CurrentRow (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

253. AddBitmap( uBmp, aResize )

Description: Accessor for AddBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AddBitmap)

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example: (Internal use only - method version for codeblock usage)

254. aBitmap( n )

Description: Accessor for aBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member aBitmap)

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example: (Internal use only - method version for codeblock usage)

255. Initiate( hDlg )

Description: Accessor for Initiate (same as DATA member, method version for codeblock usage).

Parameters:

hDlg: - Handle to the dialog window.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

256. Display()

Description: Accessor for Display (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

257. Paint()

Description: Accessor for Paint (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

258. DrawBorder()

Description: Accessor for DrawBorder (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

259. CheckSortCbx()

Description: Accessor for CheckSortCbx (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

260. GetPaintCols( nLast )

Description: Accessor for GetPaintCols (same as DATA member, method version for codeblock usage).

Parameters:

nLast: NUMERIC - Last column index.

Return Value: ARRAY - Array of columns to paint.

Usage Example: (Internal use only - method version for codeblock usage)

261. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Accessor for PaintHDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

262. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Accessor for PaintVDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintVDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

263. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Accessor for PaintHeader (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHeader)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

264. PaintTopBar( hDC, hGrayPen )

Description: Accessor for PaintTopBar (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintTopBar)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

265. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Accessor for PaintFooter (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintFooter)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

266. Refresh( lComplete )

Description: Accessor for Refresh (same as DATA member, method version for codeblock usage).

Parameters:

lComplete: LOGICAL - Complete refresh flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

267. CalcRowSelPos()

Description: Accessor for CalcRowSelPos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

268. DelRepos()

Description: Accessor for DelRepos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

269. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

270. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters:

u: - Bookmark value.

Return Value: NUMERIC - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

271. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Key number.

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

272. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

273. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

274. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

275. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

276. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

277. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

278. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

279. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

280. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

281. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

282. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

283. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

284. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

285. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

286. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

287. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

288. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

289. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

290. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

291. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

292. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

293. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

294. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

295. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

296. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

297. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

298. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

299. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

300. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

301. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

302. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

303. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

304. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

305. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

306. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

307. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

308. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

309. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

310. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

311. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

312. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

313. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

314. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

315. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

316. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

317. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

318. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

319. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

320. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

321. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

322. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

323. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

324. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

325. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-24T04:19:15-07:00 2025-01-24T04:19:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277178#p277178

Code: Select all | Expand

You're right to ask about how these methods are related! The sheer number of methods in TXBrowse can be overwhelming, but they are designed to work together to provide a rich and functional browse control.

Let's break down how these methods are related by categorizing them based on their roles and interactions:

1. Lifecycle Management (Creation, Destruction, Initialization):

New() and Destroy(): These are the fundamental methods that control the lifespan of a TXBrowse object. New() creates an instance, setting up default properties and resources. Destroy() cleans up and releases those resources when the object is no longer needed.

Initiate( hDlg ): Called internally during the creation process. It sets up scrollbars, default colors, and initializes data-related codeblocks.

Adjust(): Crucially linked to data loading and display. It's called after data is set (via SetRDD, SetArray, etc.) to calculate sizes of rows, columns, headers, footers, and prepare the browse for rendering. It also triggers CheckSize() and CalcHdrHeight() to ensure correct layout.

CheckSize() & CalcHdrHeight() & CalcRowSelPos(): These are helper methods called by Adjust() and Refresh() to recalculate dimensions and positions based on data and style settings. They ensure the browse layout is consistent and correct after data or style changes.

Think of it like building a house: New() is like laying the foundation, Initiate() is like building the basic structure, Adjust() is like fitting windows and doors and ensuring everything is properly sized, and Destroy() is like demolishing the house when it's no longer needed.

2. Data Source Management (Setting and Resetting Data):

SetRDD(), SetArray(), SetoDbf(), SetExcelRange(), SetAdo(), SetTree(), SetColsForTree(), SetDolphin(), SetMySql(): These methods are the entry points for connecting the TXBrowse to different data sources. They are mutually exclusive – you'll use one of them depending on your data origin. They all ultimately trigger Adjust() after setting up the data connection to prepare the browse for display.

ResetData( uSrc, aCols ) & ResetBrowse(): Used to clear the existing data and columns and optionally load new data. ResetBrowse() is a more general reset, while ResetData() specifically handles switching data sources.

Analogy: These methods are like choosing the type of fuel and engine for your car (TXBrowse). You choose one (RDD, Array, etc.) to power the data display. ResetData is like changing the engine entirely, while ResetBrowse is more like just turning off the engine and clearing the dashboard.

3. Navigation Methods (Cursor Movement and Position):

GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), Skip(): These methods provide different ways to move the browse cursor through the data. They are all interconnected as different forms of navigation.

BookMark(), KeyNo(): These methods manage the bookmark and key number (scrollbar position) of the browse. They are often used in conjunction with navigation methods to remember or jump to specific positions.

GoFltRow(n), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(): These methods offer more specialized navigation, like moving to a specific filtered row or navigating horizontally.

Analogy: These are like the steering wheel, pedals, gear shift, and GPS of your car. They allow you to control where you are in the data (the road).

4. Selection Management (Row Selection and Multiselect):

Select( nOperation ), SelectAll(), SelectNone(), SelectRow( nOperation ), IsSelectedRow(): These methods are focused on row selection, especially in multi-select mode. Select() is the core method, with others being convenience wrappers.

SetMultiSelectCol( uCol, lFooter ): Enables multi-selection and links it to a specific column, triggering the use of the selection methods.

Analogy: These are like the car's seatbelt and door locks – features that manage how you interact with the car's contents (data).

5. Editing and Data Modification:

Edit(), EditSource(), EditBrowse(), EditDateTime(): These methods provide different ways to edit data, typically in modal dialogs or in-place (depending on column settings). Edit() acts as a dispatcher, choosing the appropriate editing method.

CancelEdit(): Cancels any ongoing edit operation.

Delete( lMsg ): Deletes the currently selected record.

SaveData( lRefresh ): Saves changes made during editing back to the data source.

ArrCellSet(), ArrCell(): Methods for direct manipulation of array data source cells.

Lock(), UnLock(): Methods for controlling data modification by locking/unlocking the browse.

Analogy: These are like the tools you use to repair or modify your car – wrenches, paintbrushes, etc. They allow you to change the data (car's components).

6. Display and Appearance Methods:

Display(), Paint(), Refresh( lComplete ), RefreshCurrent(), RefreshHeaders(), RefreshFooters(), DrawBorder(), DrawLine(), EraseData(), FullPaint(): These methods are responsible for rendering the browse control visually. Refresh() is the main method for redrawing, while others handle specific parts of the display or optimize refresh operations.

SetStyle(), SetDarkTheme(), SetFont(), FontSize(), SetRecSelBmp(), SetRecSelSl(), SetBackGround(), SetColor(), SetGroupHeader(), SetGroupTotal(), SetMultiSelectCol(), SetChecks(), SetProgBar(): These methods control the visual appearance of the browse, including styles, colors, fonts, bitmaps, and various display elements.

ShowMessage(), CloseMessage(): Methods for displaying and closing temporary message boxes within the browse.

DrawChart(), DrawChartInRect(), PaintBmpAndText(), PaintHeader(), PaintFooter(), PaintHDivider(), PaintVDivider(), PaintTopBar(), PaintCellBack(), PaintCell(), PaintCellBtn(), PaintCellImage(), PaintCellBarCode(): These are lower-level painting methods used internally by Paint() to draw specific elements of the browse, like headers, footers, cells, bitmaps, and various visual styles.

Analogy: These are like the paint job, interior design, and lights of your car – everything that makes it look and present information to the user.

7. Exporting Methods:

ToExcel(), ToXlsx(), ToCalc(), ToWord(), ToHTML(), ToCSV(), ToArray(), ClpRow(), Copy(): These methods provide ways to export the data displayed in the browse to various formats.

Analogy: These are like the car's ability to transport cargo – taking the data (cargo) and putting it in a different format (destination).

8. Event Handling Methods:

HandleEvent(), HandleGesture(), GesturePan(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), KeyDown(), KeyChar(), MouseLeave(), NcMouseMove(): These methods handle various Windows messages and events, allowing the TXBrowse to respond to user interactions (mouse clicks, keyboard input, scrolling, gestures) and system events.

Analogy: These are like the car's sensors and controls that respond to the driver's actions and the environment.

9. Utility/Helper Methods:

MakeBlock(), ArrCalcWidths(), CalcHdrHeight(), CalcRowSelPos(), Check_oSeek(), CheckSize(), ColStretch(), DestroyToolTip(), ColAtPos(), ColPos(), SelectedCol(), IsDisplayPosVisible(), LastDisplayPos(), GetDisplayCols(), GetDisplayColsWidth(), GetPaintCols(), Eval(), SafeEval(), BrwFitSize(), CancelEdit(), CheckSortCbx(), DelRepos(), DrawLine(), EraseData(), GetDlgCode(), HasBorder(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), HorzLine(), MouseAtHeader(), MouseAtFooter(), MouseColPos(), MouseRowPos(), EraseData(), KeyDown(), KeyChar(), HScroll(), VScroll(), VUpdatePos(), VUpdateAll(), VSetPos(), VThumbPos(), VGetPos(), VGetMax(), VGoDown(), VGoUp(), VGetThumbPos(), VGoBottom(), VGoTop(), GetDisplayCols(), GetVisibleCols(), GetDisplayColsWidth(), IsDisplayPosVisible(), LastDisplayPos(), BrwWidth(), GridWidth(), BrwHeight(), HeaderHeight(), FooterHeight(), CalcHdrHeight(), RowCount(), FirstRow(), LastRow(), FooterRow(), DataHeight(), BrwFitSize(), CancelEdit(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoFltRow(), SaveState(), RestoreState(), OldRestoreState(), Lock(), UnLock(), SaveData(), ShowSeek(), Seek(), Adjust(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(): A massive category of internal helper methods used for various tasks like calculations, drawing, size adjustments, event handling, and data manipulation. They are not typically called directly by users but are essential for the internal workings of TXBrowse.

Analogy: These are like the nuts, bolts, wires, and smaller components that make up the car's engine, chassis, and electrical system. They are essential for the car to function correctly, but you don't interact with them directly as a driver.

10. Accessor Methods (SET/GET for DATA members):

Many DATA members have associated ACCESS and ASSIGN methods (often INLINE) that provide controlled access to their values. For example, lSeekBar, lGetBar, l2007, lFlatStyle, l2000, lMultiSelect, lIncrSearch, BookMark, KeyNo, Skip, Bof, Eof, GoFltRow, SaveState, RestoreState, OldRestoreState, Lock, UnLock, SaveData, ShowSeek, Seek, Adjust, Check_oSeek, SetSortBmp, AutoFit, CheckSize, Resize, Change, MakeTotals, SaveTotals, ReCalcTotals, Eval, Report, ToWord, ToHTML, ToCSV, ToExcel, ToXlsx, ToCalc, ToArray, CurrentRow, AddBitmap, aBitmap, Initiate, Display, Paint, DrawBorder, CheckSortCbx, GetPaintCols, PaintHDivider, PaintVDivider, PaintHeader, PaintTopBar, PaintFooter, Refresh, CalcRowSelPos, DelRepos, KeyCount, BookMark, KeyNo, Skip, Bof, Eof, GoTop, GoBottom, GoUp, GoDown, PageUp, PageDown, GoLeft, GoRight, GoLeftMost, GoRightMost, GoFirstEditCol, HandleEvent, HandleGesture, GesturePan().

Analogy: These are like the car's gauges and controls on the dashboard. They allow you to monitor and adjust certain aspects of the car's behavior (browse control's properties).

Interrelationships in Action (Example Workflow):

Let's consider a user sorting a TXBrowse by clicking a header:

User Clicks Header: Mouse click event is captured by HandleEvent().

Header Click Detection: MouseAtHeader() determines the click is in the header area and identifies the clicked column.

Sorting Initiation: HeaderLButtonUp() is called for the clicked column (TxBrwColumn object).

SetOrder() is Called: The SetOrder() method of the TxBrwColumn is invoked, which:

Determines the sort order (ascending/descending).

Updates the cOrder DATA member of the column.

Calls the SetOrder() method of the TXBrowse class.

SetOrder() in TXBrowse Class:

Calls SortArrayData() (if array data source) or initiates SQL sorting (if RDD/SQLRDD).

Sets the lAutoSort flag to .T..

Sets the aSortBmp bitmaps to indicate sort order in header.

Refresh() is Called: Triggers a full refresh of the browse to reflect the sorted data.

Paint() is Called: Redraws the entire browse control, including the sorted data and sort indicator bitmaps in the header.

This example illustrates how various methods from different categories work together to handle a single user action. Many other workflows, like navigation, editing, and filtering, involve similar interactions between different sets of methods.

This detailed breakdown should provide a better understanding of how the numerous methods within the TXBrowse class are interconnected and contribute to its overall functionality. Let me know if you have any specific methods or categories you'd like to explore further!
]]>

Code: Select all | Expand

You're right to ask about how these methods are related! The sheer number of methods in TXBrowse can be overwhelming, but they are designed to work together to provide a rich and functional browse control.

Let's break down how these methods are related by categorizing them based on their roles and interactions:

1. Lifecycle Management (Creation, Destruction, Initialization):

New() and Destroy(): These are the fundamental methods that control the lifespan of a TXBrowse object. New() creates an instance, setting up default properties and resources. Destroy() cleans up and releases those resources when the object is no longer needed.

Initiate( hDlg ): Called internally during the creation process. It sets up scrollbars, default colors, and initializes data-related codeblocks.

Adjust(): Crucially linked to data loading and display. It's called after data is set (via SetRDD, SetArray, etc.) to calculate sizes of rows, columns, headers, footers, and prepare the browse for rendering. It also triggers CheckSize() and CalcHdrHeight() to ensure correct layout.

CheckSize() & CalcHdrHeight() & CalcRowSelPos(): These are helper methods called by Adjust() and Refresh() to recalculate dimensions and positions based on data and style settings. They ensure the browse layout is consistent and correct after data or style changes.

Think of it like building a house: New() is like laying the foundation, Initiate() is like building the basic structure, Adjust() is like fitting windows and doors and ensuring everything is properly sized, and Destroy() is like demolishing the house when it's no longer needed.

2. Data Source Management (Setting and Resetting Data):

SetRDD(), SetArray(), SetoDbf(), SetExcelRange(), SetAdo(), SetTree(), SetColsForTree(), SetDolphin(), SetMySql(): These methods are the entry points for connecting the TXBrowse to different data sources. They are mutually exclusive – you'll use one of them depending on your data origin. They all ultimately trigger Adjust() after setting up the data connection to prepare the browse for display.

ResetData( uSrc, aCols ) & ResetBrowse(): Used to clear the existing data and columns and optionally load new data. ResetBrowse() is a more general reset, while ResetData() specifically handles switching data sources.

Analogy: These methods are like choosing the type of fuel and engine for your car (TXBrowse). You choose one (RDD, Array, etc.) to power the data display. ResetData is like changing the engine entirely, while ResetBrowse is more like just turning off the engine and clearing the dashboard.

3. Navigation Methods (Cursor Movement and Position):

GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), Skip(): These methods provide different ways to move the browse cursor through the data. They are all interconnected as different forms of navigation.

BookMark(), KeyNo(): These methods manage the bookmark and key number (scrollbar position) of the browse. They are often used in conjunction with navigation methods to remember or jump to specific positions.

GoFltRow(n), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(): These methods offer more specialized navigation, like moving to a specific filtered row or navigating horizontally.

Analogy: These are like the steering wheel, pedals, gear shift, and GPS of your car. They allow you to control where you are in the data (the road).

4. Selection Management (Row Selection and Multiselect):

Select( nOperation ), SelectAll(), SelectNone(), SelectRow( nOperation ), IsSelectedRow(): These methods are focused on row selection, especially in multi-select mode. Select() is the core method, with others being convenience wrappers.

SetMultiSelectCol( uCol, lFooter ): Enables multi-selection and links it to a specific column, triggering the use of the selection methods.

Analogy: These are like the car's seatbelt and door locks – features that manage how you interact with the car's contents (data).

5. Editing and Data Modification:

Edit(), EditSource(), EditBrowse(), EditDateTime(): These methods provide different ways to edit data, typically in modal dialogs or in-place (depending on column settings). Edit() acts as a dispatcher, choosing the appropriate editing method.

CancelEdit(): Cancels any ongoing edit operation.

Delete( lMsg ): Deletes the currently selected record.

SaveData( lRefresh ): Saves changes made during editing back to the data source.

ArrCellSet(), ArrCell(): Methods for direct manipulation of array data source cells.

Lock(), UnLock(): Methods for controlling data modification by locking/unlocking the browse.

Analogy: These are like the tools you use to repair or modify your car – wrenches, paintbrushes, etc. They allow you to change the data (car's components).

6. Display and Appearance Methods:

Display(), Paint(), Refresh( lComplete ), RefreshCurrent(), RefreshHeaders(), RefreshFooters(), DrawBorder(), DrawLine(), EraseData(), FullPaint(): These methods are responsible for rendering the browse control visually. Refresh() is the main method for redrawing, while others handle specific parts of the display or optimize refresh operations.

SetStyle(), SetDarkTheme(), SetFont(), FontSize(), SetRecSelBmp(), SetRecSelSl(), SetBackGround(), SetColor(), SetGroupHeader(), SetGroupTotal(), SetMultiSelectCol(), SetChecks(), SetProgBar(): These methods control the visual appearance of the browse, including styles, colors, fonts, bitmaps, and various display elements.

ShowMessage(), CloseMessage(): Methods for displaying and closing temporary message boxes within the browse.

DrawChart(), DrawChartInRect(), PaintBmpAndText(), PaintHeader(), PaintFooter(), PaintHDivider(), PaintVDivider(), PaintTopBar(), PaintCellBack(), PaintCell(), PaintCellBtn(), PaintCellImage(), PaintCellBarCode(): These are lower-level painting methods used internally by Paint() to draw specific elements of the browse, like headers, footers, cells, bitmaps, and various visual styles.

Analogy: These are like the paint job, interior design, and lights of your car – everything that makes it look and present information to the user.

7. Exporting Methods:

ToExcel(), ToXlsx(), ToCalc(), ToWord(), ToHTML(), ToCSV(), ToArray(), ClpRow(), Copy(): These methods provide ways to export the data displayed in the browse to various formats.

Analogy: These are like the car's ability to transport cargo – taking the data (cargo) and putting it in a different format (destination).

8. Event Handling Methods:

HandleEvent(), HandleGesture(), GesturePan(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), KeyDown(), KeyChar(), MouseLeave(), NcMouseMove(): These methods handle various Windows messages and events, allowing the TXBrowse to respond to user interactions (mouse clicks, keyboard input, scrolling, gestures) and system events.

Analogy: These are like the car's sensors and controls that respond to the driver's actions and the environment.

9. Utility/Helper Methods:

MakeBlock(), ArrCalcWidths(), CalcHdrHeight(), CalcRowSelPos(), Check_oSeek(), CheckSize(), ColStretch(), DestroyToolTip(), ColAtPos(), ColPos(), SelectedCol(), IsDisplayPosVisible(), LastDisplayPos(), GetDisplayCols(), GetDisplayColsWidth(), GetPaintCols(), Eval(), SafeEval(), BrwFitSize(), CancelEdit(), CheckSortCbx(), DelRepos(), DrawLine(), EraseData(), GetDlgCode(), HasBorder(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), HorzLine(), MouseAtHeader(), MouseAtFooter(), MouseColPos(), MouseRowPos(), EraseData(), KeyDown(), KeyChar(), HScroll(), VScroll(), VUpdatePos(), VUpdateAll(), VSetPos(), VThumbPos(), VGetPos(), VGetMax(), VGoDown(), VGoUp(), VGetThumbPos(), VGoBottom(), VGoTop(), GetDisplayCols(), GetVisibleCols(), GetDisplayColsWidth(), IsDisplayPosVisible(), LastDisplayPos(), BrwWidth(), GridWidth(), BrwHeight(), HeaderHeight(), FooterHeight(), CalcHdrHeight(), RowCount(), FirstRow(), LastRow(), FooterRow(), DataHeight(), BrwFitSize(), CancelEdit(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoFltRow(), SaveState(), RestoreState(), OldRestoreState(), Lock(), UnLock(), SaveData(), ShowSeek(), Seek(), Adjust(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(): A massive category of internal helper methods used for various tasks like calculations, drawing, size adjustments, event handling, and data manipulation. They are not typically called directly by users but are essential for the internal workings of TXBrowse.

Analogy: These are like the nuts, bolts, wires, and smaller components that make up the car's engine, chassis, and electrical system. They are essential for the car to function correctly, but you don't interact with them directly as a driver.

10. Accessor Methods (SET/GET for DATA members):

Many DATA members have associated ACCESS and ASSIGN methods (often INLINE) that provide controlled access to their values. For example, lSeekBar, lGetBar, l2007, lFlatStyle, l2000, lMultiSelect, lIncrSearch, BookMark, KeyNo, Skip, Bof, Eof, GoFltRow, SaveState, RestoreState, OldRestoreState, Lock, UnLock, SaveData, ShowSeek, Seek, Adjust, Check_oSeek, SetSortBmp, AutoFit, CheckSize, Resize, Change, MakeTotals, SaveTotals, ReCalcTotals, Eval, Report, ToWord, ToHTML, ToCSV, ToExcel, ToXlsx, ToCalc, ToArray, CurrentRow, AddBitmap, aBitmap, Initiate, Display, Paint, DrawBorder, CheckSortCbx, GetPaintCols, PaintHDivider, PaintVDivider, PaintHeader, PaintTopBar, PaintFooter, Refresh, CalcRowSelPos, DelRepos, KeyCount, BookMark, KeyNo, Skip, Bof, Eof, GoTop, GoBottom, GoUp, GoDown, PageUp, PageDown, GoLeft, GoRight, GoLeftMost, GoRightMost, GoFirstEditCol, HandleEvent, HandleGesture, GesturePan().

Analogy: These are like the car's gauges and controls on the dashboard. They allow you to monitor and adjust certain aspects of the car's behavior (browse control's properties).

Interrelationships in Action (Example Workflow):

Let's consider a user sorting a TXBrowse by clicking a header:

User Clicks Header: Mouse click event is captured by HandleEvent().

Header Click Detection: MouseAtHeader() determines the click is in the header area and identifies the clicked column.

Sorting Initiation: HeaderLButtonUp() is called for the clicked column (TxBrwColumn object).

SetOrder() is Called: The SetOrder() method of the TxBrwColumn is invoked, which:

Determines the sort order (ascending/descending).

Updates the cOrder DATA member of the column.

Calls the SetOrder() method of the TXBrowse class.

SetOrder() in TXBrowse Class:

Calls SortArrayData() (if array data source) or initiates SQL sorting (if RDD/SQLRDD).

Sets the lAutoSort flag to .T..

Sets the aSortBmp bitmaps to indicate sort order in header.

Refresh() is Called: Triggers a full refresh of the browse to reflect the sorted data.

Paint() is Called: Redraws the entire browse control, including the sorted data and sort indicator bitmaps in the header.

This example illustrates how various methods from different categories work together to handle a single user action. Many other workflows, like navigation, editing, and filtering, involve similar interactions between different sets of methods.

This detailed breakdown should provide a better understanding of how the numerous methods within the TXBrowse class are interconnected and contribute to its overall functionality. Let me know if you have any specific methods or categories you'd like to explore further!
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by TimStone]]> 2025-01-25T12:40:04-07:00 2025-01-25T12:40:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277207#p277207
I may also create a "manual" using Help and Manual that could embrace these outputs, and then make it available to you in both PDF and .hlp formats.

Tim]]>

I may also create a "manual" using Help and Manual that could embrace these outputs, and then make it available to you in both PDF and .hlp formats.

Tim]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Otto]]> 2025-01-25T13:40:43-07:00 2025-01-25T13:49:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277208#p277208 I’m adding a sentence to the request for the AI to create an HTML page for me right away.
Here is the result as a PDF, for example.
https://mybergland.com/fwforum/tcontrol ... tation.pdf

Best regards,
Otto

Image]]>
I’m adding a sentence to the request for the AI to create an HTML page for me right away.
Here is the result as a PDF, for example.
https://mybergland.com/fwforum/tcontrol ... tation.pdf

Best regards,
Otto

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Otto]]> 2025-01-25T13:48:43-07:00 2025-01-25T13:48:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277209#p277209 Just at the moment I made the post, the idea occurred to me that you could also have anchor tags created. I also think a keyword directory is no problem.
Best regards,
Otto


https://winhotel-sandbox.com/fwforum/tc ... nchor.html

Image]]>
Just at the moment I made the post, the idea occurred to me that you could also have anchor tags created. I also think a keyword directory is no problem.
Best regards,
Otto


https://winhotel-sandbox.com/fwforum/tc ... nchor.html

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by TimStone]]> 2025-01-25T16:46:33-07:00 2025-01-25T16:46:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277212#p277212
That is very nice ... but as far as I can see, 24.12 has not been released so I don't have access to that functionality.

When I do, HTML would be nice because it is easy to import into Help and Manual to make a true document.]]>

That is very nice ... but as far as I can see, 24.12 has not been released so I don't have access to that functionality.

When I do, HTML would be nice because it is easy to import into Help and Manual to make a true document.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Using new Class TDeepSeek for documenting :: Reply by Antonio Linares]]> 2025-01-25T17:04:54-07:00 2025-01-25T17:04:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45319&p=277213#p277213
We are very close to publish FWH 24.12

We apologize for the delay]]>

We are very close to publish FWH 24.12

We apologize for the delay]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Antonio... FiveTouch posts are gone? :: Author Adolfo]]> 2025-01-20T07:40:55-07:00 2025-01-20T07:40:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277075#p277075

I need to program a very simple Android app, whats the status of Fivetouch]]>


I need to program a very simple Android app, whats the status of Fivetouch]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-20T12:09:10-07:00 2025-01-20T12:09:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277079#p277079
FiveTouch have mucho que dejó de actualizarse pues entendimos que una web app era una solución más idónea usando mod_harbour ó UT de Charly (más sencillo)

En la actualización de los foros, esos mensaje se han perdido. No sabemos por qué. De todas formas hay backup de todo y en una DBF:
https://huggingface.co/datasets/fivetec ... /tree/main]]>

FiveTouch have mucho que dejó de actualizarse pues entendimos que una web app era una solución más idónea usando mod_harbour ó UT de Charly (más sencillo)

En la actualización de los foros, esos mensaje se han perdido. No sabemos por qué. De todas formas hay backup de todo y en una DBF:
https://huggingface.co/datasets/fivetec ... /tree/main]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-21T16:10:28-07:00 2025-01-21T16:10:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277107#p277107
I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

Code: Select all | Expand

Get-ChildItem -Path c:\www\htdocs\fwforum\data\forumsext\POST_TEXT_memo -Recurse -Filter *.txt | Select-String -Pattern "My program creates a PDF" | ForEach-Object { $_.Path } | Out-File -FilePath "search_results.txt" -Encoding ASCII
it takes about 50 seconds.

I think if you were to split the TXT files into groups and then start multiple searches simultaneously, this time could be significantly reduced.

In any case, it is a good real database to test my low-level functions.

Best regards,
Otto

Image]]>

I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

Code: Select all | Expand

Get-ChildItem -Path c:\www\htdocs\fwforum\data\forumsext\POST_TEXT_memo -Recurse -Filter *.txt | Select-String -Pattern "My program creates a PDF" | ForEach-Object { $_.Path } | Out-File -FilePath "search_results.txt" -Encoding ASCII
it takes about 50 seconds.

I think if you were to split the TXT files into groups and then start multiple searches simultaneously, this time could be significantly reduced.

In any case, it is a good real database to test my low-level functions.

Best regards,
Otto

Image]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-21T23:42:56-07:00 2025-01-21T23:42:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277110#p277110
> I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

Would you be so kind to share it ?

You may send it to me using https://wormhole.app/ or https://huggingface.co/

Thank you very much]]>

> I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

Would you be so kind to share it ?

You may send it to me using https://wormhole.app/ or https://huggingface.co/

Thank you very much]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Jimmy]]> 2025-01-22T03:24:45-07:00 2025-01-22T03:24:45-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277115#p277115
Otto wrote: Tue Jan 21, 2025 11:10 pm I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

it takes about 50 seconds.
50 Sec. is a long Time !

it is a old Problem when have so many Files in a Directory that it need a long Time to read all Files.
it also depends on File System :
FAT32 (Windows): The maximum number of files in a single directory is 65,534.]]>
Otto wrote: Tue Jan 21, 2025 11:10 pm I have split the DBF memo fields into TXT files, all in one directory. There are 276,748 TXT files. When I now perform a search with

it takes about 50 seconds.
50 Sec. is a long Time !

it is a old Problem when have so many Files in a Directory that it need a long Time to read all Files.
it also depends on File System :
FAT32 (Windows): The maximum number of files in a single directory is 65,534.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-22T07:26:33-07:00 2025-01-22T07:26:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277120#p277120 yes, you're right. Even TC takes a very long time to build the view in a directory with so many files.
But I think it's a good exercise for me. I simply don’t want an SQL database at the moment.
Still, I wonder why searches in SQL can be so fast.

Yesterday, I experimented further and split the directory into 4 parts, now performing the search with ripgrep and 4 parallel calls.
Now it takes 12 seconds. In the evening, I’ll test again with 8 directories.

At the moment, I’m working on creating an index file. For my purpose in a DMS system, it works well, even if the first search takes longer.
But since I can then work with the original files, I see this approach as a good fit.

This first test with the index file didn’t work yet.
Best regards,
Otto]]>
yes, you're right. Even TC takes a very long time to build the view in a directory with so many files.
But I think it's a good exercise for me. I simply don’t want an SQL database at the moment.
Still, I wonder why searches in SQL can be so fast.

Yesterday, I experimented further and split the directory into 4 parts, now performing the search with ripgrep and 4 parallel calls.
Now it takes 12 seconds. In the evening, I’ll test again with 8 directories.

At the moment, I’m working on creating an index file. For my purpose in a DMS system, it works well, even if the first search takes longer.
But since I can then work with the original files, I see this approach as a good fit.

This first test with the index file didn’t work yet.
Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-22T07:28:11-07:00 2025-01-22T07:28:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277121#p277121 Which data should I upload?

Best regards,
Otto]]>
Which data should I upload?

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-22T07:57:21-07:00 2025-01-22T07:57:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277122#p277122
never mind. We already found a bug we were looking for :)]]>

never mind. We already found a bug we were looking for :)]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-22T12:02:18-07:00 2025-01-22T12:02:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277131#p277131
Adolfo wrote: Mon Jan 20, 2025 2:40 pm Antonio, there is no Fivetouch posts in the forum :-(

I need to program a very simple Android app, whats the status of Fivetouch
Mensajes arreglados :wink:

https://forums.fivetechsupport.com/view ... hp?t=35529]]>
Adolfo wrote: Mon Jan 20, 2025 2:40 pm Antonio, there is no Fivetouch posts in the forum :-(

I need to program a very simple Android app, whats the status of Fivetouch
Mensajes arreglados :wink:

https://forums.fivetechsupport.com/view ... hp?t=35529]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-22T15:11:08-07:00 2025-01-22T15:11:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277132#p277132
I conducted an exciting experiment to optimize full-text search in memo files. Here's a brief summary:

Initial Situation:

Data: Memo fields from a DBF file (forums.dbf, 921 MB, 271,585 records) were exported into 271,585 individual TXT files.
Problem: Searching in a folder containing all TXT files took 50 seconds.
Optimizations:

File Distribution:

The files were distributed across 4 folders.
Using rg.exe (ripgrep) and parallel searching reduced the time to 12–14 seconds.
Index File:

A central index file was created, containing all texts from the memo files.
Image

Direct Search with rg.exe:

The direct search with rg.exe in the index file is blazing fast, taking only 0.335 seconds.
Image

Next Steps:

Temporary Index File:
A temporary index file will be created during changes, and the main index file will be updated incrementally.
Conclusion:

rg.exe is a game-changer: It provides SQL-like speed for full-text searches.

Simplicity and Transparency: The solution uses simple tools while maintaining full control over the data.
I'm excited to hear your thoughts and suggestions!

Best regards,
Otto]]>

I conducted an exciting experiment to optimize full-text search in memo files. Here's a brief summary:

Initial Situation:

Data: Memo fields from a DBF file (forums.dbf, 921 MB, 271,585 records) were exported into 271,585 individual TXT files.
Problem: Searching in a folder containing all TXT files took 50 seconds.
Optimizations:

File Distribution:

The files were distributed across 4 folders.
Using rg.exe (ripgrep) and parallel searching reduced the time to 12–14 seconds.
Index File:

A central index file was created, containing all texts from the memo files.
Image

Direct Search with rg.exe:

The direct search with rg.exe in the index file is blazing fast, taking only 0.335 seconds.
Image

Next Steps:

Temporary Index File:
A temporary index file will be created during changes, and the main index file will be updated incrementally.
Conclusion:

rg.exe is a game-changer: It provides SQL-like speed for full-text searches.

Simplicity and Transparency: The solution uses simple tools while maintaining full control over the data.
I'm excited to hear your thoughts and suggestions!

Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-22T15:28:55-07:00 2025-01-22T15:28:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277133#p277133 ]]> ]]> <![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-25T08:00:56-07:00 2025-01-25T08:00:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277197#p277197


The outsourcing of memo fields into individual files can indeed be a practical and flexible alternative in modern systems and might better suit your DMS system.

That is exactly what I’m working on: a project where I create an index file from all the words in a directory. The index file follows the pattern: Word[TAB]Filename. My system is already working very well, but I wanted to share my approach and at the same time ask if anyone else is working on something similar. I’d love to exchange ideas and learn from your experiences!

My Solution Overview

One-time Creation of the Index File
I scan the directory and extract all words from the files.

For each word, I create an entry in the format Word[TAB]Filename and save everything in a main index file.

Ongoing Operation
During operation, the index file must be updated whenever files are deleted, edited, or added. My approach is as follows:

A. Deleting a File

I search the index file for all entries containing the filename.

These entries are removed from the index file.

B. Editing a File

First, I delete all entries in the index file that contain the filename.

Then I create a temporary index file with new entries from the edited file.

Finally, I append the temporary index file to the main index file.

C. Adding a New File

I create a temporary index file with entries from the new file.

This temporary index file is appended to the main index file.

Why This Approach?

Simplicity: The approach is easy to understand and implement.

Consistency: By deleting and recreating entries during edits, the index file always remains up to date.

Flexibility: Temporary index files allow changes to be processed in isolation before being merged into the main index file.

PS: Here’s a test

Just for info: the search is performed across 276,748 TXT files.
I split the forums DBF into individual memo files.

Search completed. Elapsed time: 0.9403415 seconds
Writing hash content to 'c:\search_results\results.txt'...
Results have been written to 'c:\search_results\results.txt'.
Writing matches with coverage to 'c:\search_results\matches_with_coverage.txt'...
Matches with coverage have been written to 'c:\search_results\matches_with_coverage.txt'.]]>



The outsourcing of memo fields into individual files can indeed be a practical and flexible alternative in modern systems and might better suit your DMS system.

That is exactly what I’m working on: a project where I create an index file from all the words in a directory. The index file follows the pattern: Word[TAB]Filename. My system is already working very well, but I wanted to share my approach and at the same time ask if anyone else is working on something similar. I’d love to exchange ideas and learn from your experiences!

My Solution Overview

One-time Creation of the Index File
I scan the directory and extract all words from the files.

For each word, I create an entry in the format Word[TAB]Filename and save everything in a main index file.

Ongoing Operation
During operation, the index file must be updated whenever files are deleted, edited, or added. My approach is as follows:

A. Deleting a File

I search the index file for all entries containing the filename.

These entries are removed from the index file.

B. Editing a File

First, I delete all entries in the index file that contain the filename.

Then I create a temporary index file with new entries from the edited file.

Finally, I append the temporary index file to the main index file.

C. Adding a New File

I create a temporary index file with entries from the new file.

This temporary index file is appended to the main index file.

Why This Approach?

Simplicity: The approach is easy to understand and implement.

Consistency: By deleting and recreating entries during edits, the index file always remains up to date.

Flexibility: Temporary index files allow changes to be processed in isolation before being merged into the main index file.

PS: Here’s a test

Just for info: the search is performed across 276,748 TXT files.
I split the forums DBF into individual memo files.

Search completed. Elapsed time: 0.9403415 seconds
Writing hash content to 'c:\search_results\results.txt'...
Results have been written to 'c:\search_results\results.txt'.
Writing matches with coverage to 'c:\search_results\matches_with_coverage.txt'...
Matches with coverage have been written to 'c:\search_results\matches_with_coverage.txt'.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-25T09:52:23-07:00 2025-01-25T09:52:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277200#p277200
very interesting. Nice idea! :)

Could you please share the structure of the DBF and the used index key ?

Wondering if we should use user defined indexes entries, something possible using CDXs]]>

very interesting. Nice idea! :)

Could you please share the structure of the DBF and the used index key ?

Wondering if we should use user defined indexes entries, something possible using CDXs]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-25T10:21:34-07:00 2025-01-25T10:21:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277201#p277201
Looking into xHarbour docs I found this example. This came to my mind reading your post:

Code: Select all | Expand

// The example shows two approaches for building a custom index.
// In the first approach, the controlling index is a regular index
// which allows for relative database navigation. The second approach
// uses the custome index as controlling index and requires absolute
// database navigation. The first five logical records and physical records
// are added to the custome index.

   REQUEST Dbfcdx

   PROCEDURE Main
      USE Customer VIA "DBFCDX"
      INDEX ON Upper(LastName+FirstName) TAG NAME    TO Cust01
      INDEX ON Upper(LastName+FirstName) TAG NAMESET TO Cust01t CUSTOM

      // relative navigation with non-custom index
      OrdSetFocus( "NAME" )
      GO TOP
      FOR i:=1 TO 5
         OrdKeyAdd( "NAMESET" )
         SKIP
      NEXT

      GO TOP
      Browse()

      // absolute navigation with custom index
      OrdSetFocus( "NAMESET" )
      FOR i:=1 TO 5
         DbGoto( i )
         OrdKeyAdd( "NAMESET" )
      NEXT

      GO TOP
      Browse()

      USE
   RETURN
OrdKeyAdd()
Adds an index key to a custom built index.
Syntax
OrdKeyAdd( [<nOrder>|<cIndexName>], ;
[<cIndexFile>] , ;
[<xIndexValue>] ) --> lSuccess

Arguments
<nOrder>
A numeric value specifying the ordinal position of the custom index open in a work area. Indexes are numbered in the sequence of opening, beginning with 1. The value zero identifies the controlling index.
<cIndexName>
Alternatively, a character string holding the symbolic name of the open custom index can be passed. It is analogous to the alias name of a work area. Support for <cIndexName> depends on the RDD used to open the index. Usually, RDDs that are able to maintain multiple indexes in one index file support symbolic index names, such as DBFCDX, for example.
<cIndexFile>
<cIndexFile> is a character string with the name of the file that stores the custom index. It is only required when multiple index files are open that contain indexes having the same <cIndexName>.
<xIndexValue>
This is the index value to be added to the index for the current record. It must be of the same data type as the value returned by the index expression. If omitted, <xIndexValue> is obtained by evaluating the index expression with the data of the current record. Return
The function returns .T. (true) if the current record is successfully included in the index, otherwise .F. (false) is returned.
Description
OrdKeyAdd() is used to build a custom index whose entries are programmatically added and deleted. Custom built indexes are not automatically updated by the RDD but are initially empty. OrdKeyAdd() adds the current record to the custom index and OrdKeyDel() removes it. It is possible to add multiple index values to the index for the same record, so that the same record is found when different search values are passed to DbSeek().
If no parameters are passed, OrdKeyAdd() evaluates the index expresssion with the data of the current record to obtain <xIndexValue>. The record is added to the index when it matches the FOR condition and scoping restrictions, if they are defined. When <xIndexValue> is specified, it must have the same data type as the value of the expression &(OrdKey()).
OrdKeyAdd() fails if the record pointer is positioned on Eof(), if the specified index is not a custom index, or if the specified index does not exist.
This is important when the custom index is the controlling index. Since a custome index is initially empty, relative database navigation with SKIP positions the record pointer always at Eof(). To include records to a controlling custom index, they must be physically navigated to using DbGoto().
The recommended way of creating a custom index is to use a non-custom index as the controlling index, skip through the database and specify <cIndexName> for OrdListAdd() when the current record meets the conditions for being included in the custom index.
]]>

Looking into xHarbour docs I found this example. This came to my mind reading your post:

Code: Select all | Expand

// The example shows two approaches for building a custom index.
// In the first approach, the controlling index is a regular index
// which allows for relative database navigation. The second approach
// uses the custome index as controlling index and requires absolute
// database navigation. The first five logical records and physical records
// are added to the custome index.

   REQUEST Dbfcdx

   PROCEDURE Main
      USE Customer VIA "DBFCDX"
      INDEX ON Upper(LastName+FirstName) TAG NAME    TO Cust01
      INDEX ON Upper(LastName+FirstName) TAG NAMESET TO Cust01t CUSTOM

      // relative navigation with non-custom index
      OrdSetFocus( "NAME" )
      GO TOP
      FOR i:=1 TO 5
         OrdKeyAdd( "NAMESET" )
         SKIP
      NEXT

      GO TOP
      Browse()

      // absolute navigation with custom index
      OrdSetFocus( "NAMESET" )
      FOR i:=1 TO 5
         DbGoto( i )
         OrdKeyAdd( "NAMESET" )
      NEXT

      GO TOP
      Browse()

      USE
   RETURN
OrdKeyAdd()
Adds an index key to a custom built index.
Syntax
OrdKeyAdd( [<nOrder>|<cIndexName>], ;
[<cIndexFile>] , ;
[<xIndexValue>] ) --> lSuccess

Arguments
<nOrder>
A numeric value specifying the ordinal position of the custom index open in a work area. Indexes are numbered in the sequence of opening, beginning with 1. The value zero identifies the controlling index.
<cIndexName>
Alternatively, a character string holding the symbolic name of the open custom index can be passed. It is analogous to the alias name of a work area. Support for <cIndexName> depends on the RDD used to open the index. Usually, RDDs that are able to maintain multiple indexes in one index file support symbolic index names, such as DBFCDX, for example.
<cIndexFile>
<cIndexFile> is a character string with the name of the file that stores the custom index. It is only required when multiple index files are open that contain indexes having the same <cIndexName>.
<xIndexValue>
This is the index value to be added to the index for the current record. It must be of the same data type as the value returned by the index expression. If omitted, <xIndexValue> is obtained by evaluating the index expression with the data of the current record. Return
The function returns .T. (true) if the current record is successfully included in the index, otherwise .F. (false) is returned.
Description
OrdKeyAdd() is used to build a custom index whose entries are programmatically added and deleted. Custom built indexes are not automatically updated by the RDD but are initially empty. OrdKeyAdd() adds the current record to the custom index and OrdKeyDel() removes it. It is possible to add multiple index values to the index for the same record, so that the same record is found when different search values are passed to DbSeek().
If no parameters are passed, OrdKeyAdd() evaluates the index expresssion with the data of the current record to obtain <xIndexValue>. The record is added to the index when it matches the FOR condition and scoping restrictions, if they are defined. When <xIndexValue> is specified, it must have the same data type as the value of the expression &(OrdKey()).
OrdKeyAdd() fails if the record pointer is positioned on Eof(), if the specified index is not a custom index, or if the specified index does not exist.
This is important when the custom index is the controlling index. Since a custome index is initially empty, relative database navigation with SKIP positions the record pointer always at Eof(). To include records to a controlling custom index, they must be physically navigated to using DbGoto().
The recommended way of creating a custom index is to use a non-custom index as the controlling index, skip through the database and specify <cIndexName> for OrdListAdd() when the current record meets the conditions for being included in the custom index.
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Otto]]> 2025-01-25T11:51:17-07:00 2025-01-25T11:51:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277206#p277206 I made this function to export the memofields:

Code: Select all | Expand


#include "fivewin.ch"

REQUEST DBFCDX
REQUEST DBFFPT
static nCount := 0
function main
    local cDBF_Dir := ".\dataTest\pages"
    local cDBF_file_noPath := "c:\fwh\samples\DataTest"
    local cDBF_file_memo := ""
    local cDBF_fil_new := "PAGES_NEW"
    local aStruc := {}
    local cTmpDbf := ""
    local cSrc := "c:\forumposts\forums.dbf" // "c:\fwh\samples\DataTest\PAGES.DBF"
    local cDst := "c:\forumposts\forumsext.dbf"   // "c:\fwh\samples\DataTest\PAGESext.dbf"
    local cTempMatchcode := ""
    local aFeld := {}  
    local aField := {}  
    local nField
    local cFieldSubdir
	 local cDBF_memofiles := ""
	 
    use (cSrc) new
    aStruc := DBStruct()
    use    

 

//cFilePath( cSrc )   // returns path of a filename
//cFileNoExt( cSrc ) // returns the filename without ext


cDBF_memofiles := cFilePath( cSrc ) + cFileNoExt( cSrc ) + "ext"

IF lisdir(cDBF_memofiles) = .f.
	lmkdir(cDBF_memofiles)
ENDIF

 
    // Adjust structure: Replace memo fields with character fields of length 50 and add prefix M_
    FOR EACH aField IN aStruc
        IF aField[2] == "M"
            aField[1] := "M_" + aField[1]  // Add prefix M_
            aField[2] := "C"
            aField[3] := 50
        ENDIF
    NEXT

    if file(cDst) = .F.
        DbCreate(cDst, aStruc)
    endif

    use

    use(cDst) new ALIAS neuedbf
    use(cSrc) new ALIAS altedbf

    select altedbf
    do while .not. eof()
        aFeld := getrec()

        // Export memo fields to txt files and save the file name in the character field
        FOR nField := 1 TO fcount()
            IF fieldType(nField) == "M"
                cFieldSubdir := cDBF_memofiles + "\" + fieldName(nField) + "_memo"
 
                // Create subdirectory for the memo field if not existing
                IF lisdir(cFieldSubdir) = .f.
                    lmkdir(cFieldSubdir)
                ENDIF
					 nCount += 1	
                cTempMatchcode := alltrim(str(recno())) + "-" + ShortUniqueIDNUM() + ALLTRIM( STR(nCount) )
                MEMOWRIT(cFieldSubdir + "\" + cTempMatchcode + ".txt", fieldGet(nField), .F. )
                aFeld[nField] := cTempMatchcode
            ENDIF
        NEXT

        select neuedbf
        APPEND_BLANK()
        saverec(aFeld)

        select altedbf
        skip
    enddo

    ? "Ende"
return 

INIT PROCEDURE PrgInit
    
    SET CENTURY ON
    SET EPOCH TO YEAR(DATE())-98
    
    SET DELETED ON
    SET EXCLUSIVE OFF
    
    REQUEST HB_Lang_DE
    
    HB_LangSelect("DE")
    
    SET DATE TO GERMAN
    
    rddsetdefault("DBFCDX")
    
    EXTERN DESCEND
    
RETURN

//----------------------------------------------------------------------------//
FUNCTION ShortUniqueIDNUM()
    local cUniqueIDNUM := substr(dtos(date()),3) + "_" +;
                       substr(time(),1,2) + ;
                       substr(time(),4,2) + ;
                       substr(time(),7,2) 

    return (cUniqueIDNUM)

//----------------------------------------------------------------------------//
FUNCTION RLOK
    if rlock()
        RETURN ""
    endif
    DO WHILE .T.
        if rlock()
            exit
        else
            MsgInfo("Infobox","Datensatz gesperrt!")
        endif
        INKEY(.01)
    ENDDO
    RETURN ""

FUNCTION FLOK
    if flock()
        RETURN ""
    endif
    DO WHILE .T.
        if flock()
            exit
        else
            MsgInfo("Infobox","Datensatz gesperrt!")
        endif
        INKEY(.01)
    ENDDO
    RETURN ""

//----------------------------------------------------------------------------//
FUNCTION APPEND_BLANK
    APPEND BLANK
    DO WHILE NETERR()
        APPEND BLANK
        INKEY(.1)
    ENDDO
    unlock
    rlok()
RETURN ""
//----------------------------------------------------------------------------//

FUNCTION unlok
    
    unlock
    
RETURN (NIL)
//----------------------------------------------------------------------------//

FUNCTION net_use(vcFile,vlExclus,vnWait,vcAlias)
    * tries to open a file for exclusive or shared use
    *
    * Syntax: NET_USE(expC1,expL1,expN1,expC2)
    * where:  expC1 = database to use, character string
    *         expL1 = .T. to use file exclusively, .F. for multi-user
    *         expN1 = seconds to wait if file isnt opened (0=forever), if >0,
    *                 the calling routine must be constructed to handle cases
    *                 where the file is not opened!
    *         expC2 = data driver
    *
    local forever := (vnWait=0)
    *
    do while (forever .or. vnWait>0)
        
        if vlExclus                               && exclusive
            use (vcFile) exclusive new
        else
            use (vcFile) shared new
        endif
        if .not. neterr()                         && USE succeeds
            RETURN (.T.)
        endif
        *
        inkey(1)                                  && wait 1 second
        vnWait--
    ENDDO
    RETURN (.F.)                                    && database opening unsuccessful!
//----------------------------------------------------------------------------//

FUNCTION getRec()
    local ary := {}
    local nFcnt, nFnum

    nFcnt = fcount()
    FOR nFnum = 1 to nFcnt
        aAdd(ary, fieldGet(nFnum))
    NEXT
    
    RETURN (ary)
//----------------------------------------------------------------------------//

FUNCTION saveRec(ary)
    local nFcnt, nFnum

    nFcnt = fcount()
    FOR nFnum = 1 to nFcnt
        fieldPut(nFnum, ary[nFnum])
    NEXT
    
    RETURN (NIL)

//----------------------------------------------------------------------------//



And I use to create the indexfile this powershell:

Code: Select all | Expand

# Pfade zu den zu durchsuchenden Verzeichnissen
$verzeichnisse = @(
    "C:\www\htdocs\fwforum\data\forumsext\Dir1",
    "C:\www\htdocs\fwforum\data\forumsext\Dir2",
    "C:\www\htdocs\fwforum\data\forumsext\Dir3",
    "C:\www\htdocs\fwforum\data\forumsext\Dir4",
    "C:\www\htdocs\fwforum\data\forumsext\Dir5",
    "C:\www\htdocs\fwforum\data\forumsext\Dir6",
    "C:\www\htdocs\fwforum\data\forumsext\Dir7",
    "C:\www\htdocs\fwforum\data\forumsext\Dir8"
)

# Pfad zur Indexdatei
$indexFile = "C:\suchergebnis\index.txt"

# Ergebnisverzeichnis sicherstellen
$ergebnisVerzeichnis = "C:\suchergebnis"
if (-not (Test-Path -Path $ergebnisVerzeichnis)) {
    New-Item -ItemType Directory -Path $ergebnisVerzeichnis | Out-Null
}

# Indexdatei initialisieren (leeren oder erstellen)
if (Test-Path $indexFile) {
    Clear-Content $indexFile
} else {
    New-Item -Path $indexFile -ItemType File | Out-Null
}

# Funktion zur Indexerstellung
function Build-Index {
    param (
        [string[]]$Directories,
        [string]$IndexPath
    )

    foreach ($dir in $Directories) {
        Write-Host "Indexiere Verzeichnis: $dir" -ForegroundColor Green
        # Alle .prg und .txt Dateien durchsuchen
        $files = Get-ChildItem -Path $dir -Recurse -Include *.prg, *.txt -File

        foreach ($file in $files) {
            Write-Host "  Verarbeite Datei: $($file.FullName)" -ForegroundColor Yellow
            try {
                # Dateiinhalt lesen
                $content = Get-Content -Path $file.FullName -Raw

                # Tokenisierung: Wörter extrahieren (nur alphanumerische Zeichen)
                $words = $content -split '\W+' | Where-Object { $_ -match '\w+' } | ForEach-Object { $_.ToLower() }

                # Einzigartige Wörter
                $uniqueWords = $words | Sort-Object -Unique

                foreach ($word in $uniqueWords) {
                    # Indexzeile: Wort<TAB>Dateipfad
                    "$word`t$($file.FullName)" | Out-File -FilePath $IndexPath -Append -Encoding ASCII
                }
            }
            catch {
                Write-Host "    Fehler beim Verarbeiten von $($file.FullName): $_" -ForegroundColor Red
            }
        }
    }

    Write-Host "Indexierung abgeschlossen." -ForegroundColor Green
}

# Funktion zur Suche im Index
function Search-Index {
    param (
        [string]$SearchTerm,
        [string]$IndexPath
    )

    $searchTerm = $SearchTerm.ToLower()
    Write-Host "Suche nach: '$searchTerm'" -ForegroundColor Cyan

    # Suche nach dem Wort am Anfang der Zeile (um genaue Übereinstimmung zu gewährleisten)
    $pattern = "^$searchTerm`t"

    $results = Select-String -Path $IndexPath -Pattern $pattern | ForEach-Object { $_.Line.Split("`t")[1] }

    # Ausgabe der gefundenen Dateien
    if ($results) {
        Write-Host "Gefundene Dateien:" -ForegroundColor Green
        $results | Sort-Object -Unique | ForEach-Object { Write-Host $_ }
    }
    else {
        Write-Host "Keine Treffer gefunden." -ForegroundColor Yellow
    }

    return $results
}

# Zeitmessung starten
$startzeit = Get-Date

# Index erstellen
Build-Index -Directories $verzeichnisse -IndexPath $indexFile

# Zeitmessung beenden
$endzeit = Get-Date
$dauer = $endzeit - $startzeit

# Dauer anzeigen
Write-Host "Indexierungsdauer: $($dauer.TotalSeconds) Sekunden" -ForegroundColor Cyan

# Größe der Indexdatei messen
$indexSize = (Get-Item $indexFile).Length
Write-Host "Größe der Indexdatei: $indexSize Bytes" -ForegroundColor Cyan

# Beispielhafte Suchanfrage
$searchBegriff = "volltxtSearch"
$gefunden = Search-Index -SearchTerm $searchBegriff -IndexPath $indexFile

# Größe der Originaldateien messen
$originalSize = ($verzeichnisse | ForEach-Object {
    Get-ChildItem -Path $_ -Recurse -Include *.prg, *.txt -File | Measure-Object -Property Length -Sum
}).Sum

Write-Host "Gesamtgröße der Originaldateien: $originalSize Bytes" -ForegroundColor Cyan

# Vergleich der Größen
$sizeRatio = [math]::Round(($indexSize / $originalSize) * 100, 2)
Write-Host "Indexgröße als Prozentsatz der Originaldateien: $sizeRatio%" -ForegroundColor Cyan

This takes hours to build the index!
But CRUD functions for index lines works fast.
Best regards,
Otto]]>
I made this function to export the memofields:

Code: Select all | Expand


#include "fivewin.ch"

REQUEST DBFCDX
REQUEST DBFFPT
static nCount := 0
function main
    local cDBF_Dir := ".\dataTest\pages"
    local cDBF_file_noPath := "c:\fwh\samples\DataTest"
    local cDBF_file_memo := ""
    local cDBF_fil_new := "PAGES_NEW"
    local aStruc := {}
    local cTmpDbf := ""
    local cSrc := "c:\forumposts\forums.dbf" // "c:\fwh\samples\DataTest\PAGES.DBF"
    local cDst := "c:\forumposts\forumsext.dbf"   // "c:\fwh\samples\DataTest\PAGESext.dbf"
    local cTempMatchcode := ""
    local aFeld := {}  
    local aField := {}  
    local nField
    local cFieldSubdir
	 local cDBF_memofiles := ""
	 
    use (cSrc) new
    aStruc := DBStruct()
    use    

 

//cFilePath( cSrc )   // returns path of a filename
//cFileNoExt( cSrc ) // returns the filename without ext


cDBF_memofiles := cFilePath( cSrc ) + cFileNoExt( cSrc ) + "ext"

IF lisdir(cDBF_memofiles) = .f.
	lmkdir(cDBF_memofiles)
ENDIF

 
    // Adjust structure: Replace memo fields with character fields of length 50 and add prefix M_
    FOR EACH aField IN aStruc
        IF aField[2] == "M"
            aField[1] := "M_" + aField[1]  // Add prefix M_
            aField[2] := "C"
            aField[3] := 50
        ENDIF
    NEXT

    if file(cDst) = .F.
        DbCreate(cDst, aStruc)
    endif

    use

    use(cDst) new ALIAS neuedbf
    use(cSrc) new ALIAS altedbf

    select altedbf
    do while .not. eof()
        aFeld := getrec()

        // Export memo fields to txt files and save the file name in the character field
        FOR nField := 1 TO fcount()
            IF fieldType(nField) == "M"
                cFieldSubdir := cDBF_memofiles + "\" + fieldName(nField) + "_memo"
 
                // Create subdirectory for the memo field if not existing
                IF lisdir(cFieldSubdir) = .f.
                    lmkdir(cFieldSubdir)
                ENDIF
					 nCount += 1	
                cTempMatchcode := alltrim(str(recno())) + "-" + ShortUniqueIDNUM() + ALLTRIM( STR(nCount) )
                MEMOWRIT(cFieldSubdir + "\" + cTempMatchcode + ".txt", fieldGet(nField), .F. )
                aFeld[nField] := cTempMatchcode
            ENDIF
        NEXT

        select neuedbf
        APPEND_BLANK()
        saverec(aFeld)

        select altedbf
        skip
    enddo

    ? "Ende"
return 

INIT PROCEDURE PrgInit
    
    SET CENTURY ON
    SET EPOCH TO YEAR(DATE())-98
    
    SET DELETED ON
    SET EXCLUSIVE OFF
    
    REQUEST HB_Lang_DE
    
    HB_LangSelect("DE")
    
    SET DATE TO GERMAN
    
    rddsetdefault("DBFCDX")
    
    EXTERN DESCEND
    
RETURN

//----------------------------------------------------------------------------//
FUNCTION ShortUniqueIDNUM()
    local cUniqueIDNUM := substr(dtos(date()),3) + "_" +;
                       substr(time(),1,2) + ;
                       substr(time(),4,2) + ;
                       substr(time(),7,2) 

    return (cUniqueIDNUM)

//----------------------------------------------------------------------------//
FUNCTION RLOK
    if rlock()
        RETURN ""
    endif
    DO WHILE .T.
        if rlock()
            exit
        else
            MsgInfo("Infobox","Datensatz gesperrt!")
        endif
        INKEY(.01)
    ENDDO
    RETURN ""

FUNCTION FLOK
    if flock()
        RETURN ""
    endif
    DO WHILE .T.
        if flock()
            exit
        else
            MsgInfo("Infobox","Datensatz gesperrt!")
        endif
        INKEY(.01)
    ENDDO
    RETURN ""

//----------------------------------------------------------------------------//
FUNCTION APPEND_BLANK
    APPEND BLANK
    DO WHILE NETERR()
        APPEND BLANK
        INKEY(.1)
    ENDDO
    unlock
    rlok()
RETURN ""
//----------------------------------------------------------------------------//

FUNCTION unlok
    
    unlock
    
RETURN (NIL)
//----------------------------------------------------------------------------//

FUNCTION net_use(vcFile,vlExclus,vnWait,vcAlias)
    * tries to open a file for exclusive or shared use
    *
    * Syntax: NET_USE(expC1,expL1,expN1,expC2)
    * where:  expC1 = database to use, character string
    *         expL1 = .T. to use file exclusively, .F. for multi-user
    *         expN1 = seconds to wait if file isnt opened (0=forever), if >0,
    *                 the calling routine must be constructed to handle cases
    *                 where the file is not opened!
    *         expC2 = data driver
    *
    local forever := (vnWait=0)
    *
    do while (forever .or. vnWait>0)
        
        if vlExclus                               && exclusive
            use (vcFile) exclusive new
        else
            use (vcFile) shared new
        endif
        if .not. neterr()                         && USE succeeds
            RETURN (.T.)
        endif
        *
        inkey(1)                                  && wait 1 second
        vnWait--
    ENDDO
    RETURN (.F.)                                    && database opening unsuccessful!
//----------------------------------------------------------------------------//

FUNCTION getRec()
    local ary := {}
    local nFcnt, nFnum

    nFcnt = fcount()
    FOR nFnum = 1 to nFcnt
        aAdd(ary, fieldGet(nFnum))
    NEXT
    
    RETURN (ary)
//----------------------------------------------------------------------------//

FUNCTION saveRec(ary)
    local nFcnt, nFnum

    nFcnt = fcount()
    FOR nFnum = 1 to nFcnt
        fieldPut(nFnum, ary[nFnum])
    NEXT
    
    RETURN (NIL)

//----------------------------------------------------------------------------//



And I use to create the indexfile this powershell:

Code: Select all | Expand

# Pfade zu den zu durchsuchenden Verzeichnissen
$verzeichnisse = @(
    "C:\www\htdocs\fwforum\data\forumsext\Dir1",
    "C:\www\htdocs\fwforum\data\forumsext\Dir2",
    "C:\www\htdocs\fwforum\data\forumsext\Dir3",
    "C:\www\htdocs\fwforum\data\forumsext\Dir4",
    "C:\www\htdocs\fwforum\data\forumsext\Dir5",
    "C:\www\htdocs\fwforum\data\forumsext\Dir6",
    "C:\www\htdocs\fwforum\data\forumsext\Dir7",
    "C:\www\htdocs\fwforum\data\forumsext\Dir8"
)

# Pfad zur Indexdatei
$indexFile = "C:\suchergebnis\index.txt"

# Ergebnisverzeichnis sicherstellen
$ergebnisVerzeichnis = "C:\suchergebnis"
if (-not (Test-Path -Path $ergebnisVerzeichnis)) {
    New-Item -ItemType Directory -Path $ergebnisVerzeichnis | Out-Null
}

# Indexdatei initialisieren (leeren oder erstellen)
if (Test-Path $indexFile) {
    Clear-Content $indexFile
} else {
    New-Item -Path $indexFile -ItemType File | Out-Null
}

# Funktion zur Indexerstellung
function Build-Index {
    param (
        [string[]]$Directories,
        [string]$IndexPath
    )

    foreach ($dir in $Directories) {
        Write-Host "Indexiere Verzeichnis: $dir" -ForegroundColor Green
        # Alle .prg und .txt Dateien durchsuchen
        $files = Get-ChildItem -Path $dir -Recurse -Include *.prg, *.txt -File

        foreach ($file in $files) {
            Write-Host "  Verarbeite Datei: $($file.FullName)" -ForegroundColor Yellow
            try {
                # Dateiinhalt lesen
                $content = Get-Content -Path $file.FullName -Raw

                # Tokenisierung: Wörter extrahieren (nur alphanumerische Zeichen)
                $words = $content -split '\W+' | Where-Object { $_ -match '\w+' } | ForEach-Object { $_.ToLower() }

                # Einzigartige Wörter
                $uniqueWords = $words | Sort-Object -Unique

                foreach ($word in $uniqueWords) {
                    # Indexzeile: Wort<TAB>Dateipfad
                    "$word`t$($file.FullName)" | Out-File -FilePath $IndexPath -Append -Encoding ASCII
                }
            }
            catch {
                Write-Host "    Fehler beim Verarbeiten von $($file.FullName): $_" -ForegroundColor Red
            }
        }
    }

    Write-Host "Indexierung abgeschlossen." -ForegroundColor Green
}

# Funktion zur Suche im Index
function Search-Index {
    param (
        [string]$SearchTerm,
        [string]$IndexPath
    )

    $searchTerm = $SearchTerm.ToLower()
    Write-Host "Suche nach: '$searchTerm'" -ForegroundColor Cyan

    # Suche nach dem Wort am Anfang der Zeile (um genaue Übereinstimmung zu gewährleisten)
    $pattern = "^$searchTerm`t"

    $results = Select-String -Path $IndexPath -Pattern $pattern | ForEach-Object { $_.Line.Split("`t")[1] }

    # Ausgabe der gefundenen Dateien
    if ($results) {
        Write-Host "Gefundene Dateien:" -ForegroundColor Green
        $results | Sort-Object -Unique | ForEach-Object { Write-Host $_ }
    }
    else {
        Write-Host "Keine Treffer gefunden." -ForegroundColor Yellow
    }

    return $results
}

# Zeitmessung starten
$startzeit = Get-Date

# Index erstellen
Build-Index -Directories $verzeichnisse -IndexPath $indexFile

# Zeitmessung beenden
$endzeit = Get-Date
$dauer = $endzeit - $startzeit

# Dauer anzeigen
Write-Host "Indexierungsdauer: $($dauer.TotalSeconds) Sekunden" -ForegroundColor Cyan

# Größe der Indexdatei messen
$indexSize = (Get-Item $indexFile).Length
Write-Host "Größe der Indexdatei: $indexSize Bytes" -ForegroundColor Cyan

# Beispielhafte Suchanfrage
$searchBegriff = "volltxtSearch"
$gefunden = Search-Index -SearchTerm $searchBegriff -IndexPath $indexFile

# Größe der Originaldateien messen
$originalSize = ($verzeichnisse | ForEach-Object {
    Get-ChildItem -Path $_ -Recurse -Include *.prg, *.txt -File | Measure-Object -Property Length -Sum
}).Sum

Write-Host "Gesamtgröße der Originaldateien: $originalSize Bytes" -ForegroundColor Cyan

# Vergleich der Größen
$sizeRatio = [math]::Round(($indexSize / $originalSize) * 100, 2)
Write-Host "Indexgröße als Prozentsatz der Originaldateien: $sizeRatio%" -ForegroundColor Cyan

This takes hours to build the index!
But CRUD functions for index lines works fast.
Best regards,
Otto]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Antonio... FiveTouch posts are gone? :: Reply by Antonio Linares]]> 2025-01-25T17:07:14-07:00 2025-01-25T17:07:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45330&p=277214#p277214
https://xthefull.blogspot.com/2014/02/h ... er-to.html

Code: Select all | Expand

cNombre := "SARAH"

fast_filter( "*"+ alltrim( cNombre ) + "?", 4, 22, 28 )
Browse()


Ahora, ya estaría el filtro activado basado en subindices.

/* 
 Sustituto de SET FILTER
 cExpr  
    Expresion a buscar que forme parte del indice, podemos 
    poner *Texto? , para buscar palabra que forme parte

 nOrder
    Sobre que indice activo vamos a recorrer la lista.
    Por defecto es el indice activo.

 nRow, nCol 
     Posicion fila,columna para mostrar progreso. Se ejecuta en 
     un hilo aparte

 Return: Indice anterior

*/
function fast_filter( cExpr, nOrder, nRow, nCol )
      local PantaAnt := savescreen(0,0,MaxRow(),MaxCol())
      Local p := hb_threadStart( @Pajaritos(), nRow, nCol )
      Local nIndice := OrdNumber()

      DEFAULT nOrder TO OrdNumber()

      set order to nOrder
      INDEX ON &(IndexKey()) TAG _TEMP_ TO tHarbourt ;
               CUSTOM ADDITIVE MEMORY
       
      set order to nOrder
      go top

      DO WHILE OrdWildSeek( cExpr, .T. )
         OrdKeyAdd( "_TEMP_" )
      ENDDO
      OrdSetFocus( "_TEMP_" )
       
      hb_threadTerminateAll()
      restscreen(0 ,0 ,MaxRow(), MaxCol(), PantaAnt)

return nIndice

PROCEDURE Pajaritos( nRow, nCol )
        Local pajarito := "|",n := 0
        
        DEFAULT nRow := MaxRow(), nCol := 1

        DO WHILE .T.

           do case
              case n = 1 
                   pajarito = "|" 
              case n = 2 
                   pajarito = "/" 
              case n = 3  
                   pajarito = "-" 
              case n = 4 
                   pajarito = "\" 
              Otherwise 
                   n := 0
           end case

           DispOutAt( nRow, nCol, "Generando Consulta....[ " +  pajarito +" ]" ) //, "GR+/N" )
           ThreadSleep( 500 )
           n++
       ENDDO
RETURN
]]>

https://xthefull.blogspot.com/2014/02/h ... er-to.html

Code: Select all | Expand

cNombre := "SARAH"

fast_filter( "*"+ alltrim( cNombre ) + "?", 4, 22, 28 )
Browse()


Ahora, ya estaría el filtro activado basado en subindices.

/* 
 Sustituto de SET FILTER
 cExpr  
    Expresion a buscar que forme parte del indice, podemos 
    poner *Texto? , para buscar palabra que forme parte

 nOrder
    Sobre que indice activo vamos a recorrer la lista.
    Por defecto es el indice activo.

 nRow, nCol 
     Posicion fila,columna para mostrar progreso. Se ejecuta en 
     un hilo aparte

 Return: Indice anterior

*/
function fast_filter( cExpr, nOrder, nRow, nCol )
      local PantaAnt := savescreen(0,0,MaxRow(),MaxCol())
      Local p := hb_threadStart( @Pajaritos(), nRow, nCol )
      Local nIndice := OrdNumber()

      DEFAULT nOrder TO OrdNumber()

      set order to nOrder
      INDEX ON &(IndexKey()) TAG _TEMP_ TO tHarbourt ;
               CUSTOM ADDITIVE MEMORY
       
      set order to nOrder
      go top

      DO WHILE OrdWildSeek( cExpr, .T. )
         OrdKeyAdd( "_TEMP_" )
      ENDDO
      OrdSetFocus( "_TEMP_" )
       
      hb_threadTerminateAll()
      restscreen(0 ,0 ,MaxRow(), MaxCol(), PantaAnt)

return nIndice

PROCEDURE Pajaritos( nRow, nCol )
        Local pajarito := "|",n := 0
        
        DEFAULT nRow := MaxRow(), nCol := 1

        DO WHILE .T.

           do case
              case n = 1 
                   pajarito = "|" 
              case n = 2 
                   pajarito = "/" 
              case n = 3  
                   pajarito = "-" 
              case n = 4 
                   pajarito = "\" 
              Otherwise 
                   n := 0
           end case

           DispOutAt( nRow, nCol, "Generando Consulta....[ " +  pajarito +" ]" ) //, "GR+/N" )
           ThreadSleep( 500 )
           n++
       ENDDO
RETURN
]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Extend a Fivewin class :: Author oliveiros junior]]> 2025-01-25T04:06:48-07:00 2025-01-25T04:06:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45347&p=277195#p277195
I would like to know if it is possible to add a method to an existing class. Ex.: Add the ChangeText method to the TBtnBmp class.

If so, would there be any practical example?

I need to add some information to an object and I would like not to touch the Fivewin classes.

Thank you in advance for everyone's attention.

Oliveiros Junior]]>

I would like to know if it is possible to add a method to an existing class. Ex.: Add the ChangeText method to the TBtnBmp class.

If so, would there be any practical example?

I need to add some information to an object and I would like not to touch the Fivewin classes.

Thank you in advance for everyone's attention.

Oliveiros Junior]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Extend a Fivewin class :: Reply by nageswaragunupudi]]> 2025-01-25T05:36:03-07:00 2025-01-25T05:36:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45347&p=277196#p277196
2) Please reconsider. It is possible to changetext of BtnBmp using the Existing methods. No need to have any additional method for this. Can you explain what exactly are you looking for.]]>

2) Please reconsider. It is possible to changetext of BtnBmp using the Existing methods. No need to have any additional method for this. Can you explain what exactly are you looking for.]]>
<![CDATA[FiveWin for Harbour/xHarbour :: Re: Extend a Fivewin class :: Reply by oliveiros junior]]> 2025-01-26T07:23:56-07:00 2025-01-26T07:23:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45347&p=277215#p277215
I'm using FWH, version 23.07;

My goal is to be able to write various information about the button, different positions.

Ex.:
+------------------------------------------------------------------------------------+
| xxxxxxx ...................................................................... |
| xxxxxxx .......................................XXXXX XXXXXX( image) |
| |
+------------------------------------------------------------------------------------+

I made a multi-button Loop for testing and tried a few things that didn't work using existing methods.

As:

For nX = 1 To Len( oDlg1:aItem )

@ nLinha, nColuna + 50 BTNBMP aBtns[ nX ];
PROMPT "" RIGHT;
FLAT NOBORDER FONT oFontTxt COLOR CLR_BLACK, CLR_WHITE ;
SIZE oDlg1:nLargura - 100, 100 OF oDlg1:oPanel

aBtns[ nX ]:nRound := 20
aBtns[ nX ]:lTransparent := .F.

//aBtns[ nX ]:bPainted := { || aBtns[ nX ]:SayText( 'Linha 1',{ 0, 0, 40, 140 }, 'R', oFontTxt, { CLR_GREEN, CLR_BLACK } ) }

//aBtns[ nX ]:SayText( 'Linha 1',{ 0, 0, 40, 140 }, 'R', oFontTxt, { CLR_GREEN, CLR_BLACK } )

nLinha += 110
Next

Another need I have is to have a wide button with an image aligned to the left and for the action to only be executed if the click occurs on the image.

Thank you in advance for your attention!

Oliveiros Junior]]>

I'm using FWH, version 23.07;

My goal is to be able to write various information about the button, different positions.

Ex.:
+------------------------------------------------------------------------------------+
| xxxxxxx ...................................................................... |
| xxxxxxx .......................................XXXXX XXXXXX( image) |
| |
+------------------------------------------------------------------------------------+

I made a multi-button Loop for testing and tried a few things that didn't work using existing methods.

As:

For nX = 1 To Len( oDlg1:aItem )

@ nLinha, nColuna + 50 BTNBMP aBtns[ nX ];
PROMPT "" RIGHT;
FLAT NOBORDER FONT oFontTxt COLOR CLR_BLACK, CLR_WHITE ;
SIZE oDlg1:nLargura - 100, 100 OF oDlg1:oPanel

aBtns[ nX ]:nRound := 20
aBtns[ nX ]:lTransparent := .F.

//aBtns[ nX ]:bPainted := { || aBtns[ nX ]:SayText( 'Linha 1',{ 0, 0, 40, 140 }, 'R', oFontTxt, { CLR_GREEN, CLR_BLACK } ) }

//aBtns[ nX ]:SayText( 'Linha 1',{ 0, 0, 40, 140 }, 'R', oFontTxt, { CLR_GREEN, CLR_BLACK } )

nLinha += 110
Next

Another need I have is to have a wide button with an image aligned to the left and for the action to only be executed if the click occurs on the image.

Thank you in advance for your attention!

Oliveiros Junior]]>
<![CDATA[mod_harbour :: learn mod_harbour :: Author mauri.menabue]]> 2025-01-07T18:17:09-07:00 2025-01-07T18:17:09-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45287&p=276819#p276819
I would like to start using mod_harbour. I think you are the right person to ask for information. I would need a learning path based on very, very simple examples starting initially from how to prepare the development and test environment, I have seen that you recently talked about an economic manager to create a cloud environment. I believe that the key to spreading mod_harbour is to treat the topic in a practically kindergarten-like way, at least for me. I noticed bitterness in your last comment because after a lot of work mod_harbour doesn't take off, it needs to be proposed in a very simple and gradual way. Hope you can help me.

note well

Your code generator is also interesting, it allows you to keep your attention on the analysis of the programming problem and not on the syntax aspects, sometimes you lose concentration due to stupid things that a program can handle much better than a human being . This is an aspect to be explored further.

thanks in advance.
Maurizio Menabue]]>

I would like to start using mod_harbour. I think you are the right person to ask for information. I would need a learning path based on very, very simple examples starting initially from how to prepare the development and test environment, I have seen that you recently talked about an economic manager to create a cloud environment. I believe that the key to spreading mod_harbour is to treat the topic in a practically kindergarten-like way, at least for me. I noticed bitterness in your last comment because after a lot of work mod_harbour doesn't take off, it needs to be proposed in a very simple and gradual way. Hope you can help me.

note well

Your code generator is also interesting, it allows you to keep your attention on the analysis of the programming problem and not on the syntax aspects, sometimes you lose concentration due to stupid things that a program can handle much better than a human being . This is an aspect to be explored further.

thanks in advance.
Maurizio Menabue]]>
<![CDATA[mod_harbour :: Re: learn mod_harbour :: Reply by Otto]]> 2025-01-08T00:54:07-07:00 2025-01-08T00:54:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45287&p=276822#p276822
I was just about to write another appeal, saying that a new year is a great time to start something new. Then I wanted to check how long it has been since Antonio gave us mod_harbour. Many have not even unwrapped the gift yet. That was over 5 years ago.

I also read in other forums that developers who do not offer web apps have no future. The problem is clear – the wall is visible, yet people are still driving full speed towards it.

I was so positively surprised and happy to read your message. I’m happy to help.

Your approach of starting with simple things is the right one. It was certainly a big mistake in the early days of mod_harbour to think that you could immediately dive in and start programming apps – MVCs for large companies with thousands of users – straightaway, and that too in FIVEWIN syntax. Honestly, that was disrespectful and overconfident.

But now the new era is working in our favor. ChatGPT takes so much of the syntax work off your shoulders. It no longer makes any sense to replicate FIVEWIN syntax. The future is HTML/JS.

On the backend, mod_harbour is a good option. Here, however, we must hope – as Antonio always said – that we reach a critical mass of users. But if you're just starting with web apps, this isn't a concern for you at the moment, because you can use mod_harbour and have virtually no learning curve on the backend. After some time, you’ll gain the expertise to judge for yourself.

Just let me know what kind of program you roughly want to create. I’d be happy to help.

Best regards,
Otto

PS: Are you from Italy?]]>

I was just about to write another appeal, saying that a new year is a great time to start something new. Then I wanted to check how long it has been since Antonio gave us mod_harbour. Many have not even unwrapped the gift yet. That was over 5 years ago.

I also read in other forums that developers who do not offer web apps have no future. The problem is clear – the wall is visible, yet people are still driving full speed towards it.

I was so positively surprised and happy to read your message. I’m happy to help.

Your approach of starting with simple things is the right one. It was certainly a big mistake in the early days of mod_harbour to think that you could immediately dive in and start programming apps – MVCs for large companies with thousands of users – straightaway, and that too in FIVEWIN syntax. Honestly, that was disrespectful and overconfident.

But now the new era is working in our favor. ChatGPT takes so much of the syntax work off your shoulders. It no longer makes any sense to replicate FIVEWIN syntax. The future is HTML/JS.

On the backend, mod_harbour is a good option. Here, however, we must hope – as Antonio always said – that we reach a critical mass of users. But if you're just starting with web apps, this isn't a concern for you at the moment, because you can use mod_harbour and have virtually no learning curve on the backend. After some time, you’ll gain the expertise to judge for yourself.

Just let me know what kind of program you roughly want to create. I’d be happy to help.

Best regards,
Otto

PS: Are you from Italy?]]>
<![CDATA[mod_harbour :: Re: learn mod_harbour :: Reply by mauri.menabue]]> 2025-01-08T02:04:25-07:00 2025-01-08T02:04:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45287&p=276823#p276823 1) I am Italian, I live and work in Modena Emilia Romagna.
2) I develop a business management program, I don't earn money with a verticalized product but instead develop the personalization of my basic management program for my clients, so I'm a bit like a tailor who sews made-to-measure clothes.
My management system went from DBASE III to CLIPPER87 to CLIPPER5 then was saved by a hair's breadth with FIVEWIN by Antonio Linares and Harbor and now my customers expect an efficient transition to the WEB, they don't ask for it openly but I know they look around as blame them the world goes from there. I would like to take this step.
3) I need to know how to design the development environment locally
with initial database DBFCDX
so you can see on a browser like Chrome 'HELLO WORLD'
4) Much later which network infrastructure to rent in order to be able to carry out real experiments on the network.

PS
I saw some posts by a gentleman called Carles who also did notable work for the WEB but I can't really understand the various differences.

Greetings Maurizio]]>
1) I am Italian, I live and work in Modena Emilia Romagna.
2) I develop a business management program, I don't earn money with a verticalized product but instead develop the personalization of my basic management program for my clients, so I'm a bit like a tailor who sews made-to-measure clothes.
My management system went from DBASE III to CLIPPER87 to CLIPPER5 then was saved by a hair's breadth with FIVEWIN by Antonio Linares and Harbor and now my customers expect an efficient transition to the WEB, they don't ask for it openly but I know they look around as blame them the world goes from there. I would like to take this step.
3) I need to know how to design the development environment locally
with initial database DBFCDX
so you can see on a browser like Chrome 'HELLO WORLD'
4) Much later which network infrastructure to rent in order to be able to carry out real experiments on the network.

PS
I saw some posts by a gentleman called Carles who also did notable work for the WEB but I can't really understand the various differences.

Greetings Maurizio]]>
<![CDATA[mod_harbour :: Re: learn mod_harbour :: Reply by Otto]]> 2025-01-08T02:23:08-07:00 2025-01-08T02:23:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45287&p=276824#p276824 Great to hear you are Italian. I am from Austria and live 4 km from the Italian border (San Candido).
When I was 16, I spent one month in Carpi to learn Italian. I look back on it fondly.
Maybe we should have a phonecall. I can then explain the differences to you.
Best regards,
Otto]]>
Great to hear you are Italian. I am from Austria and live 4 km from the Italian border (San Candido).
When I was 16, I spent one month in Carpi to learn Italian. I look back on it fondly.
Maybe we should have a phonecall. I can then explain the differences to you.
Best regards,
Otto]]>
<![CDATA[mod_harbour :: SIDEBAR NAVIGATION :: Author Otto]]> 2025-01-08T03:00:05-07:00 2025-01-08T03:00:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45288&p=276825#p276825 Switching between windows or closing them is just as convenient as on a familiar desktop – but directly in the browser. This way, you always stay on top of things and can work even more efficiently.

Image]]>
Switching between windows or closing them is just as convenient as on a familiar desktop – but directly in the browser. This way, you always stay on top of things and can work even more efficiently.

Image]]>
<![CDATA[mod_harbour :: Re: Building modharbour with ADS on Linux :: Reply by Lailton]]> 2025-01-16T20:01:28-07:00 2025-01-16T20:01:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=44651&p=276956#p276956
Do you still using ADS with Linux?
I would like to try it on Linux Debian, do you think that is it compatible?
Are there an email or skype to contact you ( if possible )?

Thank you
giuliano wrote: Tue Jul 02, 2024 2:08 pm Hi Reinaldo,
here my experience using mod_harbour + ADS on Linux

I have been using mod harbour + ADS in a Linux machine for 2 years .
It's faster, stable and easy to maintain/config .
I use also Postgres driver to connect on particular Database . It's fast and stable.
If you want some help don't esitate to contact me here in the forum or via mail .
I think the only limitation now is ADS support . I use ADS 11 release .
I agree with you . ADS works well well well ... Mod_Harbour too .

Thanks to Antonio and all the modharbour team.

Giuliano
]]>

Do you still using ADS with Linux?
I would like to try it on Linux Debian, do you think that is it compatible?
Are there an email or skype to contact you ( if possible )?

Thank you
giuliano wrote: Tue Jul 02, 2024 2:08 pm Hi Reinaldo,
here my experience using mod_harbour + ADS on Linux

I have been using mod harbour + ADS in a Linux machine for 2 years .
It's faster, stable and easy to maintain/config .
I use also Postgres driver to connect on particular Database . It's fast and stable.
If you want some help don't esitate to contact me here in the forum or via mail .
I think the only limitation now is ADS support . I use ADS 11 release .
I agree with you . ADS works well well well ... Mod_Harbour too .

Thanks to Antonio and all the modharbour team.

Giuliano
]]>
<![CDATA[mod_harbour :: Re: Building modharbour with ADS on Linux :: Reply by giuliano]]> 2025-01-20T01:24:20-07:00 2025-01-20T01:24:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=44651&p=277054#p277054 i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.

Bye]]>
i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.

Bye]]>
<![CDATA[mod_harbour :: Re: Building modharbour with ADS on Linux :: Reply by Lailton]]> 2025-01-22T18:19:18-07:00 2025-01-22T18:19:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=44651&p=277136#p277136
Can you tell me where can I download lib necessary to build?

can you share an example doing the connection and an while?

thank you

giuliano wrote: Mon Jan 20, 2025 8:24 am Hi Lailton ,
i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.

Bye
]]>

Can you tell me where can I download lib necessary to build?

can you share an example doing the connection and an while?

thank you

giuliano wrote: Mon Jan 20, 2025 8:24 am Hi Lailton ,
i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.

Bye
]]>
<![CDATA[mod_harbour :: Re: Building modharbour with ADS on Linux :: Reply by giuliano]]> 2025-01-23T00:45:07-07:00 2025-01-23T00:45:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=44651&p=277144#p277144 you need for Harbour application or Mod_Harbour application ?

Bye]]>
you need for Harbour application or Mod_Harbour application ?

Bye]]>
<![CDATA[mod_harbour :: Re: Building modharbour with ADS on Linux :: Reply by Lailton]]> 2025-01-23T13:57:20-07:00 2025-01-23T13:57:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=44651&p=277167#p277167 <![CDATA[mod_harbour :: UT v2.0 - Open Souce project :: Author Carles]]> 2025-01-24T10:08:07-07:00 2025-01-24T10:08:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=45&t=45345&p=277185#p277185
I have uploaded all the sources of the UT v.2.0 project to the repository, and it is now released as an MIT project. The time had come, and it was something I had wanted to do for a long time, but the number of pieces to handle and reorganize made me wait for the right moment.

This project is not just a class, a function, or a simple piece of code, but a tool that will help you work on the web in an easy yet highly effective way. We started 5 years ago with mod_harbour in search of that solution, and everything has been changing, evolving, adapting... I believe more than one person will put it to good use. :D

It is now open for anyone who wants to contribute, modify, recompile, or improve it...

https://carles9000.github.io/

Image]]>

I have uploaded all the sources of the UT v.2.0 project to the repository, and it is now released as an MIT project. The time had come, and it was something I had wanted to do for a long time, but the number of pieces to handle and reorganize made me wait for the right moment.

This project is not just a class, a function, or a simple piece of code, but a tool that will help you work on the web in an easy yet highly effective way. We started 5 years ago with mod_harbour in search of that solution, and everything has been changing, evolving, adapting... I believe more than one person will put it to good use. :D

It is now open for anyone who wants to contribute, modify, recompile, or improve it...

https://carles9000.github.io/

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: A toda la familia FW :: Reply by Antonio Linares]]> 2024-12-27T14:09:37-07:00 2024-12-27T14:09:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45270&p=276676#p276676 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: A toda la familia FW :: Reply by wmormar]]> 2024-12-28T00:45:39-07:00 2024-12-28T00:45:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45270&p=276677#p276677 :lol: :wink: :wink:]]> :lol: :wink: :wink:]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: A toda la familia FW :: Reply by jose_murugosa]]> 2024-12-31T04:19:49-07:00 2024-12-31T04:19:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45270&p=276702#p276702 Para todos Uds. gracias en primer lugar por vuestra ayuda y buena voluntad, y el deseo de que el año que comienza pueda ser de prosperidad, salud y bienestar.
Que puedan alcanzar todas sus metas y puedan ver realizados sus deseos.]]>
Para todos Uds. gracias en primer lugar por vuestra ayuda y buena voluntad, y el deseo de que el año que comienza pueda ser de prosperidad, salud y bienestar.
Que puedan alcanzar todas sus metas y puedan ver realizados sus deseos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: A toda la familia FW :: Reply by groiss]]> 2024-12-31T11:13:51-07:00 2024-12-31T11:13:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45270&p=276706#p276706 Pasad buena salida y entrada de año
José Luis]]>
Pasad buena salida y entrada de año
José Luis]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: A toda la familia FW :: Reply by Manuel Aranda]]> 2025-01-01T04:24:17-07:00 2025-01-01T04:24:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45270&p=276710#p276710 <![CDATA[FiveWin para Harbour/xHarbour :: Stored Procs + Tdolphin :: Author jbrita]]> 2025-01-02T06:43:40-07:00 2025-01-02T06:43:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45276&p=276731#p276731 saludos]]> saludos]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Stored Procs + Tdolphin :: Reply by Antonio Linares]]> 2025-01-02T08:16:18-07:00 2025-01-02T08:16:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45276&p=276732#p276732 https://tdolphin.blogspot.com/
Procedimientos Almacenados / stored Procedures
Creamos el procedimiento almacenado desde el cliente mysql de nuestra preferencia


DELIMITER $
DROP PROCEDURE IF EXISTS born_in_year;
CREATE PROCEDURE born_in_year( year_of_birth INT )
BEGIN
SELECT first_name, last_name, birth, death from president where year( birth ) = year_of_birth;
END $
DELIMITER ;

para ejecutarlo simplemento lo hacenmos pro medio de un query


cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )

el siguiente llamdo es importante para "terminar" el proceso
oServer:NextResult()

veammos el ejemplo completo


#include "tdolphin.ch"

#define CRLF Chr( 13 ) + Chr( 10 )

PROCEDURE Main()

LOCAL cText := ""
LOCAL oQry, oServer

SET CENTURY ON
SET DATE FORMAT "dd/mm/yyyy"

D_SetCaseSensitive( .T. )

IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
cls

cText = "CALL born_in_year( 1908 )"

oQry := oServer:Query( cText )

DolphinBrw( oQry, "Test" )

oServer:NextResult()

oQry:End()

cText = "CALL born_in_year( 1913 )"

oQry := oServer:Query( cText )

DolphinBrw( oQry, "Test" )

oServer:NextResult()

oQry:End()

cText = "call count_born_in_year( 1913, @count )"

oQry := oServer:Execute( cText )

oServer:NextResult()

oQry := oServer:Query( "select @count as count" )

? "count is:"
?? oQry:count

oQry:End()



RETURN









esto verifica que no exista otro query con resultado (por motivos de posibles multiples sentencias en los precedimeintos) y cierra el ciclo de existir otro query con resultado deberiamos hacer lo siguiente

oQry:LoadNextQuery( )

asi cargamnos automaticamente el proximo resultado de un query para multi sentencias

ejemplo de multiples sentencias


#include "tdolphin.ch"


FUNCTION Main()

LOCAL oServer, oQry

D_SetCaseSensitive( .T. )
Set_MyLang( "esp" )

IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF

oQry = oServer:Query( "select * from president; select * from student" )

DolphinBrw( oQry, "President" )

oQry:LoadNextQuery( )

DolphinBrw( oQry, "Student" )

oQry = NIL

oServer:End()

RETURN NIL


#include "connto.prg"
#include "brw.prg"




]]>
https://tdolphin.blogspot.com/
Procedimientos Almacenados / stored Procedures
Creamos el procedimiento almacenado desde el cliente mysql de nuestra preferencia


DELIMITER $
DROP PROCEDURE IF EXISTS born_in_year;
CREATE PROCEDURE born_in_year( year_of_birth INT )
BEGIN
SELECT first_name, last_name, birth, death from president where year( birth ) = year_of_birth;
END $
DELIMITER ;

para ejecutarlo simplemento lo hacenmos pro medio de un query


cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )

el siguiente llamdo es importante para "terminar" el proceso
oServer:NextResult()

veammos el ejemplo completo


#include "tdolphin.ch"

#define CRLF Chr( 13 ) + Chr( 10 )

PROCEDURE Main()

LOCAL cText := ""
LOCAL oQry, oServer

SET CENTURY ON
SET DATE FORMAT "dd/mm/yyyy"

D_SetCaseSensitive( .T. )

IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
cls

cText = "CALL born_in_year( 1908 )"

oQry := oServer:Query( cText )

DolphinBrw( oQry, "Test" )

oServer:NextResult()

oQry:End()

cText = "CALL born_in_year( 1913 )"

oQry := oServer:Query( cText )

DolphinBrw( oQry, "Test" )

oServer:NextResult()

oQry:End()

cText = "call count_born_in_year( 1913, @count )"

oQry := oServer:Execute( cText )

oServer:NextResult()

oQry := oServer:Query( "select @count as count" )

? "count is:"
?? oQry:count

oQry:End()



RETURN









esto verifica que no exista otro query con resultado (por motivos de posibles multiples sentencias en los precedimeintos) y cierra el ciclo de existir otro query con resultado deberiamos hacer lo siguiente

oQry:LoadNextQuery( )

asi cargamnos automaticamente el proximo resultado de un query para multi sentencias

ejemplo de multiples sentencias


#include "tdolphin.ch"


FUNCTION Main()

LOCAL oServer, oQry

D_SetCaseSensitive( .T. )
Set_MyLang( "esp" )

IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF

oQry = oServer:Query( "select * from president; select * from student" )

DolphinBrw( oQry, "President" )

oQry:LoadNextQuery( )

DolphinBrw( oQry, "Student" )

oQry = NIL

oServer:End()

RETURN NIL


#include "connto.prg"
#include "brw.prg"




]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Stored Procs + Tdolphin :: Reply by jbrita]]> 2025-01-03T05:01:05-07:00 2025-01-03T05:01:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45276&p=276740#p276740 Saludos]]> Saludos]]> <![CDATA[FiveWin para Harbour/xHarbour :: Actualizaciones automaticas :: Author quim]]> 2025-01-03T03:13:56-07:00 2025-01-03T03:13:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276739#p276739
He utilizado por años el magnífico sistema que propuso en su dia Biel Maimó, para las actualizaciones automáticas de nuestros programas via internet
https://bielsys.blogspot.com/2009/04/ac ... ca-de.html

Con las ultimas actualizaciones de Windows 11 y algunas de Windows 10 me encuentro con una serie de restricciones que estos sistemas van imponiendo en cuanto a seguridad

Entiendo que para actualizar un programa via internet existen almenos 2 enfoques :

1) Instalador externo (inno setup, nsis, ...)
  • Comprobar via red que la version remota sea posterior a la version local
    Bajar un programa instalador, que elimine nuestra app exe, escriba la nueva y lance de nuevo nuestro programa
    Para ello, dicho instalador preguntará al usuario si acepta y que necesita cerrar el programa en ejecución para poder proceder
    Si el usuario deniega, entonces la actualización no prospera
    Un ejemplo lo tenemos con las actualizaciones del editor Notepad++, que nos avisa de una nueva versión pero que si no la aceptamos, no se actualiza
    Como ventaja al aceptar la nueva instalación, es que el proceso se podrá realizar sin problemas de firewall, advertencias, etc

2) Actualizar a la 'Biel'
  • Comprobar por FTP si existe nueva version (por ejemplo, por comparacion de fecha del exe y tamaño)
    Bajar por FTP el exe del programa renombrado, por ejemplo anteponiendo "_"
    Lanzar un ejecutable con ShellExecute (Biel lo escribe en C) y al mismo tiempo cerrar con un PostQuitMessage nuestro programa en ejecucion
    El anterior exe borra el programa en ejecución, renombra el programa bajado quitando "_" inicial y llama a ejecutar la nueva versión
    Hasta ahora, este sistema aportaba la ventaja de que las actualizaciones no dependen de la aceptacion del usuario
Todas las operaciones del metodo 2 activan varias alertas al usuario, hay que autorizar en el firewall que se puedan ejecutar los exe
Cada vez los sistemas Windows son más restrictivos con estas prácticas, hay que dar muchas explicaciones a los usuarios, plantearse firmar digitalmente nuestros programas, etc

En definitiva, abro debate... como actualizan sus programas ?

Saludos]]>

He utilizado por años el magnífico sistema que propuso en su dia Biel Maimó, para las actualizaciones automáticas de nuestros programas via internet
https://bielsys.blogspot.com/2009/04/ac ... ca-de.html

Con las ultimas actualizaciones de Windows 11 y algunas de Windows 10 me encuentro con una serie de restricciones que estos sistemas van imponiendo en cuanto a seguridad

Entiendo que para actualizar un programa via internet existen almenos 2 enfoques :

1) Instalador externo (inno setup, nsis, ...)
  • Comprobar via red que la version remota sea posterior a la version local
    Bajar un programa instalador, que elimine nuestra app exe, escriba la nueva y lance de nuevo nuestro programa
    Para ello, dicho instalador preguntará al usuario si acepta y que necesita cerrar el programa en ejecución para poder proceder
    Si el usuario deniega, entonces la actualización no prospera
    Un ejemplo lo tenemos con las actualizaciones del editor Notepad++, que nos avisa de una nueva versión pero que si no la aceptamos, no se actualiza
    Como ventaja al aceptar la nueva instalación, es que el proceso se podrá realizar sin problemas de firewall, advertencias, etc

2) Actualizar a la 'Biel'
  • Comprobar por FTP si existe nueva version (por ejemplo, por comparacion de fecha del exe y tamaño)
    Bajar por FTP el exe del programa renombrado, por ejemplo anteponiendo "_"
    Lanzar un ejecutable con ShellExecute (Biel lo escribe en C) y al mismo tiempo cerrar con un PostQuitMessage nuestro programa en ejecucion
    El anterior exe borra el programa en ejecución, renombra el programa bajado quitando "_" inicial y llama a ejecutar la nueva versión
    Hasta ahora, este sistema aportaba la ventaja de que las actualizaciones no dependen de la aceptacion del usuario
Todas las operaciones del metodo 2 activan varias alertas al usuario, hay que autorizar en el firewall que se puedan ejecutar los exe
Cada vez los sistemas Windows son más restrictivos con estas prácticas, hay que dar muchas explicaciones a los usuarios, plantearse firmar digitalmente nuestros programas, etc

En definitiva, abro debate... como actualizan sus programas ?

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by Carles]]> 2025-01-06T23:30:11-07:00 2025-01-06T23:30:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276784#p276784
El proceso de actualización está directamente relacionado a como tu lo quieres hacer desde tu propia aplicación. Desde bajarte un zip, un installer, renombrar exe,… lo que que ha cambiado radicalmente bastante es el extremado control en conseguir ese paquete/actualización/installer ya que podeis observar que a la minima los antivirus saltan.

Una de las maneras es firmando tus exes con algún certificado de programa y colgarlo para su distribución con alguna web que no tenga mala reputación. Puedes bajártelo desde algún servidor privado,… al final el cuello de botella donde se va a tener la mayoría de problemas es cuando lo recibas en tu ordenador y el antivirus salta.

El problema aquí es que un certificado de programa es muy caro, es lo que hay. Yo lo que he probado últimamente es firmarlo usando el e-DNI. Puedes consultar las propiedades del programa y aparece toda la información y lo mas importante, el antivirus no salto tanto. La mayotia quizás no lo haya utilizado nunca, pero puedes actualizar tu password SOLO desde las máquinas donde renuevan los DNI's. El proceso es rapido y no tiene dificultad.

No conozco otra manera para “saltarse” ese control del antivirus que da continuamente esos falsos positivos…. (sin tener que poner excepciones en el propio antivirus claro).

C.]]>

El proceso de actualización está directamente relacionado a como tu lo quieres hacer desde tu propia aplicación. Desde bajarte un zip, un installer, renombrar exe,… lo que que ha cambiado radicalmente bastante es el extremado control en conseguir ese paquete/actualización/installer ya que podeis observar que a la minima los antivirus saltan.

Una de las maneras es firmando tus exes con algún certificado de programa y colgarlo para su distribución con alguna web que no tenga mala reputación. Puedes bajártelo desde algún servidor privado,… al final el cuello de botella donde se va a tener la mayoría de problemas es cuando lo recibas en tu ordenador y el antivirus salta.

El problema aquí es que un certificado de programa es muy caro, es lo que hay. Yo lo que he probado últimamente es firmarlo usando el e-DNI. Puedes consultar las propiedades del programa y aparece toda la información y lo mas importante, el antivirus no salto tanto. La mayotia quizás no lo haya utilizado nunca, pero puedes actualizar tu password SOLO desde las máquinas donde renuevan los DNI's. El proceso es rapido y no tiene dificultad.

No conozco otra manera para “saltarse” ese control del antivirus que da continuamente esos falsos positivos…. (sin tener que poner excepciones en el propio antivirus claro).

C.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by quim_]]> 2025-01-07T07:47:01-07:00 2025-01-07T07:47:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276800#p276800
Efectivamente, el cuello de botella está en que si la aplicación no está firmada digitalmente y con una Autoridad reconocida, todo lo que hagas al final va a tener que ser autorizado por el usuario para que se pueda ejecutar si o si, a través de firewall o del propio antivirus

En esto las aplicaciones web basadas en un navegador, superan este tipo de inconvenientes, ya que la actualización es 'invisible' al usuario

Seguiremos investigando ...

Saludos]]>

Efectivamente, el cuello de botella está en que si la aplicación no está firmada digitalmente y con una Autoridad reconocida, todo lo que hagas al final va a tener que ser autorizado por el usuario para que se pueda ejecutar si o si, a través de firewall o del propio antivirus

En esto las aplicaciones web basadas en un navegador, superan este tipo de inconvenientes, ya que la actualización es 'invisible' al usuario

Seguiremos investigando ...

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by Carles]]> 2025-01-07T08:09:43-07:00 2025-01-07T08:09:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276802#p276802
Has probado de firmar con el dni para prueba ?

C.]]>

Has probado de firmar con el dni para prueba ?

C.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by quim_]]> 2025-01-07T09:32:45-07:00 2025-01-07T09:32:45-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276805#p276805
Carles wrote: Tue Jan 07, 2025 3:09 pm Quim,

Has probado de firmar con el dni para prueba ?

C.
No lo he probado. El tema de mi DNI personal para una aplicacion tipo ERP de empresa, no me parece muy adecuado. Toca comprar uno adecuado y como dices es caro

Además cualquier programa que intente 'comunicar con el exterior' via FTP, etc para obtener la actualización, también salta la liebre de Windows Defender o cualquier otro aunque vaya firmado y el usuario tiene que autorizar el firewall para su uso

Me gustaria saber cómo lo hacen programas tipo Visual Studio Code, que al cerrar, ves una ventanita de conexión que actualiza rápidamente cualquier cambio de version, supongo que al ser aplicaciones 'empaquetadas' con Electron o similar, lo tienen mas facil

En fin, no quiero ser persimista pero creo que vamos asistiendo al asesinato de los exe de libre distribución, en detrimento de las store de las multinacionales]]>
Carles wrote: Tue Jan 07, 2025 3:09 pm Quim,

Has probado de firmar con el dni para prueba ?

C.
No lo he probado. El tema de mi DNI personal para una aplicacion tipo ERP de empresa, no me parece muy adecuado. Toca comprar uno adecuado y como dices es caro

Además cualquier programa que intente 'comunicar con el exterior' via FTP, etc para obtener la actualización, también salta la liebre de Windows Defender o cualquier otro aunque vaya firmado y el usuario tiene que autorizar el firewall para su uso

Me gustaria saber cómo lo hacen programas tipo Visual Studio Code, que al cerrar, ves una ventanita de conexión que actualiza rápidamente cualquier cambio de version, supongo que al ser aplicaciones 'empaquetadas' con Electron o similar, lo tienen mas facil

En fin, no quiero ser persimista pero creo que vamos asistiendo al asesinato de los exe de libre distribución, en detrimento de las store de las multinacionales]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by Cesar_SCS]]> 2025-01-07T11:47:57-07:00 2025-01-07T11:47:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276807#p276807 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by paquitohm]]> 2025-01-07T12:21:30-07:00 2025-01-07T12:21:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276810#p276810
Cesar_SCS wrote: Tue Jan 07, 2025 6:47 pm Si es un .exe para windows porque molesta el mismo windows? :roll:
Si es un .apk para Android porque molesta al mismo Android ?
Si es un .... ?

Se supone que el tema va por seguridad. Quien no ha sufrido un ramsonware o conoce a alguien o tiene un cliente al que le ha pasado ?
Se trataria de que quieren que el .exe este certificado para conocer de que empresa viene y asi saber si es seguro.

Pero claro, la seguridad hoy dia es la excusa para meterse hasta el fondo de la cocina o debajo de la cama.
Sin ir mas lejos hoy Trump insiste en quedarse con Groenlandia "por seguridad":
ADMINISTRACIÓN TRUMP
Trump se reafirma en su interés en Groenlandia: «La necesitamos por razones de seguridad nacional»]]>
Cesar_SCS wrote: Tue Jan 07, 2025 6:47 pm Si es un .exe para windows porque molesta el mismo windows? :roll:
Si es un .apk para Android porque molesta al mismo Android ?
Si es un .... ?

Se supone que el tema va por seguridad. Quien no ha sufrido un ramsonware o conoce a alguien o tiene un cliente al que le ha pasado ?
Se trataria de que quieren que el .exe este certificado para conocer de que empresa viene y asi saber si es seguro.

Pero claro, la seguridad hoy dia es la excusa para meterse hasta el fondo de la cocina o debajo de la cama.
Sin ir mas lejos hoy Trump insiste en quedarse con Groenlandia "por seguridad":
ADMINISTRACIÓN TRUMP
Trump se reafirma en su interés en Groenlandia: «La necesitamos por razones de seguridad nacional»]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Actualizaciones automaticas :: Reply by Cesar_SCS]]> 2025-01-07T12:30:04-07:00 2025-01-07T12:30:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45277&p=276812#p276812 :D :D :D]]> :D :D :D]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: WhatsAaa :: Reply by vinpug]]> 2025-01-08T05:29:30-07:00 2025-01-08T05:29:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45197&p=276826#p276826 <![CDATA[FiveWin para Harbour/xHarbour :: Re: WhatsAaa :: Reply by karinha]]> 2025-01-08T08:03:36-07:00 2025-01-08T08:03:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45197&p=276829#p276829 https://forums.fivetechsupport.com/view ... 26f49504ae

Regards, saludos.]]>
https://forums.fivetechsupport.com/view ... 26f49504ae

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: CODIGO QR EN DOCUMENTO CON TPRINTER :: Author kpidata]]> 2025-01-06T14:15:56-07:00 2025-01-06T14:15:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276781#p276781 <![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by Antonio Linares]]> 2025-01-06T23:40:55-07:00 2025-01-06T23:40:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276786#p276786 https://forums.fivetechsupport.com/view ... hp?t=43100]]> https://forums.fivetechsupport.com/view ... hp?t=43100]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by karinha]]> 2025-01-07T07:15:46-07:00 2025-01-07T07:15:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276798#p276798

Code: Select all | Expand

// Our first DialogBox sample

#include "FiveWin.ch"
#include "ttitle.ch"

#define HTTPREQUEST_PROXYSETTING_PROXY 2

// Para xHarbour

#ifdef __XHARBOUR__
#xtranslate hb_DateTime([<x,...>]) => DateTime(<x>)
#xtranslate hb_tstostr([<x>]) => TToS(<x>)
#xtranslate hb_stot([<x>]) => SToT(<x>)
#xtranslate hb_ttod([<x>]) => TToD(<x>)
#xtranslate hb_hour([<x>]) => Hour(<x>)
#xtranslate hb_minute([<x>]) => Minute(<x>)
#xtranslate hb_sec([<x>]) => Secs(<x>)
#xtranslate hb_NumToHex([<x>]) => NumToHex(<x>)
#xtranslate hb_StrFormat([<x,...>]) => StrFormat(<x>)
#xtranslate <x>:__EnumIndex => hb_EnumIndex
#endif

MEMVAR SEQUENC

FUNCTION Main()

   LOCAL obmp , cBmp
   LOCAL oDlg, oIco
   LOCAL ofont
   LOCAL cCode := space( 440 ) // maximo de 440 caracteres por qrcode.

   // Master Mastintin: con 431 caracteres el formato es invalido, porque?
   // Que me falta? Prueba porfa
   SEQUENC := "35141146377222003730599000004630001158179941|20141105134922|10.00|61694805808|m+4o8FY1lig1zcy6VU3t7INVwE6kiA/ykLXKDFZfb9gu0g4wl3Fk2HYaRhSt8G+yk9mP/R65m3R7V2IO8CxnmO1oVtlamB6UKA+UZZqDNEqtYlhQzLySNzMG0thaNMZsq5RxmQ3eQLPw8LLez3MqWvUveFXNSSq6AGEX2+KOdavteo3K2L06SQoVIjwkmcgRzqhfHP3y8t2wfr1nw/WAnaCF9ZY/K4dTykk3hsXcan/MKCTBlcSOhNgSh3sdsQHpl2w2tmbLBsYBLFkuvKlwzHarNJQ1RfRznGdojHglQH1KVtbAUXKke54pdRt3JL7nJlR+Lbmtd2tjcT2vRyTepw=="

   cCode := ALLTRIM( SEQUENC )

   DEFINE Font ofont NAME "Verdana" SIZE 0, 14

   DEFINE ICON oIco FILE "..\icons\fivewin.ico"

   DEFINE DIALOG oDlg TITLE "AdaptaPro Qrcode Generator" ;
      ICON oIco SIZE 350, 440

   @ 30, 24 IMAGE oBmp FILE cBmp OF oDlg size 128, 128 pixel NOBORDER

   oBmp:lTransparent := .T.

   // cargaBmp( "hola",oBmp )

   @ 160, 10 SAY "Introduce el codigo a generar :" size 100, 12 ;
      FONT oFont pixel OF oDlg

   @ 170, 10 GET cCode size 120, 12 FONT oFont pixel OF oDlg MEMO

   @ 205, 85 BUTTON "&Buscar" SIZE 40, 12 OF oDlg pixel ;
      FONT oFont ;
      ACTION cargaBmp( alltrim( cCode ) , oBmp )

   @ 205, 130 BUTTON "&Salir" SIZE 40, 12 pixel OF oDlg;
      FONT oFont ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT DlgBarTitle( oDlg, " Generador de Qrcode", "" , 44 ) ;
      ON PAINT DlgStatusBar( oDlg, 68, , .T. )

RETURN nil

//------------------------------------------------------------------------------

FUNCTION cargaBmp( cCode, oImage )

   LOCAL cResp, hDib
   LOCAL nZeroZeroClr
   LOCAL ogbmp := GdiBmp():new()
   LOCAL nHeight := 248
   LOCAL nWidth := 248
   LOCAL cUrl := "http://api.qrserver.com/v1/create-qr-code/?data="
   LOCAL nQuality := 1

   cUrl += GetSafeURL( hb_strtoutf8( cCode ) )
   cUrl += "&size=" + alltrim( str( nWidth ) ) + "x" + alltrim( str( nHeight ) )

   cResp := loadBmp( cUrl )

   IF !Empty( cResp )

      oGbmp:hbmp := GDIPLUSIMAGELOADPNGFROMSTR( cResp, len( cResp ) )

      oImage:hBitmap := oGBmp:GetGDIHbitmap()
      oImage:HasAlpha()
      oImage:Refresh()

      IF msgYesNo( " ¨ quiere grabar el codigo QR a Disco ?" )


         // oGBmp:save(".\qrcode.png" ) // FORMATO INVALIDO ?
         oImage:SaveImage( "qrcode.bmp", 0, nQuality )

      ENDIF

      oGbmp:End()

   ENDIF

   RETURN nil

STATIC FUNCTION GetSafeURL( cUrl )

   LOCAL cAsc
   LOCAL nChr
   LOCAL sHex
   LOCAL i
   LOCAL cGetSafeURL := ""

   FOR i = 1 TO Len( cUrl )
      cASC := substr( cUrl, i, 1 )
      nChr := Asc( cASC )

      IF ( nChr > 47 .AND. nChr < 58 ) .OR. ( nChr > 64 .AND. nChr < 91 ) .OR. ( nChr > 96 .AND. nChr < 123 )
         cGetSafeURL += cASC
      ELSE
         sHex := hb_NumtoHex( nChr )
         IF Len( sHex ) = 1
            cGetSafeURL += "%0" + sHex
         ELSE
            cGetSafeURL += "%" + sHex
         End IF
      End IF
   NEXT

RETURN cGetSafeURL

//------------------------------------------------------------------------------

FUNCTION loadBmp( cUrl )

   LOCAL oHttp
   LOCAL cResp := nil

// Try
   oHttp := CreateObject( "winhttp.winhttprequest.5.1" )

   oHttp:Open( "GET", cUrl, .F. )
   oHttp:Send()
   cResp := oHttp:ResponseBody()

// Catch
// MsgStop( "Error" )
// Return cResp
// End Try

RETURN cResp

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

FUNCTION DlgStatusBar( oDlg, nHeight, nCorrec , lColor )

   LOCAL nDlgHeight := oDlg:nHeight
   LOCAL aColor := { { 0.40, nRGB( 200, 200, 200 ), nRGB( 184, 184, 184 ) }, ;
      { 0.60, nRGB( 184, 184, 184 ), nRGB( 150, 150, 150 ) } }

   DEFAULT nHeight := 72
   DEFAULT nCorrec := 0
   DEFAULT lColor := .F.

   nDlgHeight := nDlgHeight + ncorrec

   IF lColor
      GradienTfill( oDlg:hDC, nDlgHeight - ( nHeight - 2 ), 0, nDlgHeight - 20, oDlg:nWidth, aColor , .T. )
      WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 0, nDlgHeight - ( nHeight ), oDlg:nWidth )
   ELSE
      WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 4, nDlgHeight - ( nHeight ), oDlg:nWidth - 10 )
   ENDIF

RETURN Nil

//------------------------------------------------------------------------------

FUNCTION DlgBarTitle( oWnd, cTitle, cBmp , nHeight )

   LOCAL oFont
   LOCAL oTitle
   LOCAL nColText := 180
   LOCAL nRowImg := 0

   DEFAULT cTitle := ""
   DEFAULT nHeight := 48

   IF nHeight < 48
      nColText := 60
      nRowImg := 12
      DEFINE FONT oFont NAME "Arial" size 10, 30
   ELSE
      DEFINE FONT oFont NAME "Arial" size 12, 30
   ENDIF

   @ - 1, - 1 TITLE oTitle size oWnd:nWidth + 1, nHeight + 1 of oWnd SHADOWSIZE 0

   @ nRowImg, 10 TITLEIMG OF oTitle BITMAP cBmp SIZE 48, 48 REFLEX ;
      TRANSPARENT

   @ nRowImg - 2 , nColText TITLETEXT OF oTitle TEXT cTitle COLOR CLR_BLACK FONT oFont

   oTitle:aGrdBack := { { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } }
   oTitle:nShadowIntensity = 0
   oTitle:nShadow = 0
   oTitle:nClrLine1 := nrgb( 0, 0, 0 )
   oTitle:nClrLine2 := RGB( 229, 233, 238 )
   oWnd:oTop := oTitle

RETURN oTitle
Regards, saludos.]]>

Code: Select all | Expand

// Our first DialogBox sample

#include "FiveWin.ch"
#include "ttitle.ch"

#define HTTPREQUEST_PROXYSETTING_PROXY 2

// Para xHarbour

#ifdef __XHARBOUR__
#xtranslate hb_DateTime([<x,...>]) => DateTime(<x>)
#xtranslate hb_tstostr([<x>]) => TToS(<x>)
#xtranslate hb_stot([<x>]) => SToT(<x>)
#xtranslate hb_ttod([<x>]) => TToD(<x>)
#xtranslate hb_hour([<x>]) => Hour(<x>)
#xtranslate hb_minute([<x>]) => Minute(<x>)
#xtranslate hb_sec([<x>]) => Secs(<x>)
#xtranslate hb_NumToHex([<x>]) => NumToHex(<x>)
#xtranslate hb_StrFormat([<x,...>]) => StrFormat(<x>)
#xtranslate <x>:__EnumIndex => hb_EnumIndex
#endif

MEMVAR SEQUENC

FUNCTION Main()

   LOCAL obmp , cBmp
   LOCAL oDlg, oIco
   LOCAL ofont
   LOCAL cCode := space( 440 ) // maximo de 440 caracteres por qrcode.

   // Master Mastintin: con 431 caracteres el formato es invalido, porque?
   // Que me falta? Prueba porfa
   SEQUENC := "35141146377222003730599000004630001158179941|20141105134922|10.00|61694805808|m+4o8FY1lig1zcy6VU3t7INVwE6kiA/ykLXKDFZfb9gu0g4wl3Fk2HYaRhSt8G+yk9mP/R65m3R7V2IO8CxnmO1oVtlamB6UKA+UZZqDNEqtYlhQzLySNzMG0thaNMZsq5RxmQ3eQLPw8LLez3MqWvUveFXNSSq6AGEX2+KOdavteo3K2L06SQoVIjwkmcgRzqhfHP3y8t2wfr1nw/WAnaCF9ZY/K4dTykk3hsXcan/MKCTBlcSOhNgSh3sdsQHpl2w2tmbLBsYBLFkuvKlwzHarNJQ1RfRznGdojHglQH1KVtbAUXKke54pdRt3JL7nJlR+Lbmtd2tjcT2vRyTepw=="

   cCode := ALLTRIM( SEQUENC )

   DEFINE Font ofont NAME "Verdana" SIZE 0, 14

   DEFINE ICON oIco FILE "..\icons\fivewin.ico"

   DEFINE DIALOG oDlg TITLE "AdaptaPro Qrcode Generator" ;
      ICON oIco SIZE 350, 440

   @ 30, 24 IMAGE oBmp FILE cBmp OF oDlg size 128, 128 pixel NOBORDER

   oBmp:lTransparent := .T.

   // cargaBmp( "hola",oBmp )

   @ 160, 10 SAY "Introduce el codigo a generar :" size 100, 12 ;
      FONT oFont pixel OF oDlg

   @ 170, 10 GET cCode size 120, 12 FONT oFont pixel OF oDlg MEMO

   @ 205, 85 BUTTON "&Buscar" SIZE 40, 12 OF oDlg pixel ;
      FONT oFont ;
      ACTION cargaBmp( alltrim( cCode ) , oBmp )

   @ 205, 130 BUTTON "&Salir" SIZE 40, 12 pixel OF oDlg;
      FONT oFont ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT DlgBarTitle( oDlg, " Generador de Qrcode", "" , 44 ) ;
      ON PAINT DlgStatusBar( oDlg, 68, , .T. )

RETURN nil

//------------------------------------------------------------------------------

FUNCTION cargaBmp( cCode, oImage )

   LOCAL cResp, hDib
   LOCAL nZeroZeroClr
   LOCAL ogbmp := GdiBmp():new()
   LOCAL nHeight := 248
   LOCAL nWidth := 248
   LOCAL cUrl := "http://api.qrserver.com/v1/create-qr-code/?data="
   LOCAL nQuality := 1

   cUrl += GetSafeURL( hb_strtoutf8( cCode ) )
   cUrl += "&size=" + alltrim( str( nWidth ) ) + "x" + alltrim( str( nHeight ) )

   cResp := loadBmp( cUrl )

   IF !Empty( cResp )

      oGbmp:hbmp := GDIPLUSIMAGELOADPNGFROMSTR( cResp, len( cResp ) )

      oImage:hBitmap := oGBmp:GetGDIHbitmap()
      oImage:HasAlpha()
      oImage:Refresh()

      IF msgYesNo( " ¨ quiere grabar el codigo QR a Disco ?" )


         // oGBmp:save(".\qrcode.png" ) // FORMATO INVALIDO ?
         oImage:SaveImage( "qrcode.bmp", 0, nQuality )

      ENDIF

      oGbmp:End()

   ENDIF

   RETURN nil

STATIC FUNCTION GetSafeURL( cUrl )

   LOCAL cAsc
   LOCAL nChr
   LOCAL sHex
   LOCAL i
   LOCAL cGetSafeURL := ""

   FOR i = 1 TO Len( cUrl )
      cASC := substr( cUrl, i, 1 )
      nChr := Asc( cASC )

      IF ( nChr > 47 .AND. nChr < 58 ) .OR. ( nChr > 64 .AND. nChr < 91 ) .OR. ( nChr > 96 .AND. nChr < 123 )
         cGetSafeURL += cASC
      ELSE
         sHex := hb_NumtoHex( nChr )
         IF Len( sHex ) = 1
            cGetSafeURL += "%0" + sHex
         ELSE
            cGetSafeURL += "%" + sHex
         End IF
      End IF
   NEXT

RETURN cGetSafeURL

//------------------------------------------------------------------------------

FUNCTION loadBmp( cUrl )

   LOCAL oHttp
   LOCAL cResp := nil

// Try
   oHttp := CreateObject( "winhttp.winhttprequest.5.1" )

   oHttp:Open( "GET", cUrl, .F. )
   oHttp:Send()
   cResp := oHttp:ResponseBody()

// Catch
// MsgStop( "Error" )
// Return cResp
// End Try

RETURN cResp

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

FUNCTION DlgStatusBar( oDlg, nHeight, nCorrec , lColor )

   LOCAL nDlgHeight := oDlg:nHeight
   LOCAL aColor := { { 0.40, nRGB( 200, 200, 200 ), nRGB( 184, 184, 184 ) }, ;
      { 0.60, nRGB( 184, 184, 184 ), nRGB( 150, 150, 150 ) } }

   DEFAULT nHeight := 72
   DEFAULT nCorrec := 0
   DEFAULT lColor := .F.

   nDlgHeight := nDlgHeight + ncorrec

   IF lColor
      GradienTfill( oDlg:hDC, nDlgHeight - ( nHeight - 2 ), 0, nDlgHeight - 20, oDlg:nWidth, aColor , .T. )
      WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 0, nDlgHeight - ( nHeight ), oDlg:nWidth )
   ELSE
      WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 4, nDlgHeight - ( nHeight ), oDlg:nWidth - 10 )
   ENDIF

RETURN Nil

//------------------------------------------------------------------------------

FUNCTION DlgBarTitle( oWnd, cTitle, cBmp , nHeight )

   LOCAL oFont
   LOCAL oTitle
   LOCAL nColText := 180
   LOCAL nRowImg := 0

   DEFAULT cTitle := ""
   DEFAULT nHeight := 48

   IF nHeight < 48
      nColText := 60
      nRowImg := 12
      DEFINE FONT oFont NAME "Arial" size 10, 30
   ELSE
      DEFINE FONT oFont NAME "Arial" size 12, 30
   ENDIF

   @ - 1, - 1 TITLE oTitle size oWnd:nWidth + 1, nHeight + 1 of oWnd SHADOWSIZE 0

   @ nRowImg, 10 TITLEIMG OF oTitle BITMAP cBmp SIZE 48, 48 REFLEX ;
      TRANSPARENT

   @ nRowImg - 2 , nColText TITLETEXT OF oTitle TEXT cTitle COLOR CLR_BLACK FONT oFont

   oTitle:aGrdBack := { { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } }
   oTitle:nShadowIntensity = 0
   oTitle:nShadow = 0
   oTitle:nClrLine1 := nrgb( 0, 0, 0 )
   oTitle:nClrLine2 := RGB( 229, 233, 238 )
   oWnd:oTop := oTitle

RETURN oTitle
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by FiveWiDi]]> 2025-01-07T14:54:33-07:00 2025-01-07T14:54:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276817#p276817
Yo lo hago así.

En el inicio del PRG:

// Para usar QR precisa de "REQUEST FWZEBRA"
REQUEST FWZEBRA


Donde corresponda de tu código para imprimir el documento:

@ 1.0, 8.75 PRINT TO oPrinter TEXT ;
"Texto que contiene los valores que deseas" ;
AS BARCODE TYPE "QR-CODE" SIZE 3.5, 3.5 CM // 0.5, 0.5 INCHES]]>

Yo lo hago así.

En el inicio del PRG:

// Para usar QR precisa de "REQUEST FWZEBRA"
REQUEST FWZEBRA


Donde corresponda de tu código para imprimir el documento:

@ 1.0, 8.75 PRINT TO oPrinter TEXT ;
"Texto que contiene los valores que deseas" ;
AS BARCODE TYPE "QR-CODE" SIZE 3.5, 3.5 CM // 0.5, 0.5 INCHES]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by sysctrl2]]> 2025-01-08T11:42:18-07:00 2025-01-08T11:42:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276834#p276834
gracias !]]>

gracias !]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by karinha]]> 2025-01-08T12:13:08-07:00 2025-01-08T12:13:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276835#p276835

Code: Select all | Expand

Pasta de c:\XHBBCC77\lib

09/10/2024  10:55            53.248 hbzebra.lib
Regards, saludos.]]>

Code: Select all | Expand

Pasta de c:\XHBBCC77\lib

09/10/2024  10:55            53.248 hbzebra.lib
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by Cesar_SCS]]> 2025-01-08T12:50:54-07:00 2025-01-08T12:50:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276836#p276836 voy a probar
gracias !]]>
voy a probar
gracias !]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by sysctrl2]]> 2025-01-08T15:35:21-07:00 2025-01-08T15:35:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276837#p276837
//oPrn:Say()

Code: Select all | Expand

#INCLUDE <fivewin.ch>

STATIC oPrn
STATIC nRow
STATIC nRowStep
STATIC nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66

FUNCTION Main()
   LOCAL cCia := "SysCtrl Software"
   LOCAL cCalle := "CERRA CORAL SN"
   LOCAL cColonia := "RESIDENCIAL DEL NORTE"
   LOCAL cLocalidad := "CDMX"
   LOCAL cUrl := "sysctrl.com.mx"
   LOCAL oFont,oFontBig, oPen

   nRow := 1

   PRINTER oPrn PREVIEW NAME 'SysCtrl Report'

   oPrn:lPrvModal := .t.
   oPrn:SetPage(1)  // carta
   oPrn:SetPortrait()

   if ! oPrn:setup()
      return nil
   endif

   DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20   OF oPrn BOLD
   DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28   OF oPrn BOLD
   DEFINE PEN  oPen COLOR CLR_BLACK OF oPrn

   nRowStep := oPrn:nVertRes() / nHightPage
   nColStep := oPrn:nHorzRes() / nWidthPage

   IF Empty( oPrn:hDC )
      oPrn:end()
      MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
      RETURN NIL
   ENDIF
   PAGE

   nRow += nRowStep * 2

   SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )

   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
   nRow += nRowStep * 4
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
   nRow += nRowStep * 2
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
   nRow += nRowStep * 2
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
   nRow += nRowStep * 3
   oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
  nRow += nRowStep*.5

   ENDPAGE
   ENDPRINT

RETURN (.T.)

FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
   LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
   oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL

INIT PROCEDURE Setup()
   REQUEST FWZEBRA //codigos de barra o QR tipo zebra
RETURN

Image]]>

//oPrn:Say()

Code: Select all | Expand

#INCLUDE <fivewin.ch>

STATIC oPrn
STATIC nRow
STATIC nRowStep
STATIC nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66

FUNCTION Main()
   LOCAL cCia := "SysCtrl Software"
   LOCAL cCalle := "CERRA CORAL SN"
   LOCAL cColonia := "RESIDENCIAL DEL NORTE"
   LOCAL cLocalidad := "CDMX"
   LOCAL cUrl := "sysctrl.com.mx"
   LOCAL oFont,oFontBig, oPen

   nRow := 1

   PRINTER oPrn PREVIEW NAME 'SysCtrl Report'

   oPrn:lPrvModal := .t.
   oPrn:SetPage(1)  // carta
   oPrn:SetPortrait()

   if ! oPrn:setup()
      return nil
   endif

   DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20   OF oPrn BOLD
   DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28   OF oPrn BOLD
   DEFINE PEN  oPen COLOR CLR_BLACK OF oPrn

   nRowStep := oPrn:nVertRes() / nHightPage
   nColStep := oPrn:nHorzRes() / nWidthPage

   IF Empty( oPrn:hDC )
      oPrn:end()
      MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
      RETURN NIL
   ENDIF
   PAGE

   nRow += nRowStep * 2

   SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )

   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
   nRow += nRowStep * 4
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
   nRow += nRowStep * 2
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
   nRow += nRowStep * 2
   oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
   nRow += nRowStep * 3
   oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
  nRow += nRowStep*.5

   ENDPAGE
   ENDPRINT

RETURN (.T.)

FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
   LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
   oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL

INIT PROCEDURE Setup()
   REQUEST FWZEBRA //codigos de barra o QR tipo zebra
RETURN

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by Antonio Linares]]> 2025-01-09T01:30:55-07:00 2025-01-09T01:30:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276838#p276838
Muchas gracias! :)]]>

Muchas gracias! :)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by karinha]]> 2025-01-09T07:31:31-07:00 2025-01-09T07:31:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276845#p276845

Code: Select all | Expand

// https://forums.fivetechsupport.com/viewtopic.php?p=276837#p276837

// C:\FWH\SAMPLES\QRCODE4.PRG

#Include "fivewin.ch"

STATIC oPrn, nRow, nRowStep, nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66

FUNCTION Main()

   LOCAL cCia       := "SysCtrl Software"
   LOCAL cCalle     := "CERRA CORAL SN"
   LOCAL cColonia   := "RESIDENCIAL DEL NORTE"
   LOCAL cLocalidad := "CDMX"
   LOCAL cUrl       := "sysctrl.com.mx"
   LOCAL oFont, oFontBig, oPen

   nRow := 1

   PRINTER oPrn PREVIEW NAME 'SysCtrl Report'

      oPrn:lPrvModal := .t.
      oPrn:SetPage(1)  // carta
      oPrn:SetPortrait()

      IF .NOT. oPrn:Setup()

         RETURN NIL

      ENDIF

      DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20    OF oPrn BOLD
      DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
      DEFINE PEN  oPen COLOR CLR_BLACK OF oPrn

      nRowStep := oPrn:nVertRes() / nHightPage
      nColStep := oPrn:nHorzRes() / nWidthPage

      IF Empty( oPrn:hDC )

         oPrn:end()

         MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )

         RETURN NIL

      ENDIF

      PAGE

         nRow += nRowStep * 2

         SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )

         nRow += nRowStep * 4

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )

         nRow += nRowStep * 2

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )

         nRow += nRowStep * 2

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )

         nRow += nRowStep * 3

         oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )

         nRow += nRowStep*.5

      ENDPAGE

   ENDPRINT

   oFont:End()
   oFontBig:End()
   oPen:End()

RETURN NIL // (.T.)

FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )

   LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)

   oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )

RETURN NIL

INIT PROCEDURE Setup()

   REQUEST FWZEBRA // codigos de barra o QR tipo zebra

RETURN

// FIN / END
Regards, saludos.]]>

Code: Select all | Expand

// https://forums.fivetechsupport.com/viewtopic.php?p=276837#p276837

// C:\FWH\SAMPLES\QRCODE4.PRG

#Include "fivewin.ch"

STATIC oPrn, nRow, nRowStep, nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66

FUNCTION Main()

   LOCAL cCia       := "SysCtrl Software"
   LOCAL cCalle     := "CERRA CORAL SN"
   LOCAL cColonia   := "RESIDENCIAL DEL NORTE"
   LOCAL cLocalidad := "CDMX"
   LOCAL cUrl       := "sysctrl.com.mx"
   LOCAL oFont, oFontBig, oPen

   nRow := 1

   PRINTER oPrn PREVIEW NAME 'SysCtrl Report'

      oPrn:lPrvModal := .t.
      oPrn:SetPage(1)  // carta
      oPrn:SetPortrait()

      IF .NOT. oPrn:Setup()

         RETURN NIL

      ENDIF

      DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20    OF oPrn BOLD
      DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
      DEFINE PEN  oPen COLOR CLR_BLACK OF oPrn

      nRowStep := oPrn:nVertRes() / nHightPage
      nColStep := oPrn:nHorzRes() / nWidthPage

      IF Empty( oPrn:hDC )

         oPrn:end()

         MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )

         RETURN NIL

      ENDIF

      PAGE

         nRow += nRowStep * 2

         SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )

         nRow += nRowStep * 4

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )

         nRow += nRowStep * 2

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )

         nRow += nRowStep * 2

         oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )

         nRow += nRowStep * 3

         oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )

         nRow += nRowStep*.5

      ENDPAGE

   ENDPRINT

   oFont:End()
   oFontBig:End()
   oPen:End()

RETURN NIL // (.T.)

FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )

   LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)

   oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )

RETURN NIL

INIT PROCEDURE Setup()

   REQUEST FWZEBRA // codigos de barra o QR tipo zebra

RETURN

// FIN / END
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: CODIGO QR EN DOCUMENTO CON TPRINTER :: Reply by sysctrl2]]> 2025-01-09T10:20:49-07:00 2025-01-09T10:20:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45281&p=276847#p276847 que 2025 sea productivo :shock:]]> que 2025 sea productivo :shock:]]> <![CDATA[FiveWin para Harbour/xHarbour :: Habla con tu database usando lenguaje natural :: Author Antonio Linares]]> 2025-01-11T23:53:27-07:00 2025-01-11T23:53:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45300&p=276870#p276870
Asi que vamos a implementar la misma funcionalidad usando FWH y las clases de IA en FWH.

Esto es un Agente IA auténtico y es un gran ejemplo de lo que permite hacer el poder de la IA :)

Estad atentos... :wink:]]>

Asi que vamos a implementar la misma funcionalidad usando FWH y las clases de IA en FWH.

Esto es un Agente IA auténtico y es un gran ejemplo de lo que permite hacer el poder de la IA :)

Estad atentos... :wink:]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Habla con tu database usando lenguaje natural :: Reply by Antonio Linares]]> 2025-01-12T02:28:06-07:00 2025-01-12T02:28:06-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45300&p=276873#p276873
Usando esta simple técnica podemos hablar con cualquier base de datos usando lenguaje natural! :D

agentdb.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   local dummy := FW_SetUnicode( .T. )
   local cDatabase := "foros_antiguos"
   local oCn   := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
   local aTables, cTable
   local hDatabase := { => }, cJson

   if oCn == nil
      MsgAlert( "Error connecting to database" )
      return nil 
   endif   

   aTables = oCn:ListBaseTables()

   for each cTable in aTables
      hDatabase[ cTable ] = oCn:ListColumns( cTable ) 
   next   

   oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
               " give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
               hb_jsonEncode( hDatabase ) )
   XBrowser( oCn:Execute( oChat:GetValue() ) )

   oChat:End()

return nil   
Image]]>

Usando esta simple técnica podemos hablar con cualquier base de datos usando lenguaje natural! :D

agentdb.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   local dummy := FW_SetUnicode( .T. )
   local cDatabase := "foros_antiguos"
   local oCn   := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
   local aTables, cTable
   local hDatabase := { => }, cJson

   if oCn == nil
      MsgAlert( "Error connecting to database" )
      return nil 
   endif   

   aTables = oCn:ListBaseTables()

   for each cTable in aTables
      hDatabase[ cTable ] = oCn:ListColumns( cTable ) 
   next   

   oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
               " give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
               hb_jsonEncode( hDatabase ) )
   XBrowser( oCn:Execute( oChat:GetValue() ) )

   oChat:End()

return nil   
Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Habla con tu database usando lenguaje natural :: Reply by Armando]]> 2025-01-12T11:31:19-07:00 2025-01-12T11:31:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45300&p=276878#p276878
Wow

Saludos]]>

Wow

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Nueva Clase TDeepSeek en FWH 24.12 :: Author Antonio Linares]]> 2025-01-11T23:32:58-07:00 2025-01-11T23:32:58-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45298&p=276868#p276868
DeepSeek es mucho más económico que OpenAI y ofrece la misma calidad en Inteligencia Artificial.
Tienes que regitrarte en la web de DeepSeek y obtener tu clave API. Una vez la tengas desde una ventana cmd haz:
set DEEPSEEK_API_KEY=sk-...

Ejemplo de uso:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   
   oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )

   ? oChat:GetValue()

   oChat:End()

return nil   
]]>

DeepSeek es mucho más económico que OpenAI y ofrece la misma calidad en Inteligencia Artificial.
Tienes que regitrarte en la web de DeepSeek y obtener tu clave API. Una vez la tengas desde una ventana cmd haz:
set DEEPSEEK_API_KEY=sk-...

Ejemplo de uso:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oChat := TDeepSeek():New()
   
   oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )

   ? oChat:GetValue()

   oChat:End()

return nil   
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Nueva Clase TDeepSeek en FWH 24.12 :: Reply by Antonio Linares]]> 2025-01-12T12:54:29-07:00 2025-01-12T12:54:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45298&p=276881#p276881

Code: Select all | Expand

// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

CLASS TDeepSeek
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "deepseek-chat"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TDeepSeek

    if Empty( cKey )
       ::cKey = GetEnv( "DEEPSEEK_API_KEY" )
    else
       ::cKey = cKey   
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.deepseek.com/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TDeepSeek

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TDeepSeek

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       TRY 
          uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
       CATCH
          uValue = uValue[ "error" ][ "message" ]
       END   
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TDeepSeek 

   local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

   aHeaders := { "Content-Type: application/json", ;
                 "Authorization: Bearer " + ::cKey }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

   hRequest[ "model" ] = ::cModel
   hMessage1[ "role" ] = "system"
   hMessage1[ "content" ] = "You are a helpfull assistant."
   hMessage2[ "role" ] = "user"
   hMessage2[ "content" ] = cPrompt
   hRequest[ "messages" ] = { hMessage1, hMessage2 }
   hRequest[ "stream" ] = .F.

   cJson = hb_jsonEncode( hRequest )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
   ::nError = curl_easy_perform( ::hCurl )
   curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

   if ::nError == HB_CURLE_OK
      ::cResponse = curl_easy_dl_buff_get( ::hCurl )
   else
      ::cResponse := "Error code " + Str( ::nError )
   endif
    
return ::cResponse

//----------------------------------------------------------------------------//
]]>

Code: Select all | Expand

// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key

#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"

//----------------------------------------------------------------------------//

CLASS TDeepSeek
    
    DATA   cKey   INIT ""
    DATA   cModel INIT "deepseek-chat"
    DATA   cResponse
    DATA   cUrl
    DATA   hCurl
    DATA   nError INIT 0
    DATA   nHttpCode INIT 0

    METHOD New( cKey, cModel )
    METHOD Send( cPrompt )    
    METHOD End()    
    METHOD GetValue( cHKey )    

ENDCLASS        

//----------------------------------------------------------------------------//

METHOD New( cKey, cModel ) CLASS TDeepSeek

    if Empty( cKey )
       ::cKey = GetEnv( "DEEPSEEK_API_KEY" )
    else
       ::cKey = cKey   
    endif

    if ! Empty( cModel )
       ::cModel = cModel
    endif
    
    ::cUrl = "https://api.deepseek.com/chat/completions"
    ::hCurl = curl_easy_init()
    
return Self    

//----------------------------------------------------------------------------//

METHOD End() CLASS TDeepSeek

    curl_easy_cleanup( ::hCurl )
    ::hCurl = nil

return nil    

//----------------------------------------------------------------------------//

METHOD GetValue( cHKey ) CLASS TDeepSeek

    local aKeys := hb_AParams(), cKey
    local uValue := hb_jsonDecode( ::cResponse )

    hb_default( @cHKey, "content" )

    if cHKey == "content"
       TRY 
          uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
       CATCH
          uValue = uValue[ "error" ][ "message" ]
       END   
    endif

    TRY
       for each cKey in aKeys
          if ValType( uValue[ cKey ] ) == "A"
             uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
          else
             uValue = uValue[ cKey ]
          endif
       next
    CATCH
       XBrowser( uValue )
    END

return uValue

//----------------------------------------------------------------------------//

METHOD Send( cPrompt ) CLASS TDeepSeek 

   local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )

   aHeaders := { "Content-Type: application/json", ;
                 "Authorization: Bearer " + ::cKey }

   curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )

   hRequest[ "model" ] = ::cModel
   hMessage1[ "role" ] = "system"
   hMessage1[ "content" ] = "You are a helpfull assistant."
   hMessage2[ "role" ] = "user"
   hMessage2[ "content" ] = cPrompt
   hRequest[ "messages" ] = { hMessage1, hMessage2 }
   hRequest[ "stream" ] = .F.

   cJson = hb_jsonEncode( hRequest )
   curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
   ::nError = curl_easy_perform( ::hCurl )
   curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )

   if ::nError == HB_CURLE_OK
      ::cResponse = curl_easy_dl_buff_get( ::hCurl )
   else
      ::cResponse := "Error code " + Str( ::nError )
   endif
    
return ::cResponse

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-02T19:39:41-07:00 2025-01-02T19:39:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276735#p276735
Cómo evito todos estos mensajes?

Saludos

Armando wrote:Master Antonio:

Este es el contenido de CheckRes.Txt

Code: Select all | Expand

14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-570093934,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(215)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,453317101,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(220)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-33222578,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(225)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1090850343,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(266)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,251990033,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(277)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1174736286,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(283)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657948,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(367)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-838529548,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(372)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-100331320,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(377)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1409618529,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(383)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1610282077,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(388)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1258623205,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(394)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,553980494,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(399)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1225066575,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(404)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-788196856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(410)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1174074071,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(415)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1812271508,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(421)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-351989856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(427)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- FONT,67766313,TMDIFRAME:GETFONT(3129)->TMDICLIENT:GETFONT(3106)->TMDICLIENT:NEW(147)->TMDIFRAME:NEW(181)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-871362216,TMSGBAR:SETCOLOR(2904)->TMSGBAR:DEFAULT(292)->TMSGBAR:NEW(183)->MAIN(160)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1124405330,TMDIFRAME:DRAWITEM(1265)->TMDIFRAME:HANDLEEVENT(0)->_FWH(3693)->SHOWWINDOW(0)->TMDIFRAME:ACTIVATE(1094)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1073412436,TMSGBAR:PAINT(653)->(b)TMSGBAR(72)->TMSGBAR:DISPLAY(0)->TMSGBAR:HANDLEEVENT(1823)->_FWH(3693)->UPDATEWINDOW(0)->TMDIFRAME:ACTIVATE(1095)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-1357901224,TBAR:SETCOLOR(2904)->TBAR:SETGRADIENTS(269)->TBAR:NEW(186)->LABARRA(529)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-49999279,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(543)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290985,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(550)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657861,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(557)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,923078749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(567)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,889524267,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(574)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1426395794,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(584)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1057296597,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(591)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-2012934955,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(598)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290805,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(605)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-955969209,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(612)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1443172058,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(619)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-670756749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(626)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,637865975,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(633)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-570094001,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(640)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,251989948,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(647)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1090187741,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(654)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1442508697,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(661)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1711608410,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(670)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ICON,8260005,EDITAR(808)->(b)SIRSE01A(351)->TBTNBMP:CLICK(792)->TBTNBMP:LBUTTONUP(1083)->TCONTROL:HANDLEEVENT(1847)->TBTNBMP:HANDLEEVENT(2135)->_FWH(3693)->WINRUN(0)->TMDIFRAME:ACTIVATE(1118)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ==================================================================================================== 
 
Saludos
]]>

Cómo evito todos estos mensajes?

Saludos

Armando wrote:Master Antonio:

Este es el contenido de CheckRes.Txt

Code: Select all | Expand

14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-570093934,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(215)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,453317101,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(220)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-33222578,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(225)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1090850343,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(266)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,251990033,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(277)->MAIN(158)
    
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1174736286,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(283)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657948,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(367)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-838529548,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(372)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-100331320,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(377)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1409618529,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(383)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1610282077,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(388)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1258623205,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(394)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,553980494,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(399)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1225066575,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(404)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-788196856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(410)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1174074071,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(415)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1812271508,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(421)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-351989856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(427)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- FONT,67766313,TMDIFRAME:GETFONT(3129)->TMDICLIENT:GETFONT(3106)->TMDICLIENT:NEW(147)->TMDIFRAME:NEW(181)->MAIN(158)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-871362216,TMSGBAR:SETCOLOR(2904)->TMSGBAR:DEFAULT(292)->TMSGBAR:NEW(183)->MAIN(160)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1124405330,TMDIFRAME:DRAWITEM(1265)->TMDIFRAME:HANDLEEVENT(0)->_FWH(3693)->SHOWWINDOW(0)->TMDIFRAME:ACTIVATE(1094)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1073412436,TMSGBAR:PAINT(653)->(b)TMSGBAR(72)->TMSGBAR:DISPLAY(0)->TMSGBAR:HANDLEEVENT(1823)->_FWH(3693)->UPDATEWINDOW(0)->TMDIFRAME:ACTIVATE(1095)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-1357901224,TBAR:SETCOLOR(2904)->TBAR:SETGRADIENTS(269)->TBAR:NEW(186)->LABARRA(529)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-49999279,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(543)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290985,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(550)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657861,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(557)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,923078749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(567)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,889524267,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(574)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1426395794,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(584)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1057296597,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(591)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-2012934955,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(598)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290805,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(605)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-955969209,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(612)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1443172058,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(619)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-670756749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(626)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,637865975,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(633)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-570094001,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(640)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,251989948,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(647)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1090187741,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(654)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1442508697,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(661)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1711608410,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(670)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ICON,8260005,EDITAR(808)->(b)SIRSE01A(351)->TBTNBMP:CLICK(792)->TBTNBMP:LBUTTONUP(1083)->TCONTROL:HANDLEEVENT(1847)->TBTNBMP:HANDLEEVENT(2135)->_FWH(3693)->WINRUN(0)->TMDIFRAME:ACTIVATE(1118)->MAIN(178)
    
14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ==================================================================================================== 
 
Saludos
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by karinha]]> 2025-01-03T05:58:45-07:00 2025-01-03T05:58:45-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276741#p276741
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-03T10:30:51-07:00 2025-01-03T10:30:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276744#p276744
Gracias por el interes.

Este es el código

Code: Select all | Expand

STATIC FUNCTION LaBarra( oWindow )
   LOCAL oBarra
   LOCAL oCursor

   DEFINE CURSOR oCursor RESOURCE "Dedo"
   DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007

   oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
                                       { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
                                         { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
                                       { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) }, ;
                                         { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBarra:nClrText = nRGB( 255, 255, 255 )

* -----------------------------------------------------------------------------*

   IF aAblM1[01] .AND. aAblM1[02]
      DEFINE BUTTON aBtns1[01] OF oBarra RESOURCE "Rec32" cBorde ;
      ACTION SirseWin01a(oWindow);
      MESSAGE "Registro e impresión de facturas"
      aBtns1[01] :cToolTip := { "Registro de facturas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[03]
      DEFINE BUTTON aBtns1[02] OF oBarra RESOURCE "Cos32" cBorde ;
      ACTION SirseWin01b(oWindow);
      MESSAGE "Consultar órdenes de servicio"
      aBtns1[02] :cToolTip := { "Consultar órdenes", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[04]
      DEFINE BUTTON aBtns1[03] OF oBarra RESOURCE "Rep32" cBorde ;
      ACTION SirseWin01c(oWindow);
      MESSAGE "Asignar reparación"
      aBtns1[03] :cToolTip := { "Asignar reparación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[05]
      DEFINE BUTTON aBtns1[04] OF oBarra RESOURCE "Pdr32" cBorde ;
      ACTION SirseWin01d(oWindow);
      MESSAGE "Reporte de órdenes pendientes de reparar"
      aBtns1[04] :cToolTip := { "Reporte de pendientes de reparar", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[06]
      DEFINE BUTTON aBtns1[05] OF oBarra RESOURCE "Rne32" cBorde ;
      ACTION SirseWin01e(oWindow);
      MESSAGE "Reporte de órdenes reparadas pendientes de entregar"
      aBtns1[05] :cToolTip := { "Reporte de reparadas no entregadas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[07]
      DEFINE BUTTON aBtns1[06] OF oBarra RESOURCE "Pre32" cBorde ;
      ACTION SirseWin01f(oWindow);
      MESSAGE "Elaborar e imprimir prespuestos"
      aBtns1[06] :cToolTip := { "Presupuestos", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM2[01] .AND. aAblM2[02]
      DEFINE BUTTON aBtns2[01] OF oBarra RESOURCE "Vdr32" cBorde ;
      GROUP;
      ACTION SirseWin02a(oWindow);
      MESSAGE "Venta de refacciones"
      aBtns2[01] :cToolTip := { "Venta de refacciones", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM2[01] .AND. aAblM2[03]
      DEFINE BUTTON aBtns2[02] OF oBarra RESOURCE "Ddv32" cBorde ;
      ACTION SirseWin02b(oWindow);
      MESSAGE "Reporte diario de ventas"
      aBtns2[02] :cToolTip := { "Diario de ventas", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM4[01] .AND. aAblM4[02]
      DEFINE BUTTON aBtns4[01] OF oBarra RESOURCE "Vda32" cBorde ;
      GROUP;
      ACTION SirseWin03a(oWindow);
      MESSAGE "Vales de almacén"
      aBtns4[01] :cToolTip := { "Movimientos de almacén", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM4[01] .AND. aAblM4[03]
      DEFINE BUTTON aBtns4[02] OF oBarra RESOURCE "Edm32" cBorde ;
      ACTION SirseWin03b(oWindow);
      MESSAGE "Estadistico de movimientos"
      aBtns4[02] :cToolTip := { "Estadistico de movimientos", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM6[01] .AND. aAblM6[02]
      DEFINE BUTTON aBtns6[01] OF oBarra RESOURCE "Com32" cBorde ;
      GROUP;
      ACTION SirseWin04a(oWindow);
      MESSAGE "Reporte para pago de comisiones"
      aBtns6[01] :cToolTip := { "Reporte para pagar comisiones", "Comisiones", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM7[01] .AND. aAblM7[02]
      DEFINE BUTTON aBtns7[01] OF oBarra RESOURCE "Par32" cBorde ;
      GROUP;
      ACTION SirseWin05a(oWindow) ;
      MESSAGE "Mantenimiento a partes"
      aBtns7[01] :cToolTip := { "Archivos", "Partes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[03]
      DEFINE BUTTON aBtns7[02] OF oBarra RESOURCE "Mod32" cBorde ;
      ACTION SirseWin05b(oWindow) ;
      MESSAGE "Mantenimiento a modelos de aparatos"
      aBtns7[02] :cToolTip := { "Archivos", "Modelos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[04]
      DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
      ACTION SirseWin05c(oWindow) ;
      MESSAGE "Mantenimiento a grupos de mano de obra"
      aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[05]
      DEFINE BUTTON aBtns7[04] OF oBarra RESOURCE "Mca32" cBorde ;
      ACTION SirseWin05d(oWindow) ;
      MESSAGE "Mantenimiento a marcas"
      aBtns7[04] :cToolTip := { "Archivos", "Marcas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[06]
      DEFINE BUTTON aBtns7[05] OF oBarra RESOURCE "Def32" cBorde ;
      ACTION SirseWin05e(oWindow) ;
      MESSAGE "Claves de defectos"
      aBtns7[05] :cToolTip := { "Archivos", "Defectos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[07]
      DEFINE BUTTON aBtns7[06] OF oBarra RESOURCE "Cli32" cBorde ;
      ACTION SirseWin05f(oWindow) ;
      MESSAGE "Clientes frecuentes"
      aBtns7[06] :cToolTip := { "Archivos", "Clientes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[08]
      DEFINE BUTTON aBtns7[07] OF oBarra RESOURCE "Tec32" cBorde ;
      ACTION SirseWin05g(oWindow);
      MESSAGE "Técnicos y empleados"
      aBtns7[07] :cToolTip := { "Archivos", "Técnicos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[09]
      DEFINE BUTTON aBtns7[08] OF oBarra RESOURCE "Pdu32" cBorde ;
      ACTION SirseWin05h(oWindow);
      MESSAGE "Porcentajes de utilidad"
      aBtns7[08] :cToolTip := { "Archivos", "Porcentajes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[10]
      DEFINE BUTTON aBtns7[09] OF oBarra RESOURCE "Tdo32" cBorde ;
      ACTION SirseWin05i(oWindow);
      MESSAGE "Tipos de órdenes"
      aBtns7[09] :cToolTip := { "Archivos", "Tipos de órdenes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[11]
      DEFINE BUTTON aBtns7[10] OF oBarra RESOURCE "Tdg32" cBorde ;
      ACTION SirseWin05j(oWindow);
      MESSAGE "Tipos de garantías"
      aBtns7[10] :cToolTip := { "Archivos", "Tipos de garantías", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[12]
      DEFINE BUTTON aBtns7[11] OF oBarra RESOURCE "Dia32" cBorde ;
      ACTION SirseWin05k(oWindow);
      MESSAGE "Manuales y diagramas"
      aBtns7[11] :cToolTip := { "Archivos", "Manuales y diagramas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[13]
      DEFINE BUTTON aBtns7[12] OF oBarra RESOURCE "Cfg32" cBorde ;
      ACTION SirseWin05l(oWindow);
      MESSAGE "Configurar el sistema"
      aBtns7[12] :cToolTip := { "Archivos", "Configurar el sistema", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM8[01] .AND. aAblM8[02]
      DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Dsg32" cBorde ;
      GROUP;
      ACTION WaitRun(".\VRD.EXE");
      MESSAGE "Diseñador de formatos"
      aBtns8[01] :cToolTip := { "Soporte", "Diseñador", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Sal32" cBorde ;
      GROUP;
      ACTION oWindow:END( ) ;
      MESSAGE "Salir de la aplicación"
      aBtns8[01] :cToolTip := { "Salir de la aplicación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }

RETURN ( .T. )
 
Saludos, ah, y feliz año para todos]]>

Gracias por el interes.

Este es el código

Code: Select all | Expand

STATIC FUNCTION LaBarra( oWindow )
   LOCAL oBarra
   LOCAL oCursor

   DEFINE CURSOR oCursor RESOURCE "Dedo"
   DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007

   oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
                                       { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
                                         { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
                                       { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) }, ;
                                         { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBarra:nClrText = nRGB( 255, 255, 255 )

* -----------------------------------------------------------------------------*

   IF aAblM1[01] .AND. aAblM1[02]
      DEFINE BUTTON aBtns1[01] OF oBarra RESOURCE "Rec32" cBorde ;
      ACTION SirseWin01a(oWindow);
      MESSAGE "Registro e impresión de facturas"
      aBtns1[01] :cToolTip := { "Registro de facturas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[03]
      DEFINE BUTTON aBtns1[02] OF oBarra RESOURCE "Cos32" cBorde ;
      ACTION SirseWin01b(oWindow);
      MESSAGE "Consultar órdenes de servicio"
      aBtns1[02] :cToolTip := { "Consultar órdenes", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[04]
      DEFINE BUTTON aBtns1[03] OF oBarra RESOURCE "Rep32" cBorde ;
      ACTION SirseWin01c(oWindow);
      MESSAGE "Asignar reparación"
      aBtns1[03] :cToolTip := { "Asignar reparación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[05]
      DEFINE BUTTON aBtns1[04] OF oBarra RESOURCE "Pdr32" cBorde ;
      ACTION SirseWin01d(oWindow);
      MESSAGE "Reporte de órdenes pendientes de reparar"
      aBtns1[04] :cToolTip := { "Reporte de pendientes de reparar", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[06]
      DEFINE BUTTON aBtns1[05] OF oBarra RESOURCE "Rne32" cBorde ;
      ACTION SirseWin01e(oWindow);
      MESSAGE "Reporte de órdenes reparadas pendientes de entregar"
      aBtns1[05] :cToolTip := { "Reporte de reparadas no entregadas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM1[01] .AND. aAblM1[07]
      DEFINE BUTTON aBtns1[06] OF oBarra RESOURCE "Pre32" cBorde ;
      ACTION SirseWin01f(oWindow);
      MESSAGE "Elaborar e imprimir prespuestos"
      aBtns1[06] :cToolTip := { "Presupuestos", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM2[01] .AND. aAblM2[02]
      DEFINE BUTTON aBtns2[01] OF oBarra RESOURCE "Vdr32" cBorde ;
      GROUP;
      ACTION SirseWin02a(oWindow);
      MESSAGE "Venta de refacciones"
      aBtns2[01] :cToolTip := { "Venta de refacciones", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM2[01] .AND. aAblM2[03]
      DEFINE BUTTON aBtns2[02] OF oBarra RESOURCE "Ddv32" cBorde ;
      ACTION SirseWin02b(oWindow);
      MESSAGE "Reporte diario de ventas"
      aBtns2[02] :cToolTip := { "Diario de ventas", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM4[01] .AND. aAblM4[02]
      DEFINE BUTTON aBtns4[01] OF oBarra RESOURCE "Vda32" cBorde ;
      GROUP;
      ACTION SirseWin03a(oWindow);
      MESSAGE "Vales de almacén"
      aBtns4[01] :cToolTip := { "Movimientos de almacén", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM4[01] .AND. aAblM4[03]
      DEFINE BUTTON aBtns4[02] OF oBarra RESOURCE "Edm32" cBorde ;
      ACTION SirseWin03b(oWindow);
      MESSAGE "Estadistico de movimientos"
      aBtns4[02] :cToolTip := { "Estadistico de movimientos", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM6[01] .AND. aAblM6[02]
      DEFINE BUTTON aBtns6[01] OF oBarra RESOURCE "Com32" cBorde ;
      GROUP;
      ACTION SirseWin04a(oWindow);
      MESSAGE "Reporte para pago de comisiones"
      aBtns6[01] :cToolTip := { "Reporte para pagar comisiones", "Comisiones", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM7[01] .AND. aAblM7[02]
      DEFINE BUTTON aBtns7[01] OF oBarra RESOURCE "Par32" cBorde ;
      GROUP;
      ACTION SirseWin05a(oWindow) ;
      MESSAGE "Mantenimiento a partes"
      aBtns7[01] :cToolTip := { "Archivos", "Partes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[03]
      DEFINE BUTTON aBtns7[02] OF oBarra RESOURCE "Mod32" cBorde ;
      ACTION SirseWin05b(oWindow) ;
      MESSAGE "Mantenimiento a modelos de aparatos"
      aBtns7[02] :cToolTip := { "Archivos", "Modelos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[04]
      DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
      ACTION SirseWin05c(oWindow) ;
      MESSAGE "Mantenimiento a grupos de mano de obra"
      aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[05]
      DEFINE BUTTON aBtns7[04] OF oBarra RESOURCE "Mca32" cBorde ;
      ACTION SirseWin05d(oWindow) ;
      MESSAGE "Mantenimiento a marcas"
      aBtns7[04] :cToolTip := { "Archivos", "Marcas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[06]
      DEFINE BUTTON aBtns7[05] OF oBarra RESOURCE "Def32" cBorde ;
      ACTION SirseWin05e(oWindow) ;
      MESSAGE "Claves de defectos"
      aBtns7[05] :cToolTip := { "Archivos", "Defectos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[07]
      DEFINE BUTTON aBtns7[06] OF oBarra RESOURCE "Cli32" cBorde ;
      ACTION SirseWin05f(oWindow) ;
      MESSAGE "Clientes frecuentes"
      aBtns7[06] :cToolTip := { "Archivos", "Clientes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[08]
      DEFINE BUTTON aBtns7[07] OF oBarra RESOURCE "Tec32" cBorde ;
      ACTION SirseWin05g(oWindow);
      MESSAGE "Técnicos y empleados"
      aBtns7[07] :cToolTip := { "Archivos", "Técnicos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[09]
      DEFINE BUTTON aBtns7[08] OF oBarra RESOURCE "Pdu32" cBorde ;
      ACTION SirseWin05h(oWindow);
      MESSAGE "Porcentajes de utilidad"
      aBtns7[08] :cToolTip := { "Archivos", "Porcentajes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[10]
      DEFINE BUTTON aBtns7[09] OF oBarra RESOURCE "Tdo32" cBorde ;
      ACTION SirseWin05i(oWindow);
      MESSAGE "Tipos de órdenes"
      aBtns7[09] :cToolTip := { "Archivos", "Tipos de órdenes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[11]
      DEFINE BUTTON aBtns7[10] OF oBarra RESOURCE "Tdg32" cBorde ;
      ACTION SirseWin05j(oWindow);
      MESSAGE "Tipos de garantías"
      aBtns7[10] :cToolTip := { "Archivos", "Tipos de garantías", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[12]
      DEFINE BUTTON aBtns7[11] OF oBarra RESOURCE "Dia32" cBorde ;
      ACTION SirseWin05k(oWindow);
      MESSAGE "Manuales y diagramas"
      aBtns7[11] :cToolTip := { "Archivos", "Manuales y diagramas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

   IF aAblM7[01] .AND. aAblM7[13]
      DEFINE BUTTON aBtns7[12] OF oBarra RESOURCE "Cfg32" cBorde ;
      ACTION SirseWin05l(oWindow);
      MESSAGE "Configurar el sistema"
      aBtns7[12] :cToolTip := { "Archivos", "Configurar el sistema", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   IF aAblM8[01] .AND. aAblM8[02]
      DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Dsg32" cBorde ;
      GROUP;
      ACTION WaitRun(".\VRD.EXE");
      MESSAGE "Diseñador de formatos"
      aBtns8[01] :cToolTip := { "Soporte", "Diseñador", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
   ENDIF

* -----------------------------------------------------------------------------*

   DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Sal32" cBorde ;
      GROUP;
      ACTION oWindow:END( ) ;
      MESSAGE "Salir de la aplicación"
      aBtns8[01] :cToolTip := { "Salir de la aplicación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }

RETURN ( .T. )
 
Saludos, ah, y feliz año para todos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by karinha]]> 2025-01-03T10:49:06-07:00 2025-01-03T10:49:06-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276746#p276746
LABARRA(529)->(b) -> BAD(Malo)
LABARRA(543)->(b)
LABARRA(550)->(b)
LABARRA(557)->(b)
LABARRA(584)->(b)
LABARRA(591)->(b)
LABARRA(598)->(b)
LABARRA(605)->(b)
LABARRA(612)->(b)
LABARRA(619)->(b)
LABARRA(626)->(b)
LABARRA(633)->(b)
LABARRA(640)->(b)
LABARRA(647)->(b)
LABARRA(654)->(b)
LABARRA(661)->(b)
LABARRA(670)->(b)

Algo no esta bien con ellos.

Regards, saludos.]]>

LABARRA(529)->(b) -> BAD(Malo)
LABARRA(543)->(b)
LABARRA(550)->(b)
LABARRA(557)->(b)
LABARRA(584)->(b)
LABARRA(591)->(b)
LABARRA(598)->(b)
LABARRA(605)->(b)
LABARRA(612)->(b)
LABARRA(619)->(b)
LABARRA(626)->(b)
LABARRA(633)->(b)
LABARRA(640)->(b)
LABARRA(647)->(b)
LABARRA(654)->(b)
LABARRA(661)->(b)
LABARRA(670)->(b)

Algo no esta bien con ellos.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-03T13:11:18-07:00 2025-01-03T13:11:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276749#p276749
El código que pegue es la función LaBarra que es parte del PRG Main, la primera
línea que mencionas (LABARRA(529)->(b) -> BAD(Malo)) esta a continuación.

Code: Select all | Expand

   IF aAblM7[01] .AND. aAblM7[04]
      DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
      ACTION SirseWin05c(oWindow) ;
      MESSAGE "Mantenimiento a grupos de mano de obra"
      aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }      //  Línea 529
   ENDIF
 
Saludos]]>

El código que pegue es la función LaBarra que es parte del PRG Main, la primera
línea que mencionas (LABARRA(529)->(b) -> BAD(Malo)) esta a continuación.

Code: Select all | Expand

   IF aAblM7[01] .AND. aAblM7[04]
      DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
      ACTION SirseWin05c(oWindow) ;
      MESSAGE "Mantenimiento a grupos de mano de obra"
      aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }      //  Línea 529
   ENDIF
 
Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Antonio Linares]]> 2025-01-03T13:15:21-07:00 2025-01-03T13:15:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276751#p276751
Usas una ventana o un diálogo ?]]>

Usas una ventana o un diálogo ?]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-03T13:26:37-07:00 2025-01-03T13:26:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276752#p276752
Es una ventana

Code: Select all | Expand

STATIC FUNCTION LaBarra( oWindow )
   LOCAL oBarra
   LOCAL oCursor

   DEFINE CURSOR oCursor RESOURCE "Dedo"
   DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007

   oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
                                       { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
                                         { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
                                       { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) }, ;
                                         { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBarra:nClrText = nRGB( 255, 255, 255 )
....
....
....

Code: Select all | Expand

   ACTIVATE WINDOW oWindow MAXIMIZED ON INIT ( LaBarra( oWindow ), oWindow:Refresh( ) ) VALID Salir()
 
Saludos]]>

Es una ventana

Code: Select all | Expand

STATIC FUNCTION LaBarra( oWindow )
   LOCAL oBarra
   LOCAL oCursor

   DEFINE CURSOR oCursor RESOURCE "Dedo"
   DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007

   oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
                                       { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
                                         { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
                                       { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) }, ;
                                         { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBarra:nClrText = nRGB( 255, 255, 255 )
....
....
....

Code: Select all | Expand

   ACTIVATE WINDOW oWindow MAXIMIZED ON INIT ( LaBarra( oWindow ), oWindow:Refresh( ) ) VALID Salir()
 
Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Antonio Linares]]> 2025-01-03T14:49:50-07:00 2025-01-03T14:49:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276753#p276753
a ver si asi queda solucionado :-)]]>

a ver si asi queda solucionado :-)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-03T16:35:04-07:00 2025-01-03T16:35:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276758#p276758
No, no funca.

Code: Select all | Expand

STATIC FUNCTION Salir( )
   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)
      SET RESOURCES TO
      WinHelp( GetHelpFile( ), 2 )
      MEMORY( - 1 )
      oApp:oCon:Close( )
      oWindow:oBar:End()
      CheckRes()
      RETURN ( .T. )
   ELSE
      RETURN ( .F. )
   ENDIF
RETURN ( .F. )
 
Y la función ResAllFree() ya no existe.

Saludos]]>

No, no funca.

Code: Select all | Expand

STATIC FUNCTION Salir( )
   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)
      SET RESOURCES TO
      WinHelp( GetHelpFile( ), 2 )
      MEMORY( - 1 )
      oApp:oCon:Close( )
      oWindow:oBar:End()
      CheckRes()
      RETURN ( .T. )
   ELSE
      RETURN ( .F. )
   ENDIF
RETURN ( .F. )
 
Y la función ResAllFree() ya no existe.

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Antonio Linares]]> 2025-01-03T23:38:47-07:00 2025-01-03T23:38:47-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276759#p276759

Code: Select all | Expand

STATIC FUNCTION Salir( )
   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)
      SET RESOURCES TO
      WinHelp( GetHelpFile( ), 2 )
      MEMORY( - 1 )
      oApp:oCon:Close( )
      AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:End() } )
      CheckRes()
      RETURN ( .T. )
   ELSE
      RETURN ( .F. )
   ENDIF
RETURN ( .F. )
 
la función ResAllFree() era solo para 16 bits. En 32 bits ya no es necesaria pues Windows 32/64 libera todos los recursos.

function ResAllFree() ; return nil]]>

Code: Select all | Expand

STATIC FUNCTION Salir( )
   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)
      SET RESOURCES TO
      WinHelp( GetHelpFile( ), 2 )
      MEMORY( - 1 )
      oApp:oCon:Close( )
      AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:End() } )
      CheckRes()
      RETURN ( .T. )
   ELSE
      RETURN ( .F. )
   ENDIF
RETURN ( .F. )
 
la función ResAllFree() era solo para 16 bits. En 32 bits ya no es necesaria pues Windows 32/64 libera todos los recursos.

function ResAllFree() ; return nil]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-09T21:20:51-07:00 2025-01-09T21:20:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276853#p276853
Tampoco funcionó.

Saludos]]>

Tampoco funcionó.

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Antonio Linares]]> 2025-01-10T00:22:37-07:00 2025-01-10T00:22:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276854#p276854
AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:FreeBitmaps() } )]]>

AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:FreeBitmaps() } )]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by karinha]]> 2025-01-10T07:08:14-07:00 2025-01-10T07:08:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276860#p276860

Code: Select all | Expand

STATIC FUNCTION Salir( )

   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)

      // FONTES aqui:
      // RELEASE BRUSH oBrush
      // RELEASE FONT oFont

      DbCommitAll()
      DbUnLockAll()
      DbCloseAll()
      FreeResources()  // SET RESOURCES TO
      Release All
      SysRefresh()
      HB_GCALL( .T. ) // .T. -> Forca a limpeza de lixo(basuras).

      CLEAR MEMORY

      WinHelp( GetHelpFile(), 2 )

      // MEMORY( - 1 ) // ESTO NO FUNCIONA MAS

      oApp:oCon:Close( )  // ??

      oWindow:oBar:End()  // ???

      // oWnd:End()       // ??

      IF FILE( "checkres.txt" )
         FErase( "checkres.txt" )
      ENDIF

      CheckRes()

      PostQuitMessage( 0 )

      QUIT

      RETURN ( .T. )

   ELSE

      RETURN ( .F. )

   ENDIF

RETURN( .F. )
Regards, saludos.]]>

Code: Select all | Expand

STATIC FUNCTION Salir( )

   IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) //  + " "  + oApp:cVersion)

      // FONTES aqui:
      // RELEASE BRUSH oBrush
      // RELEASE FONT oFont

      DbCommitAll()
      DbUnLockAll()
      DbCloseAll()
      FreeResources()  // SET RESOURCES TO
      Release All
      SysRefresh()
      HB_GCALL( .T. ) // .T. -> Forca a limpeza de lixo(basuras).

      CLEAR MEMORY

      WinHelp( GetHelpFile(), 2 )

      // MEMORY( - 1 ) // ESTO NO FUNCIONA MAS

      oApp:oCon:Close( )  // ??

      oWindow:oBar:End()  // ???

      // oWnd:End()       // ??

      IF FILE( "checkres.txt" )
         FErase( "checkres.txt" )
      ENDIF

      CheckRes()

      PostQuitMessage( 0 )

      QUIT

      RETURN ( .T. )

   ELSE

      RETURN ( .F. )

   ENDIF

RETURN( .F. )
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by Armando]]> 2025-01-10T10:52:46-07:00 2025-01-10T10:52:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276861#p276861
En ambos (ambos) casos la situación sigue igual, no hay de piña.

Saludos]]>

En ambos (ambos) casos la situación sigue igual, no hay de piña.

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Por qué el oDLG cambia de color? :: Reply by karinha]]> 2025-01-13T07:13:04-07:00 2025-01-13T07:13:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45209&p=276886#p276886
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Capturar pagina html y recuperar resultado :: Reply by Enrrique Vertiz]]> 2025-01-07T20:04:12-07:00 2025-01-07T20:04:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44795&p=276820#p276820
Consulto para saber si se llego a solucionar, Yo al dia de hoy sigo con el mismo error ...
Gracias]]>

Consulto para saber si se llego a solucionar, Yo al dia de hoy sigo con el mismo error ...
Gracias]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Capturar pagina html y recuperar resultado :: Reply by Antonio Linares]]> 2025-01-08T00:20:02-07:00 2025-01-08T00:20:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44795&p=276821#p276821
A alguien le funciona ?

No se hasta que punto podemos saltarnos ese bloqueo de forma automática. Lo siento.]]>

A alguien le funciona ?

No se hasta que punto podemos saltarnos ese bloqueo de forma automática. Lo siento.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Capturar pagina html y recuperar resultado :: Reply by leandro]]> 2025-01-13T16:33:32-07:00 2025-01-13T16:33:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44795&p=276890#p276890
Enrrique Vertiz wrote: Wed Jan 08, 2025 3:04 am Saludos

Consulto para saber si se llego a solucionar, Yo al dia de hoy sigo con el mismo error ...
Gracias
¿Hola Enrique buenas noches como estas?

Pues el error como tal sigue saliendo cuando se integra el código a la aplicación, pero lo solucionamos creando un ejecutable externo. Le enviamos el parámetro de la cédula (DNI en otros países) para acelerar el proceso, pero como dice Antonio, desafortunadamente ya no se puede de manera automática, hay que completar el CloudFare o esperar a que se valide. Así que agregamos dos botones para capturar la información, luego de completar el proceso de validación, los bajamos a un json y luego desde la app los recuperamos.

Image

Code: Select all | Expand

#include "FiveWin.ch"

static oWebView

function Main( ... )

	local oWnd, cResult, Btn_Div, Btn_Sal
	Local aParams := hb_aParams() //recuperamos parametros
	Local cIdenti := space(0)
	Local cDian := space(0)
	Local cInfo := space(0)
	Local hConvierte  := hash()
	Local hDatos := hash()
	Local lCapturado := .F.
	Local cbRecuperainfo := <|cJson|
		hb_jsondecode(cJson ,@hConvierte ) 
		if hConvierte[1]
			lCapturado := .T.
			hDatos["tipo_tercero"] := hConvierte[2]
			hDatos["tercero"] := hConvierte[3]
			hDatos["estado"] := hConvierte[4]
			hDatos["dv"] := hConvierte[5]
			if hConvierte[2]=="NIT"
				hDatos["razon_social"] := hConvierte[6]
			else
				hDatos["primer_nombre"] := hConvierte[6]
				hDatos["segundo_nombre"] := hConvierte[7]
				hDatos["primer_apellido"] := hConvierte[8]
				hDatos["segundo_apellido"] := hConvierte[9]
			endif
		else
			lCapturado := .F.
		endif
		oWnd:End()
	>
	Local hInfo := {=>}
	Local cFec := dtos(date())
	Local cTim := strtran(subs(time(),1,8),":","")
	Local cRutaJson := "elnombredeljsonconlainfo.json"	

	Local cDevuelveInfo := <||
		hInfo["capturado"] := lCapturado 
		hInfo["datos"] := hDatos
		memowrit( cRutaJson , hb_jsonEncode( hInfo ) ,.F.)

	>	

	if len(aParams)>0
	
		cIdenti := alltrim(aParams[1])
		cDian := "consultaDIAN( '"+cIdenti+"' )"

		TEXT INTO cResult
			var inputEstado = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado');
			if (inputEstado) {
				var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
				var cNit = inputNIT.value;
				if(cNit.length==9){
					[ true,'NIT',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:razonSocial' ).innerHTML ]
				}else{
					[ true,'OTRO',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerNombre' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:otrosNombres' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerApellido' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:segundoApellido' ).innerHTML ]
				}
				
			} else {
				[false]
			}  
		ENDTEXT    

		DEFINE WINDOW oWnd TITLE "Consultar estado NIT plataforma DIAN " SIZE 830, 700 PIXEL ICON ".\res\favicon-48x48.ico"

		oWebView = TWebView2():New( oWnd )
		//oWebView:bOnNavigationCompleted = { | cUrl, hWebView | If( "sessionid" $ cUrl, oWebView:Eval( cResult ),) }

		oWebView:Navigate( "https://muisca.dian.gov.co/WebRutMuisca/DefConsultaEstadoRUT.faces" )
		oWebView:InjectJavascript( JavaScript() )
		//oWebView:OpenDevToolsWindow()
		oWebView:bOnEval = { | cJson, hWebView | If( cJson != "null" .and. cJson != "{}", EVAL( cbRecuperainfo,cJson ),) }
		oWebView:Eval( cDian )

		@ oWnd:nHeight-80, 15 BUTTONBMP Btn_Sal OF oWnd PIXEL size 110, 26 PROMPT "Cancelar" TOOLTIP "Cerrar Ventana"  ;
				RESOURCE ".\res\icon-blue-dark-cerrar-big-16x16.png" TEXTRIGHT ACTION ( lCapturado := .F., oWnd:End() )
				
		@ oWnd:nHeight-80, 80 BUTTONBMP Btn_Div OF oWnd PIXEL size 110, 26 PROMPT "Capturar" TOOLTIP "Capturar datos"  ;
				RESOURCE ".\res\icon-blue-dark-check-big-16x16.png" TEXTRIGHT ACTION (lCapturado := .T.,oWebView:Eval( cResult ))

		ACTIVATE WINDOW oWnd CENTER ;
		ON RESIZE (oWebView:SetSize( oWnd:nWidth, oWnd:nHeight-100 ), Btn_Div:nTop := oWnd:nHeight-80,;
					Btn_Div:nLeft := oWnd:nHeight-10 ,Btn_Sal:nTop := oWnd:nHeight-80, Btn_Sal:nLeft := oWnd:nHeight-130 ) ;
		VALID (EVAL(cDevuelveInfo),.T.)

		oWebView:End()		

	else 
		lCapturado := .F.
		EVAL(cDevuelveInfo)
		//msginfo("no vienen los parametros")
	endif

return nil

function Javascript()

   local cCode

   TEXT INTO cCode
      function consultaDIAN( numeroIdentificacion )
      {
         var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
         if (inputNIT) {
            inputNIT.value = numeroIdentificacion;
         } else {
            console.error('No se encontró el campo de entrada para el NIT');
            return;
         }    
         
      }
   ENDTEXT

return cCode


]]>
Enrrique Vertiz wrote: Wed Jan 08, 2025 3:04 am Saludos

Consulto para saber si se llego a solucionar, Yo al dia de hoy sigo con el mismo error ...
Gracias
¿Hola Enrique buenas noches como estas?

Pues el error como tal sigue saliendo cuando se integra el código a la aplicación, pero lo solucionamos creando un ejecutable externo. Le enviamos el parámetro de la cédula (DNI en otros países) para acelerar el proceso, pero como dice Antonio, desafortunadamente ya no se puede de manera automática, hay que completar el CloudFare o esperar a que se valide. Así que agregamos dos botones para capturar la información, luego de completar el proceso de validación, los bajamos a un json y luego desde la app los recuperamos.

Image

Code: Select all | Expand

#include "FiveWin.ch"

static oWebView

function Main( ... )

	local oWnd, cResult, Btn_Div, Btn_Sal
	Local aParams := hb_aParams() //recuperamos parametros
	Local cIdenti := space(0)
	Local cDian := space(0)
	Local cInfo := space(0)
	Local hConvierte  := hash()
	Local hDatos := hash()
	Local lCapturado := .F.
	Local cbRecuperainfo := <|cJson|
		hb_jsondecode(cJson ,@hConvierte ) 
		if hConvierte[1]
			lCapturado := .T.
			hDatos["tipo_tercero"] := hConvierte[2]
			hDatos["tercero"] := hConvierte[3]
			hDatos["estado"] := hConvierte[4]
			hDatos["dv"] := hConvierte[5]
			if hConvierte[2]=="NIT"
				hDatos["razon_social"] := hConvierte[6]
			else
				hDatos["primer_nombre"] := hConvierte[6]
				hDatos["segundo_nombre"] := hConvierte[7]
				hDatos["primer_apellido"] := hConvierte[8]
				hDatos["segundo_apellido"] := hConvierte[9]
			endif
		else
			lCapturado := .F.
		endif
		oWnd:End()
	>
	Local hInfo := {=>}
	Local cFec := dtos(date())
	Local cTim := strtran(subs(time(),1,8),":","")
	Local cRutaJson := "elnombredeljsonconlainfo.json"	

	Local cDevuelveInfo := <||
		hInfo["capturado"] := lCapturado 
		hInfo["datos"] := hDatos
		memowrit( cRutaJson , hb_jsonEncode( hInfo ) ,.F.)

	>	

	if len(aParams)>0
	
		cIdenti := alltrim(aParams[1])
		cDian := "consultaDIAN( '"+cIdenti+"' )"

		TEXT INTO cResult
			var inputEstado = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado');
			if (inputEstado) {
				var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
				var cNit = inputNIT.value;
				if(cNit.length==9){
					[ true,'NIT',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:razonSocial' ).innerHTML ]
				}else{
					[ true,'OTRO',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerNombre' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:otrosNombres' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerApellido' ).innerHTML,
					document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:segundoApellido' ).innerHTML ]
				}
				
			} else {
				[false]
			}  
		ENDTEXT    

		DEFINE WINDOW oWnd TITLE "Consultar estado NIT plataforma DIAN " SIZE 830, 700 PIXEL ICON ".\res\favicon-48x48.ico"

		oWebView = TWebView2():New( oWnd )
		//oWebView:bOnNavigationCompleted = { | cUrl, hWebView | If( "sessionid" $ cUrl, oWebView:Eval( cResult ),) }

		oWebView:Navigate( "https://muisca.dian.gov.co/WebRutMuisca/DefConsultaEstadoRUT.faces" )
		oWebView:InjectJavascript( JavaScript() )
		//oWebView:OpenDevToolsWindow()
		oWebView:bOnEval = { | cJson, hWebView | If( cJson != "null" .and. cJson != "{}", EVAL( cbRecuperainfo,cJson ),) }
		oWebView:Eval( cDian )

		@ oWnd:nHeight-80, 15 BUTTONBMP Btn_Sal OF oWnd PIXEL size 110, 26 PROMPT "Cancelar" TOOLTIP "Cerrar Ventana"  ;
				RESOURCE ".\res\icon-blue-dark-cerrar-big-16x16.png" TEXTRIGHT ACTION ( lCapturado := .F., oWnd:End() )
				
		@ oWnd:nHeight-80, 80 BUTTONBMP Btn_Div OF oWnd PIXEL size 110, 26 PROMPT "Capturar" TOOLTIP "Capturar datos"  ;
				RESOURCE ".\res\icon-blue-dark-check-big-16x16.png" TEXTRIGHT ACTION (lCapturado := .T.,oWebView:Eval( cResult ))

		ACTIVATE WINDOW oWnd CENTER ;
		ON RESIZE (oWebView:SetSize( oWnd:nWidth, oWnd:nHeight-100 ), Btn_Div:nTop := oWnd:nHeight-80,;
					Btn_Div:nLeft := oWnd:nHeight-10 ,Btn_Sal:nTop := oWnd:nHeight-80, Btn_Sal:nLeft := oWnd:nHeight-130 ) ;
		VALID (EVAL(cDevuelveInfo),.T.)

		oWebView:End()		

	else 
		lCapturado := .F.
		EVAL(cDevuelveInfo)
		//msginfo("no vienen los parametros")
	endif

return nil

function Javascript()

   local cCode

   TEXT INTO cCode
      function consultaDIAN( numeroIdentificacion )
      {
         var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
         if (inputNIT) {
            inputNIT.value = numeroIdentificacion;
         } else {
            console.error('No se encontró el campo de entrada para el NIT');
            return;
         }    
         
      }
   ENDTEXT

return cCode


]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Busqueda incremental en combobox SOLUCIONADO :: Author groiss]]> 2025-01-14T03:22:32-07:00 2025-01-14T03:22:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45307&p=276899#p276899 He revisado el foro pero no encuentro nada, tengo definido un combobox con estilo DROPLIST , y lo que pretendo es que según teclee el usuario se vaya haciendo la búsqueda incremental entre los elementos del mismo, para eso le he puesto a .T. la data lIncSearch pero aún así solo hace la búsqueda por la primera letra de los elementos del mismo. ¿Ha posibilidad de hacerlo?, ¿cómo debo hacerlo?
Muchas gracias
Un saludo]]>
He revisado el foro pero no encuentro nada, tengo definido un combobox con estilo DROPLIST , y lo que pretendo es que según teclee el usuario se vaya haciendo la búsqueda incremental entre los elementos del mismo, para eso le he puesto a .T. la data lIncSearch pero aún así solo hace la búsqueda por la primera letra de los elementos del mismo. ¿Ha posibilidad de hacerlo?, ¿cómo debo hacerlo?
Muchas gracias
Un saludo]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Busqueda incremental en combobox SOLUCIONADO :: Reply by groiss]]> 2025-01-14T04:56:30-07:00 2025-01-14T04:56:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45307&p=276903#p276903 Muchas gracias]]> Muchas gracias]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Busqueda incremental en combobox SOLUCIONADO :: Reply by Antonio Linares]]> 2025-01-14T05:13:57-07:00 2025-01-14T05:13:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45307&p=276904#p276904
Gracias por compartirlo! :)]]>

Gracias por compartirlo! :)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Busqueda incremental en combobox SOLUCIONADO :: Reply by Marc Venken]]> 2025-01-14T07:02:08-07:00 2025-01-14T07:02:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45307&p=276905#p276905
Could you please post the code that did the job ? Thanks ...]]>

Could you please post the code that did the job ? Thanks ...]]>
<![CDATA[FiveWin para Harbour/xHarbour :: XImage--Voy de nuevo.,.DISCULPA xBrowse :: Author D.Fernandez]]> 2025-01-13T18:04:52-07:00 2025-01-13T18:04:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45305&p=276894#p276894 muestro la foto todo bien.
Lo tengo con
REDEFINE IMAGE oImage FILE cFile ID 120 OF oDlg ADJUST BORDER RAISE Update

y en el xBrowse hago....
oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:LoadBMP(DBFUN:Foto), oImage:LoadBMP(rfemp+"0.JPG")),oImage:Refresh() ) }

https://ibb.co/KmzGdTY

Como lo haría con XIMAGE.
Gracias y saludos

Ruben Dario Fernandez]]>
muestro la foto todo bien.
Lo tengo con
REDEFINE IMAGE oImage FILE cFile ID 120 OF oDlg ADJUST BORDER RAISE Update

y en el xBrowse hago....
oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:LoadBMP(DBFUN:Foto), oImage:LoadBMP(rfemp+"0.JPG")),oImage:Refresh() ) }

https://ibb.co/KmzGdTY

Como lo haría con XIMAGE.
Gracias y saludos

Ruben Dario Fernandez]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: XImage--Voy de nuevo.,.DISCULPA xBrowse :: Reply by cmsoft]]> 2025-01-14T03:19:55-07:00 2025-01-14T03:19:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45305&p=276898#p276898 Puede hacerlo así

Code: Select all | Expand

oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:SetSource(DBFUN:Foto), oImage:SetSource(rfemp+"0.JPG")) ) }
]]>
Puede hacerlo así

Code: Select all | Expand

oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:SetSource(DBFUN:Foto), oImage:SetSource(rfemp+"0.JPG")) ) }
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: XImage--Voy de nuevo.,.DISCULPA xBrowse :: Reply by D.Fernandez]]> 2025-01-14T08:45:33-07:00 2025-01-14T08:45:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45305&p=276909#p276909
Muchas, muchas gracias.

Saludos
Ruben Dario Fernandez]]>

Muchas, muchas gracias.

Saludos
Ruben Dario Fernandez]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Seek("Mart") :: Author D.Fernandez]]> 2025-01-13T17:42:36-07:00 2025-01-13T17:42:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45304&p=276893#p276893 Tengo un archivo dbf de empleados, con indice appelidos y deseo buscar los apellidos "Martinez" y que los busque
solo con 4 o 5 letras (iniciales), Ej. Marti
Fernandez con "Ferna" por ejemplo.

Parecido al like de MariaDB

Alguna idea:

Muchas gracias.
Saludos

Ruben Dario Fernandez.]]>
Tengo un archivo dbf de empleados, con indice appelidos y deseo buscar los apellidos "Martinez" y que los busque
solo con 4 o 5 letras (iniciales), Ej. Marti
Fernandez con "Ferna" por ejemplo.

Parecido al like de MariaDB

Alguna idea:

Muchas gracias.
Saludos

Ruben Dario Fernandez.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Seek("Mart") :: Reply by paquitohm]]> 2025-01-14T01:30:54-07:00 2025-01-14T09:50:58-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45304&p=276896#p276896 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Seek("Mart") :: Reply by karinha]]> 2025-01-14T08:31:17-07:00 2025-01-14T08:31:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45304&p=276908#p276908
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Seek("Mart") :: Reply by D.Fernandez]]> 2025-01-14T09:38:25-07:00 2025-01-14T09:38:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45304&p=276911#p276911
quedó espectacular

Estoy quedando viejo (chocho)

Saludos

Ruben Dario Fernandez]]>

quedó espectacular

Estoy quedando viejo (chocho)

Saludos

Ruben Dario Fernandez]]>
<![CDATA[FiveWin para Harbour/xHarbour :: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Author karinha]]> 2025-01-14T11:12:32-07:00 2025-01-14T11:12:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276912#p276912

Code: Select all | Expand

   #ifdef __XHARBOUR__   // FUNCIONA PERFECTO!

      STRUCTURE oCep // "hbstruct.ch"

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #else

      // ESTO NO FUNCIONA EM HARBOUR, NO ENTENDI?  COMO HAGO?
      STRUCTURE oCep

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #endif
Regards, saludos.]]>

Code: Select all | Expand

   #ifdef __XHARBOUR__   // FUNCIONA PERFECTO!

      STRUCTURE oCep // "hbstruct.ch"

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #else

      // ESTO NO FUNCIONA EM HARBOUR, NO ENTENDI?  COMO HAGO?
      STRUCTURE oCep

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #endif
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Reply by karinha]]> 2025-01-14T11:13:56-07:00 2025-01-14T11:13:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276913#p276913

Code: Select all | Expand

// C:\FWH\SAMPLES\VIACEP02.PRG - SOMENTE XHABROUR POR ENQUANTO.

#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.

REQUEST HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850

STATIC lTiraAcento := .T.

FUNCTION Main()

   LOCAL cCep := "01330-000"

   // FW_SetUnicode( .T. ) // NAO ADIANTOU

   HB_LANGSELECT( 'PT' )     // Default language is now Portuguese
   HB_SETCODEPAGE( "PT850" )
   HB_CDPSELECT( "PTISO" )

   // SET(_SET_CODEPAGE,"CP850")

   // BASTA POR UM DIALOGO AQUI, PARA PESQUISAR O CEP.

   ViaCep( cCep )

RETURN NIL

FUNCTION ViaCep( cCep )

   LOCAL cLink := "http://viacep.com.br/ws/<<CEP>>/xml/"
   LOCAL oOle, cXml, oCep, oXml, oTag// ,bError

   #ifdef __XHARBOUR__

      STRUCTURE oCep // "hbstruct.ch"

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #else

      // ISTO NAO FUNCIONA EM HARBOUR, NAO ENTENDI????
      STRUCTURE oCep

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #endif

   IF Empty( cCep ); RETURN oCep; ENDIF

   cCep := StrTran( cCep, ' ', '' )

   IF Len( cCep ) < 8; RETURN oCep; ENDIF

   cLink := StrTran( cLink, "<<CEP>>", cCep )

   #ifdef __XHARBOUR__

      Try

         Try
            oOle := CreateObject( 'Microsoft.XMLHTTP' )
         Catch
            oOle := CreateObject( 'MSXML2.XMLHTTP' )
         End

         oOle:Open("GET",cLink,.F.)
         oOle:Send()

         If oOle:STATUS != 200
             BREAK
         Endif

         cXml := oOle:ResponseBody
         oOle := nil

      Catch

         MsgInfo( 'Erro na Criação do Serviço' )

         RETURN NIL

      End

   #else

      Try

         Try
            oOle := win_OleCreateObject( 'MSXML2.XMLHTTP' )
         Catch
            oOle := win_OleCreateObject( 'Microsoft.XMLHTTP' )
         End

         oOle:Open("GET",cLink,.F.)
         oOle:Send()

         If oOle:STATUS != 200
            BREAK
         Endif

         cXml := oOle:ResponseBody
         oOle := nil

      Catch

         MsgInfo( 'Erro na Criação do Serviço! Com Harbour', 'Atenção!' )

         RETURN NIL

      End

   #endif

   // verifica se não encontrou o cep atraves tag "erro"
   oXml := TXmlDocument():New(cXml)
   oTag := oXml:findFirst("erro")   //<erro>true</erro>

   //Este erro so pega se o CEP tiver 8 digitos
   If .NOT. Empty(oTag) .AND. oTag:cData == "true"

      BREAK

   Endif

//   #ifdef __XHARBOUR__

      oCep:lFound := .T.  // NAO FUNCIONA COM HARBOUR

//   #endif

   oTag := oXml:findFirst("logradouro")
   oCep:cNome := IIF(Empty(oTag),'',oTag:cData) //HtmlToOem(oTag:cData))

   // oCep:cNome := HtmlToOeM(oCep:cNome)
   // oCep:cNome := HB_Translate(oCep:cNome,"UTF8","PT850")

   oCep:cNome := FW_UTF8PADCHAR(oCep:cNome,60)
   oCep:cNome := Upper(oCep:cNome)

   If At("AVENIDA",oCep:cNome) > 0

      oCep:cTipo := "AV:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"AVENIDA ",'')

   Endif

   If At("RUA",oCep:cNome) > 0

      oCep:cTipo := "RUA"
      oCep:cNome := StrTran(Upper(oCep:cNome),"RUA ",'')

   Endif

   If At("PRAÇA",oCep:cNome) > 0

      oCep:cTipo := "PC:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"PRAÇA ",'')

   Endif

   If At("TRAVESSA",oCep:cNome) > 0

      oCep:cTipo := "TV:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"TRAVESSA ",'')

   Endif

   If At("ALAMEDA",oCep:cNome) > 0

      oCep:cTipo := "AL:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"ALAMEDA ",'')

   Endif

   // ASSIM NAO FUNCIONA
   // oCep:cNome := oCep:cNome:RemoveAcentos():Upper()

   oCep:cNome := RemoveAcentos( oCep:cNome )

   // oCep:cNome := SubStr(oCep:cNome,1,40) //ERRO TABCEP 60 E NO CADASTRO 40
   // oTag := oXml:findFirst("complemento")
   // oCep:cCompl := IIF(Empty(oTag),'',oTag:cData) //UPPER DA ERRO SE VAZIO

   oTag       := oXml:findFirst("bairro")
   oCep:cBair := IIF(Empty(oTag),'',oTag:cData)
   oCep:cBair := FW_UTF8PADCHAR(oCep:cBair,30)
   oCep:cBair := Upper(oCep:cBair)
   oCep:cBair := PadL(Upper(oCep:cBair),30)
   oCep:cBair := PadL(Upper(oCep:cBair),30)

   // oCep:cBair := oCep:cBair:RemoveAcentos():Upper()

   oCep:cBair := RemoveAcentos( oCep:cBair )

   // oCep:cBair := Upper(oCep:cBair)

   // Alert(Asc(SubStr(oCep:cBair,Len(oCep:cBair)-1)))

   oCep:cCompl := IIF(Empty(oTag),'',oTag:cData)

   oCep:cCompl:= UPPER( oCep:cCompl )  // AGORA SIM, PERFEITO! POHHA. KKKK

   oTag := oXml:findFirst("localidade")

   oCep:cCid := IIF(Empty(oTag),'',oTag:cData)
   oCep:cCid := FW_UTF8PADCHAR( oCep:cCid,30)
   oCep:cCid := Upper(oCep:cCid)
   oCep:cCid := PadL(oCep:cCid,30)

   // ASSIM NAO FUNCIONA - NAO ENTENDI ESSA LOGICA.
   // oCep:cCid := oCep:cCid:RemoveAcentos():Upper()  // ????

   oCep:cCid := RemoveAcentos( oCep:cCid ) // NAO USAR UPPER JUMA!

   oTag      := oXml:findFirst("uf")
   oCep:cUf  := IIF(Empty(oTag),Space(2),oTag:cData)

   xBrowse( oCep )

RETURN oCep

FUNCTION RemoveAcentos(cText)

   cText := strtran(cText,'á','a')
   cText := strtran(cText,'é','e')
   cText := strtran(cText,'í','i')
   cText := strtran(cText,'ó','o')
   cText := strtran(cText,'ú','u')

   cText := strtran(cText,'Á','A')
   cText := strtran(cText,'à','A')  // 224
   cText := strtran(cText,'á','A')  // 225
   cText := strtran(cText,'â','A')  // 226
   cText := strtran(cText,'ã','A')  // 227
   cText := strtran(cText,'ä','A')  // 228
   cText := strtran(cText,'å','A')  // 229

   cText := strtran(cText,"Æ",'A')
   cText := strtran(cText,"Â",'A')
   cText := strtran(cText,"µ",'A')
   cText := strtran(cText,"…",'A')
   cText := strtran(cText,"·",'A')

   cText := strtran(cText,"ƒ",'A')  // 131 ?
   cText := strtran(cText,"„",'A')  // 132 ?
   cText := strtran(cText,"…",'A')  // 133 ?
   cText := strtran(cText,"†",'A')  // 134 ?

   cText := strtran(cText,'À','A')
   cText := strtran(cText,'Ã','A') // AQUI - SÆO PAULO
   cText := strtran(cText,"£",'')  // Ã £ AQUI METO UM BRANCO - YES!

   cText := strtran(cText,'É','E')
   cText := strtran(cText,'Í','I')
   cText := strtran(cText,'Ó','O')
   cText := strtran(cText,'Ú','U')

   cText := strtran(cText,'Ô','O')
   cText := strtran(cText,'Ò','O')
   cText := strtran(cText,'Ö','O')

   cText := strtran(cText,'ä','a')
   cText := strtran(cText,'â','a')
   cText := strtran(cText,'ã','a')
   cText := strtran(cText,'å','a')

   cText := strtran(cText,'ê','a')
   cText := strtran(cText,'ë','a')

   cText := strtran(cText,'ç','c')
   cText := strtran(cText,'Ç','C')

RETURN( cText )

// FIN / END
Regards, saludos.]]>

Code: Select all | Expand

// C:\FWH\SAMPLES\VIACEP02.PRG - SOMENTE XHABROUR POR ENQUANTO.

#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.

REQUEST HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850

STATIC lTiraAcento := .T.

FUNCTION Main()

   LOCAL cCep := "01330-000"

   // FW_SetUnicode( .T. ) // NAO ADIANTOU

   HB_LANGSELECT( 'PT' )     // Default language is now Portuguese
   HB_SETCODEPAGE( "PT850" )
   HB_CDPSELECT( "PTISO" )

   // SET(_SET_CODEPAGE,"CP850")

   // BASTA POR UM DIALOGO AQUI, PARA PESQUISAR O CEP.

   ViaCep( cCep )

RETURN NIL

FUNCTION ViaCep( cCep )

   LOCAL cLink := "http://viacep.com.br/ws/<<CEP>>/xml/"
   LOCAL oOle, cXml, oCep, oXml, oTag// ,bError

   #ifdef __XHARBOUR__

      STRUCTURE oCep // "hbstruct.ch"

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #else

      // ISTO NAO FUNCIONA EM HARBOUR, NAO ENTENDI????
      STRUCTURE oCep

        Member lFound INIT .F.
        Member cNome, cCompl, cBair, cCid, cUf
        Member cTipo

      ENDSTRUCTURE

   #endif

   IF Empty( cCep ); RETURN oCep; ENDIF

   cCep := StrTran( cCep, ' ', '' )

   IF Len( cCep ) < 8; RETURN oCep; ENDIF

   cLink := StrTran( cLink, "<<CEP>>", cCep )

   #ifdef __XHARBOUR__

      Try

         Try
            oOle := CreateObject( 'Microsoft.XMLHTTP' )
         Catch
            oOle := CreateObject( 'MSXML2.XMLHTTP' )
         End

         oOle:Open("GET",cLink,.F.)
         oOle:Send()

         If oOle:STATUS != 200
             BREAK
         Endif

         cXml := oOle:ResponseBody
         oOle := nil

      Catch

         MsgInfo( 'Erro na Criação do Serviço' )

         RETURN NIL

      End

   #else

      Try

         Try
            oOle := win_OleCreateObject( 'MSXML2.XMLHTTP' )
         Catch
            oOle := win_OleCreateObject( 'Microsoft.XMLHTTP' )
         End

         oOle:Open("GET",cLink,.F.)
         oOle:Send()

         If oOle:STATUS != 200
            BREAK
         Endif

         cXml := oOle:ResponseBody
         oOle := nil

      Catch

         MsgInfo( 'Erro na Criação do Serviço! Com Harbour', 'Atenção!' )

         RETURN NIL

      End

   #endif

   // verifica se não encontrou o cep atraves tag "erro"
   oXml := TXmlDocument():New(cXml)
   oTag := oXml:findFirst("erro")   //<erro>true</erro>

   //Este erro so pega se o CEP tiver 8 digitos
   If .NOT. Empty(oTag) .AND. oTag:cData == "true"

      BREAK

   Endif

//   #ifdef __XHARBOUR__

      oCep:lFound := .T.  // NAO FUNCIONA COM HARBOUR

//   #endif

   oTag := oXml:findFirst("logradouro")
   oCep:cNome := IIF(Empty(oTag),'',oTag:cData) //HtmlToOem(oTag:cData))

   // oCep:cNome := HtmlToOeM(oCep:cNome)
   // oCep:cNome := HB_Translate(oCep:cNome,"UTF8","PT850")

   oCep:cNome := FW_UTF8PADCHAR(oCep:cNome,60)
   oCep:cNome := Upper(oCep:cNome)

   If At("AVENIDA",oCep:cNome) > 0

      oCep:cTipo := "AV:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"AVENIDA ",'')

   Endif

   If At("RUA",oCep:cNome) > 0

      oCep:cTipo := "RUA"
      oCep:cNome := StrTran(Upper(oCep:cNome),"RUA ",'')

   Endif

   If At("PRAÇA",oCep:cNome) > 0

      oCep:cTipo := "PC:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"PRAÇA ",'')

   Endif

   If At("TRAVESSA",oCep:cNome) > 0

      oCep:cTipo := "TV:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"TRAVESSA ",'')

   Endif

   If At("ALAMEDA",oCep:cNome) > 0

      oCep:cTipo := "AL:"
      oCep:cNome := StrTran(Upper(oCep:cNome),"ALAMEDA ",'')

   Endif

   // ASSIM NAO FUNCIONA
   // oCep:cNome := oCep:cNome:RemoveAcentos():Upper()

   oCep:cNome := RemoveAcentos( oCep:cNome )

   // oCep:cNome := SubStr(oCep:cNome,1,40) //ERRO TABCEP 60 E NO CADASTRO 40
   // oTag := oXml:findFirst("complemento")
   // oCep:cCompl := IIF(Empty(oTag),'',oTag:cData) //UPPER DA ERRO SE VAZIO

   oTag       := oXml:findFirst("bairro")
   oCep:cBair := IIF(Empty(oTag),'',oTag:cData)
   oCep:cBair := FW_UTF8PADCHAR(oCep:cBair,30)
   oCep:cBair := Upper(oCep:cBair)
   oCep:cBair := PadL(Upper(oCep:cBair),30)
   oCep:cBair := PadL(Upper(oCep:cBair),30)

   // oCep:cBair := oCep:cBair:RemoveAcentos():Upper()

   oCep:cBair := RemoveAcentos( oCep:cBair )

   // oCep:cBair := Upper(oCep:cBair)

   // Alert(Asc(SubStr(oCep:cBair,Len(oCep:cBair)-1)))

   oCep:cCompl := IIF(Empty(oTag),'',oTag:cData)

   oCep:cCompl:= UPPER( oCep:cCompl )  // AGORA SIM, PERFEITO! POHHA. KKKK

   oTag := oXml:findFirst("localidade")

   oCep:cCid := IIF(Empty(oTag),'',oTag:cData)
   oCep:cCid := FW_UTF8PADCHAR( oCep:cCid,30)
   oCep:cCid := Upper(oCep:cCid)
   oCep:cCid := PadL(oCep:cCid,30)

   // ASSIM NAO FUNCIONA - NAO ENTENDI ESSA LOGICA.
   // oCep:cCid := oCep:cCid:RemoveAcentos():Upper()  // ????

   oCep:cCid := RemoveAcentos( oCep:cCid ) // NAO USAR UPPER JUMA!

   oTag      := oXml:findFirst("uf")
   oCep:cUf  := IIF(Empty(oTag),Space(2),oTag:cData)

   xBrowse( oCep )

RETURN oCep

FUNCTION RemoveAcentos(cText)

   cText := strtran(cText,'á','a')
   cText := strtran(cText,'é','e')
   cText := strtran(cText,'í','i')
   cText := strtran(cText,'ó','o')
   cText := strtran(cText,'ú','u')

   cText := strtran(cText,'Á','A')
   cText := strtran(cText,'à','A')  // 224
   cText := strtran(cText,'á','A')  // 225
   cText := strtran(cText,'â','A')  // 226
   cText := strtran(cText,'ã','A')  // 227
   cText := strtran(cText,'ä','A')  // 228
   cText := strtran(cText,'å','A')  // 229

   cText := strtran(cText,"Æ",'A')
   cText := strtran(cText,"Â",'A')
   cText := strtran(cText,"µ",'A')
   cText := strtran(cText,"…",'A')
   cText := strtran(cText,"·",'A')

   cText := strtran(cText,"ƒ",'A')  // 131 ?
   cText := strtran(cText,"„",'A')  // 132 ?
   cText := strtran(cText,"…",'A')  // 133 ?
   cText := strtran(cText,"†",'A')  // 134 ?

   cText := strtran(cText,'À','A')
   cText := strtran(cText,'Ã','A') // AQUI - SÆO PAULO
   cText := strtran(cText,"£",'')  // Ã £ AQUI METO UM BRANCO - YES!

   cText := strtran(cText,'É','E')
   cText := strtran(cText,'Í','I')
   cText := strtran(cText,'Ó','O')
   cText := strtran(cText,'Ú','U')

   cText := strtran(cText,'Ô','O')
   cText := strtran(cText,'Ò','O')
   cText := strtran(cText,'Ö','O')

   cText := strtran(cText,'ä','a')
   cText := strtran(cText,'â','a')
   cText := strtran(cText,'ã','a')
   cText := strtran(cText,'å','a')

   cText := strtran(cText,'ê','a')
   cText := strtran(cText,'ë','a')

   cText := strtran(cText,'ç','c')
   cText := strtran(cText,'Ç','C')

RETURN( cText )

// FIN / END
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Reply by Enrico Maria Giordano]]> 2025-01-14T15:26:52-07:00 2025-01-14T15:26:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276915#p276915

Code: Select all | Expand

#include "struct.ch"
]]>

Code: Select all | Expand

#include "struct.ch"
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Reply by karinha]]> 2025-01-15T03:29:26-07:00 2025-01-15T03:29:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276917#p276917

Code: Select all | Expand

#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
#include "struct.ch"   // FWH/HARBOUR ??
No funciona Enrico. xHarbour es fantástico, no uso HARBOUR precisamente por estos inconvenientes

It doesn't work Enrico. xHarbour is fantastic, I don't use HARBOUR precisely because of these inconveniences.

Gracias, tks.

Regards, saludos.]]>

Code: Select all | Expand

#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
#include "struct.ch"   // FWH/HARBOUR ??
No funciona Enrico. xHarbour es fantástico, no uso HARBOUR precisamente por estos inconvenientes

It doesn't work Enrico. xHarbour is fantastic, I don't use HARBOUR precisely because of these inconveniences.

Gracias, tks.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Reply by Enrico Maria Giordano]]> 2025-01-15T04:21:41-07:00 2025-01-15T04:21:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276918#p276918

Code: Select all | Expand

#include "hbstruct.ch"
]]>

Code: Select all | Expand

#include "hbstruct.ch"
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: STRUCTURE / ENDSTRUCTURE EN HARBOUR? :: Reply by karinha]]> 2025-01-15T04:43:39-07:00 2025-01-15T04:43:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45308&p=276919#p276919
Enrico Maria Giordano wrote: Wed Jan 15, 2025 11:21 am Please remove this, you don't need it with both Harbour and xHarbour:

Code: Select all | Expand

#include "hbstruct.ch"
#include "hbstruct.ch" // Only xHarbour.

Regards, saludos.]]>
Enrico Maria Giordano wrote: Wed Jan 15, 2025 11:21 am Please remove this, you don't need it with both Harbour and xHarbour:

Code: Select all | Expand

#include "hbstruct.ch"
#include "hbstruct.ch" // Only xHarbour.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: CreateObject com API usando .PEM e .KEY (ssl) :: Author Ari]]> 2025-01-15T04:45:46-07:00 2025-01-15T04:45:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45309&p=276920#p276920
Necesito conectarme a una API y me pide un certificado con los archivos: .PEN y .KEY key

yo uso xharbour

¿Alguien tiene un ejemplo de cómo hacer esta conexión?

* Usar POSTMAN y registrar el certificado funciona.

* La API de mi cliente utiliza "Sin autenticación"

[código]

Ejemplo de código fuente API para establecer la conexión:

======================================================
METHOD StartApi() CLASS TApi // Conecta com o Servidor
======================================================
local n

TRY
::oServer = CreateObject( 'MSXML2.XMLHTTP')
CATCH
::oServer = CreateObject( 'MSXML2.ServerXMLHTTP.6.0')
END

if ::oServer == NIL
Msg('Erro interno na criação do oServer')
return nil
Endif

TRY

// cMethod (POST,GET)
// cServer ( URL ) em HTTPS
// cRota ( EndPoint )

::oServer:Open( ::cMethod, ::cServer + ::cRota, .F. )
::oServer:SetRequestHeader( 'cache-control' , 'no-cache' )
::oServer:SetRequestHeader( 'Connection' , 'keep-alive' )
::oServer:SetRequestHeader( 'Accept' , '*/*' )
::oServer:SetRequestHeader( 'Content-Type' , 'text/html,application/json' )


CATCH
END

return nil

===============================================
METHOD EndApi() CLASS TApi // Envia o conteudo
===============================================
TRY
if !empty( ::cBody )
::oServer:Send(::cBody) // quando tem conteúdo no Body
Else
::oServer:Send() // sem conteúdo no Body
Endif

While ::oServer:readyState <> 4
::oServer:WaitForResponse( 500 )
End
::cResponse := ::oServer:responseText

::cBody := ""
::aHeaders := {}
CATCH
BREAK
END

::LogApi() // grava requisições

return nil
[/code]]]>

Necesito conectarme a una API y me pide un certificado con los archivos: .PEN y .KEY key

yo uso xharbour

¿Alguien tiene un ejemplo de cómo hacer esta conexión?

* Usar POSTMAN y registrar el certificado funciona.

* La API de mi cliente utiliza "Sin autenticación"

[código]

Ejemplo de código fuente API para establecer la conexión:

======================================================
METHOD StartApi() CLASS TApi // Conecta com o Servidor
======================================================
local n

TRY
::oServer = CreateObject( 'MSXML2.XMLHTTP')
CATCH
::oServer = CreateObject( 'MSXML2.ServerXMLHTTP.6.0')
END

if ::oServer == NIL
Msg('Erro interno na criação do oServer')
return nil
Endif

TRY

// cMethod (POST,GET)
// cServer ( URL ) em HTTPS
// cRota ( EndPoint )

::oServer:Open( ::cMethod, ::cServer + ::cRota, .F. )
::oServer:SetRequestHeader( 'cache-control' , 'no-cache' )
::oServer:SetRequestHeader( 'Connection' , 'keep-alive' )
::oServer:SetRequestHeader( 'Accept' , '*/*' )
::oServer:SetRequestHeader( 'Content-Type' , 'text/html,application/json' )


CATCH
END

return nil

===============================================
METHOD EndApi() CLASS TApi // Envia o conteudo
===============================================
TRY
if !empty( ::cBody )
::oServer:Send(::cBody) // quando tem conteúdo no Body
Else
::oServer:Send() // sem conteúdo no Body
Endif

While ::oServer:readyState <> 4
::oServer:WaitForResponse( 500 )
End
::cResponse := ::oServer:responseText

::cBody := ""
::aHeaders := {}
CATCH
BREAK
END

::LogApi() // grava requisições

return nil
[/code]]]>
<![CDATA[FiveWin para Harbour/xHarbour :: HBMK2 - Barra de estado y barra principal mas pequenas :: Author Compuin]]> 2025-01-16T05:22:50-07:00 2025-01-16T05:22:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276927#p276927
Estoy utilizando el Hbmk2 como vsc2022 y el tutor04.prg como ejemplo pero esta creando el mismo con la barra de estado y la barra principal mas pequenas que lo normal. Como puedo corregir esto?

Code: Select all | Expand

-gui

-Ic:\fwh\include

tutor04.prg

-Lc:\fwh\lib

-lFiveH32
-lFiveHC32

-lgdiplus
-lole32
-lOleDlg
-lversion

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

tutor04.rc

Code: Select all | Expand

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

static oWnd      

//----------------------------------------------------------------------------//

function Main()

   local oIco, oBar, oBmp

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "FiveWin sample" ;
      MENU  BuildMenu() ;
      COLOR "B/W" ;
      ICON oIco

   DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .f.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION oWnd:End() TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\fiveback.bmp"

   oWnd:bPainted = { | hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd ;
      VALID MsgYesNo( "Do you want to quit ?" )

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "Information"
      MENU
         MENUITEM "&About..." ;
            ACTION MsgInfo( FWDESCRIPTION ) ;
            FILENAME "..\bitmaps\16x16\info.bmp"
         SEPARATOR
         MENUITEM "&End..."  ;
            ACTION oWnd:End() FILENAME "..\bitmaps\16x16\exit.bmp"

      ENDMENU

      MENUITEM "&Clients"
      MENU
         MENUITEM "&New..." ;
            ACTION ( MsgStop( "New Clients" ),;
                     oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
            FILENAME "..\bitmaps\16x16\faces.bmp"

         MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
            FILENAME "..\bitmaps\edit.bmp"

         MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
            FILENAME "..\bitmaps\16x16\delete.bmp"

         SEPARATOR

         MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
            FILENAME "..\bitmaps\16x16\browse.bmp"

      ENDMENU

      MENUITEM "&Utilities"
      MENU
         MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
            FILENAME "..\bitmaps\16x16\calc.bmp"

         MENUITEM "&Internet..." ;
            ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
            FILENAME "..\bitmaps\16x16\explorer.bmp"
      ENDMENU
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   local nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   local nRow := 0, nCol := 0, n
   local nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   if oBmp:hBitmap == 0
      return nil
   endif

   while nRow < nHeight
      nCol = 0
      while nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      end
      nRow += nBmpHeight
   end

return nil

//----------------------------------------------------------------------------//
]]>

Estoy utilizando el Hbmk2 como vsc2022 y el tutor04.prg como ejemplo pero esta creando el mismo con la barra de estado y la barra principal mas pequenas que lo normal. Como puedo corregir esto?

Code: Select all | Expand

-gui

-Ic:\fwh\include

tutor04.prg

-Lc:\fwh\lib

-lFiveH32
-lFiveHC32

-lgdiplus
-lole32
-lOleDlg
-lversion

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

tutor04.rc

Code: Select all | Expand

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

static oWnd      

//----------------------------------------------------------------------------//

function Main()

   local oIco, oBar, oBmp

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "FiveWin sample" ;
      MENU  BuildMenu() ;
      COLOR "B/W" ;
      ICON oIco

   DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .f.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION oWnd:End() TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\fiveback.bmp"

   oWnd:bPainted = { | hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd ;
      VALID MsgYesNo( "Do you want to quit ?" )

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "Information"
      MENU
         MENUITEM "&About..." ;
            ACTION MsgInfo( FWDESCRIPTION ) ;
            FILENAME "..\bitmaps\16x16\info.bmp"
         SEPARATOR
         MENUITEM "&End..."  ;
            ACTION oWnd:End() FILENAME "..\bitmaps\16x16\exit.bmp"

      ENDMENU

      MENUITEM "&Clients"
      MENU
         MENUITEM "&New..." ;
            ACTION ( MsgStop( "New Clients" ),;
                     oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
            FILENAME "..\bitmaps\16x16\faces.bmp"

         MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
            FILENAME "..\bitmaps\edit.bmp"

         MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
            FILENAME "..\bitmaps\16x16\delete.bmp"

         SEPARATOR

         MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
            FILENAME "..\bitmaps\16x16\browse.bmp"

      ENDMENU

      MENUITEM "&Utilities"
      MENU
         MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
            FILENAME "..\bitmaps\16x16\calc.bmp"

         MENUITEM "&Internet..." ;
            ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
            FILENAME "..\bitmaps\16x16\explorer.bmp"
      ENDMENU
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   local nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   local nRow := 0, nCol := 0, n
   local nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   if oBmp:hBitmap == 0
      return nil
   endif

   while nRow < nHeight
      nCol = 0
      while nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      end
      nRow += nBmpHeight
   end

return nil

//----------------------------------------------------------------------------//
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Antonio Linares]]> 2025-01-16T09:23:56-07:00 2025-01-16T09:23:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276931#p276931
DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

cambia el 26 y 27 por otros valores

En que resolución de pantalla estas trabajando ?]]>

DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

cambia el 26 y 27 por otros valores

En que resolución de pantalla estas trabajando ?]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Compuin]]> 2025-01-16T09:35:05-07:00 2025-01-16T09:35:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276933#p276933
Ya he realizado ese cambio pero sigue quedando mas pequena que cuando lo compilo con el buildh.bat de samples

Mi resolucion es estandar, 1920 x 1080 (La recomendada por Windows 11)]]>

Ya he realizado ese cambio pero sigue quedando mas pequena que cuando lo compilo con el buildh.bat de samples

Mi resolucion es estandar, 1920 x 1080 (La recomendada por Windows 11)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T09:38:36-07:00 2025-01-16T09:38:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276934#p276934

Code: Select all | Expand

// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

#Define aPubGrad {| lInvert | If( lInvert, ;
                 { { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
                 { 2 / 3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }    ;
                 },                                                         ;
                 { { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
                 { 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) }    ;
                 } ) }

STATIC oWnd

FUNCTION Main()

   LOCAL oIco, oBar, oBmp

   hb_gcAll( .F. )

   SET CENTURY ON
   SET DATE BRITISH
   SET TIME FORMAT TO "HH:MM:SS"
   SET EPOCH TO YEAR( DATE() ) - 30
   SET SOFTSEEK OFF
   SET WRAP ON
   SETCANCEL( .F. )
   SET CONFIRM ON
   SET DELETED ON
   SET _3DLOOK ON
   SET UNIQUE OFF
   SET ESCAPE OFF
   SET EXACT ON       // CONTROLA O :=, = e ==
   SET EXCLUSIVE OFF
   SET MULTIPLE OFF
   SET OPTIMIZE ON

   // No cargar la aplicacion dos veces.
   IF ISEXERUNNING( CFILENAME( hb_argv( 0 ) ) )

      MsgInfo( "Tutor04.exe Já Está Rodando Nesta Máquina", "Tutor04.exe" )

      SHOWWINDOW( FINDWINDOW( 0, "TUTOR04" ), 9 ) // Nombre tu .EXE

      SETFOREGROUNDWINDOW( FINDWINDOW( 0, "TUTOR04" ) )

      LIBERA_TUDO()

      RETURN NIL

   ENDIF

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 MDI ;
      TITLE "FiveWin sample"                  ;
      MENU  BuildMenu()                       ;
      COLOR "B/W" ICON oIco

   // DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
   DEFINE BUTTONBAR oBar BUTTONSIZE 64, 52 _3DLOOK TOP OF oWnd 2007

   WITH OBJECT oBar // VER: ANCHO.PRG

      oBar:bClrGrad := aPubGrad
      // oBar:SetFont( oFont )
      oBar:nClrText := CLR_HBLUE // BLACK
      oBar:Adjust()

   END

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .F.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION( TESTGET() )
      //MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK 2007

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"

   oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd MAXIMIZED

      /* ;
      VALID MsgYesNo( "Do you want to quit ?" ) */

RETURN NIL

FUNCTION BuildMenu()

   LOCAL oMenu

   MENU oMenu 2007
   MENUITEM "Information"
   MENU
   MENUITEM "&About..." ;
      ACTION MsgInfo( FWDESCRIPTION ) ;
      FILENAME "..\bitmaps\16x16\info.bmp"
   SEPARATOR
   MENUITEM "&End..."  ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) ;
      FILENAME "..\bitmaps\16x16\exit.bmp"

   ENDMENU

   MENUITEM "&Clients"
   MENU
   MENUITEM "&New..." ;
      ACTION ( MsgStop( "New Clients" ), ;
      oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
      FILENAME "..\bitmaps\16x16\faces.bmp"

   MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
      FILENAME "..\bitmaps\edit.bmp"

   MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
      FILENAME "..\bitmaps\16x16\delete.bmp"

   SEPARATOR

   MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
      FILENAME "..\bitmaps\16x16\browse.bmp"

   ENDMENU

   MENUITEM "&Utilities"
   MENU
   MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
      FILENAME "..\bitmaps\16x16\calc.bmp"

   MENUITEM "&Internet..." ;
      ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
      FILENAME "..\bitmaps\16x16\explorer.bmp"
   ENDMENU
   ENDMENU

RETURN oMenu
// --Fecha o Programa Definitivamente e Libera a Memoria RAM.
FUNCTION LIBERA_TUDO()

   IF File( "TUTOR04.LOG" )
      DELETEFILE( "TUTOR04.LOG" )
   ENDIF

   dbCommitAll()
   dbUnlockAll()
   dbCloseAll()
   FreeResources()
   RELEASE ALL
   SysRefresh()

   hb_gcAll( .T. )

   CLEAR MEMORY

   PostQuitMessage( 0 )

   QUIT

RETURN NIL

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   LOCAL nRow := 0, nCol := 0 // , n
   LOCAL nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   IF oBmp:hBitmap == 0
      RETURN NIL
   ENDIF

   WHILE nRow < nHeight
      nCol = 0
      WHILE nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      END
      nRow += nBmpHeight
   END

RETURN NIL

FUNCTION TESTGET()

   LOCAL oDlg, oGet
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL nNum := 0
   LOCAL dDat := Date()

   SET CONFIRM ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   @ 1,    2 SAY "Text..:" OF oDlg

   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"

   @ 1.8,  2 SAY "Number:" OF oDlg

   @ 2,    6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"

   @ 2.6,  2 SAY "Date:" OF oDlg

   @ 3,    6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10  // "@D"

   @ 3,    7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()

   @ 3,   16 BUTTON "&Saida" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
   
   // TGet():SetColorFocus( nRGB( 200, 120, 120 ) )

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
Regards, saludos.]]>

Code: Select all | Expand

// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

#Define aPubGrad {| lInvert | If( lInvert, ;
                 { { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
                 { 2 / 3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }    ;
                 },                                                         ;
                 { { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
                 { 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) }    ;
                 } ) }

STATIC oWnd

FUNCTION Main()

   LOCAL oIco, oBar, oBmp

   hb_gcAll( .F. )

   SET CENTURY ON
   SET DATE BRITISH
   SET TIME FORMAT TO "HH:MM:SS"
   SET EPOCH TO YEAR( DATE() ) - 30
   SET SOFTSEEK OFF
   SET WRAP ON
   SETCANCEL( .F. )
   SET CONFIRM ON
   SET DELETED ON
   SET _3DLOOK ON
   SET UNIQUE OFF
   SET ESCAPE OFF
   SET EXACT ON       // CONTROLA O :=, = e ==
   SET EXCLUSIVE OFF
   SET MULTIPLE OFF
   SET OPTIMIZE ON

   // No cargar la aplicacion dos veces.
   IF ISEXERUNNING( CFILENAME( hb_argv( 0 ) ) )

      MsgInfo( "Tutor04.exe Já Está Rodando Nesta Máquina", "Tutor04.exe" )

      SHOWWINDOW( FINDWINDOW( 0, "TUTOR04" ), 9 ) // Nombre tu .EXE

      SETFOREGROUNDWINDOW( FINDWINDOW( 0, "TUTOR04" ) )

      LIBERA_TUDO()

      RETURN NIL

   ENDIF

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 MDI ;
      TITLE "FiveWin sample"                  ;
      MENU  BuildMenu()                       ;
      COLOR "B/W" ICON oIco

   // DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
   DEFINE BUTTONBAR oBar BUTTONSIZE 64, 52 _3DLOOK TOP OF oWnd 2007

   WITH OBJECT oBar // VER: ANCHO.PRG

      oBar:bClrGrad := aPubGrad
      // oBar:SetFont( oFont )
      oBar:nClrText := CLR_HBLUE // BLACK
      oBar:Adjust()

   END

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .F.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION( TESTGET() )
      //MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK 2007

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"

   oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd MAXIMIZED

      /* ;
      VALID MsgYesNo( "Do you want to quit ?" ) */

RETURN NIL

FUNCTION BuildMenu()

   LOCAL oMenu

   MENU oMenu 2007
   MENUITEM "Information"
   MENU
   MENUITEM "&About..." ;
      ACTION MsgInfo( FWDESCRIPTION ) ;
      FILENAME "..\bitmaps\16x16\info.bmp"
   SEPARATOR
   MENUITEM "&End..."  ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) ;
      FILENAME "..\bitmaps\16x16\exit.bmp"

   ENDMENU

   MENUITEM "&Clients"
   MENU
   MENUITEM "&New..." ;
      ACTION ( MsgStop( "New Clients" ), ;
      oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
      FILENAME "..\bitmaps\16x16\faces.bmp"

   MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
      FILENAME "..\bitmaps\edit.bmp"

   MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
      FILENAME "..\bitmaps\16x16\delete.bmp"

   SEPARATOR

   MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
      FILENAME "..\bitmaps\16x16\browse.bmp"

   ENDMENU

   MENUITEM "&Utilities"
   MENU
   MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
      FILENAME "..\bitmaps\16x16\calc.bmp"

   MENUITEM "&Internet..." ;
      ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
      FILENAME "..\bitmaps\16x16\explorer.bmp"
   ENDMENU
   ENDMENU

RETURN oMenu
// --Fecha o Programa Definitivamente e Libera a Memoria RAM.
FUNCTION LIBERA_TUDO()

   IF File( "TUTOR04.LOG" )
      DELETEFILE( "TUTOR04.LOG" )
   ENDIF

   dbCommitAll()
   dbUnlockAll()
   dbCloseAll()
   FreeResources()
   RELEASE ALL
   SysRefresh()

   hb_gcAll( .T. )

   CLEAR MEMORY

   PostQuitMessage( 0 )

   QUIT

RETURN NIL

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   LOCAL nRow := 0, nCol := 0 // , n
   LOCAL nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   IF oBmp:hBitmap == 0
      RETURN NIL
   ENDIF

   WHILE nRow < nHeight
      nCol = 0
      WHILE nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      END
      nRow += nBmpHeight
   END

RETURN NIL

FUNCTION TESTGET()

   LOCAL oDlg, oGet
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL nNum := 0
   LOCAL dDat := Date()

   SET CONFIRM ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   @ 1,    2 SAY "Text..:" OF oDlg

   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"

   @ 1.8,  2 SAY "Number:" OF oDlg

   @ 2,    6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"

   @ 2.6,  2 SAY "Date:" OF oDlg

   @ 3,    6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10  // "@D"

   @ 3,    7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()

   @ 3,   16 BUTTON "&Saida" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
   
   // TGet():SetColorFocus( nRGB( 200, 120, 120 ) )

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Compuin]]> 2025-01-16T10:18:35-07:00 2025-01-16T10:18:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276938#p276938
No entiendo eso que tratanstes de enviar pero no soluciona el problema tampoco]]>

No entiendo eso que tratanstes de enviar pero no soluciona el problema tampoco]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T10:30:42-07:00 2025-01-16T10:30:42-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276939#p276939
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Compuin]]> 2025-01-16T10:53:57-07:00 2025-01-16T13:06:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276941#p276941
https://tinypic.host/images/2025/01/16/Screenshot_3.jpg]]>

https://tinypic.host/images/2025/01/16/Screenshot_3.jpg]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T13:01:13-07:00 2025-01-16T13:01:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276946#p276946
Gracias, regards, saludos.]]>

Gracias, regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Compuin]]> 2025-01-16T13:06:24-07:00 2025-01-16T13:06:24-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276947#p276947 <![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T13:10:02-07:00 2025-01-16T13:10:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276948#p276948
Gracias, tks.

Regards, saludos.]]>

Gracias, tks.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T13:18:34-07:00 2025-01-16T13:18:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276949#p276949
Download completo de mi mega upload:

https://mega.nz/file/MFkyFCza#3oUrM3KOM ... e-LznIW1w8

Gracias, tks.

Regards, saludos.]]>

Download completo de mi mega upload:

https://mega.nz/file/MFkyFCza#3oUrM3KOM ... e-LznIW1w8

Gracias, tks.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by Compuin]]> 2025-01-16T13:27:57-07:00 2025-01-16T13:27:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276950#p276950 <![CDATA[FiveWin para Harbour/xHarbour :: Re: HBMK2 - Barra de estado y barra principal mas pequenas :: Reply by karinha]]> 2025-01-16T13:34:36-07:00 2025-01-16T13:34:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45312&p=276951#p276951
Compuin wrote: Thu Jan 16, 2025 8:27 pm Sigue siendo mas pequeno el generado con hbmk2.exe
No uso. Mira se ayuda:

https://forums.fivetechsupport.com/view ... rt#p270607

Regards, saludos.]]>
Compuin wrote: Thu Jan 16, 2025 8:27 pm Sigue siendo mas pequeno el generado con hbmk2.exe
No uso. Mira se ayuda:

https://forums.fivetechsupport.com/view ... rt#p270607

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Se cambió el Host? :: Author Armando]]> 2025-01-12T11:35:01-07:00 2025-01-12T11:35:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276879#p276879
Cambiaste de host?, ahora la apariencia del foro es diferente, la anterior era más amigable. o me falta configurarlo?

Saludis]]>

Cambiaste de host?, ahora la apariencia del foro es diferente, la anterior era más amigable. o me falta configurarlo?

Saludis]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-12T12:32:31-07:00 2025-01-12T12:32:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276880#p276880 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by FiveWiDi]]> 2025-01-12T14:24:43-07:00 2025-01-12T14:24:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276883#p276883
Armando wrote: Sun Jan 12, 2025 6:35 pm Master:

Cambiaste de host?, ahora la apariencia del foro es diferente, la anterior era más amigable. o me falta configurarlo?

Saludis
+1]]>
Armando wrote: Sun Jan 12, 2025 6:35 pm Master:

Cambiaste de host?, ahora la apariencia del foro es diferente, la anterior era más amigable. o me falta configurarlo?

Saludis
+1]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-12T14:38:05-07:00 2025-01-12T14:38:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276884#p276884
Hemos aguantado todo lo posible con él, pero ahora toca cambio :)

Nos acostumbraremos :wink:]]>

Hemos aguantado todo lo posible con él, pero ahora toca cambio :)

Nos acostumbraremos :wink:]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-12T14:42:57-07:00 2025-01-12T14:42:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276885#p276885 https://www.phpbb.com/community/viewtop ... #p16047790]]> https://www.phpbb.com/community/viewtop ... #p16047790]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by sysctrl2]]> 2025-01-13T13:49:03-07:00 2025-01-13T13:49:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276888#p276888 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by leandro]]> 2025-01-13T16:37:48-07:00 2025-01-13T16:37:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276891#p276891
Sali unos días de vacaciones y al regresar me tope con que habían actualizado el foro jejejejejeje, que bien, si se ve mucho mas moderno. Por otro lado para los que no se puedan loguear, como me sucedió :x , se deben borrar las cookies del navegador, gracias Antonio, como puedes notar, ya me dejo ingresar jejejejeje.]]>

Sali unos días de vacaciones y al regresar me tope con que habían actualizado el foro jejejejejeje, que bien, si se ve mucho mas moderno. Por otro lado para los que no se puedan loguear, como me sucedió :x , se deben borrar las cookies del navegador, gracias Antonio, como puedes notar, ya me dejo ingresar jejejejeje.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by paquitohm]]> 2025-01-14T01:51:13-07:00 2025-01-14T01:51:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276897#p276897 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-14T04:04:37-07:00 2025-01-14T04:04:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276900#p276900
sysctrl2 wrote: Mon Jan 13, 2025 8:49 pm Maestro al parecer se perdió información ?
La actualización desde la antigua versión 3.0.4 de phpbb que usábamos a la nueva phpbb 3.3.14 la realiza un complejo script que proporciona phpbb. Démonos por contentos de que ha funcionado :)

De todas formas, aqui tenemos guardado un SQL dump completo de los foros antiguos asi como una DBF con todos los mensajes publicados hasta el 5 de enero del 2025. Es decir, no se ha perdido nada, pero la migración si ha perdido enlaces.

https://huggingface.co/datasets/fivetec ... /tree/main

No ha sido nuestra decisión migrar. La empresa de hosting modificó algo que hizo que dejase de funcionar. Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba. De todo se aprende :)]]>
sysctrl2 wrote: Mon Jan 13, 2025 8:49 pm Maestro al parecer se perdió información ?
La actualización desde la antigua versión 3.0.4 de phpbb que usábamos a la nueva phpbb 3.3.14 la realiza un complejo script que proporciona phpbb. Démonos por contentos de que ha funcionado :)

De todas formas, aqui tenemos guardado un SQL dump completo de los foros antiguos asi como una DBF con todos los mensajes publicados hasta el 5 de enero del 2025. Es decir, no se ha perdido nada, pero la migración si ha perdido enlaces.

https://huggingface.co/datasets/fivetec ... /tree/main

No ha sido nuestra decisión migrar. La empresa de hosting modificó algo que hizo que dejase de funcionar. Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba. De todo se aprende :)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-14T04:10:01-07:00 2025-01-14T04:10:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276901#p276901
A veces hay que borrar las cookies. Nuevas versiones, nuevas historias :wink:]]>

A veces hay que borrar las cookies. Nuevas versiones, nuevas historias :wink:]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by Antonio Linares]]> 2025-01-14T04:12:06-07:00 2025-01-14T04:12:06-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276902#p276902
paquitohm wrote: Tue Jan 14, 2025 8:51 am En mi caso ni con Delete cookies del bottom del foro funciona en Chrome ni en Edge. Sólo me funciona en Opera
Querido Paco,

Borra las cookies desde el inspector del browser. La opción de borrado de los foros no siempre funciona.

Borrándolas desde el navegador van bien :)]]>
paquitohm wrote: Tue Jan 14, 2025 8:51 am En mi caso ni con Delete cookies del bottom del foro funciona en Chrome ni en Edge. Sólo me funciona en Opera
Querido Paco,

Borra las cookies desde el inspector del browser. La opción de borrado de los foros no siempre funciona.

Borrándolas desde el navegador van bien :)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by FiveWiDi]]> 2025-01-14T09:02:39-07:00 2025-01-14T09:02:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276910#p276910
No ha sido nuestra decisión migrar.
No lo dudo.
La empresa de hosting modificó algo que hizo que dejase de funcionar.
Que raro, eso no sucede nunca.
Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba.
Eso no es cierto, la restauración de backup NUNCA fallan, JAMÁS!!
Sólo producen sudores fríos, muy fríos. :lol: :lol: :lol:

El otro día intenté restaurar una copia de una contabilidad (que desde hace 2 años subieron a la nube) y se siguen haciendo copias de seguridad diarias en local.
Les dije: "Menos mal que todo funciona por que lo que es este backup ni con gasolina con plomo." (nos lo comeremos con patatas, pensé).
Que gran favor eso de poner cosas en la nube!!! Me dejan dormir tranquilo, me quitan responsabilidad (trabajo no).]]>
No ha sido nuestra decisión migrar.
No lo dudo.
La empresa de hosting modificó algo que hizo que dejase de funcionar.
Que raro, eso no sucede nunca.
Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba.
Eso no es cierto, la restauración de backup NUNCA fallan, JAMÁS!!
Sólo producen sudores fríos, muy fríos. :lol: :lol: :lol:

El otro día intenté restaurar una copia de una contabilidad (que desde hace 2 años subieron a la nube) y se siguen haciendo copias de seguridad diarias en local.
Les dije: "Menos mal que todo funciona por que lo que es este backup ni con gasolina con plomo." (nos lo comeremos con patatas, pensé).
Que gran favor eso de poner cosas en la nube!!! Me dejan dormir tranquilo, me quitan responsabilidad (trabajo no).]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by FranciscoA]]> 2025-01-16T19:50:23-07:00 2025-01-16T19:50:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276954#p276954 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Se cambió el Host? :: Reply by FranciscoA]]> 2025-01-16T19:57:11-07:00 2025-01-16T19:57:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45302&p=276955#p276955 Gracias.]]> Gracias.]]> <![CDATA[FiveWin para Harbour/xHarbour :: No pintar totales finales, cómo? :: Author Armando]]> 2025-01-16T11:58:55-07:00 2025-01-16T11:58:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45314&p=276944#p276944
Tengo un reporte (TREPORT) definido con grupos, y defino totales por grupo, esto funciona muy bien
el tema es que también me pinta los totales finales, la pregunta, ¿ cómo evitar que se pinten
los totales finales?

Este es mi código

REPORT oReporte CAPTION cTitulo PREVIEW;
HEADER ALLTRIM(oApp:cRazonSocial),;
"",;
cTitulo CENTER;
TITLE "Fecha: "+Date2Txt(DATE(),,,,,,),;
"Página:"+STR(oReporte:nPage,3);
FONT oFont1,oFont2,oFont3;
PEN oPen1

COLUMN TITLE "","Folio" DATA oRsDet:Fields("DET_FOL"):Value SIZE 5 RIGHT PICTURE "@Z 9999999"
COLUMN TITLE "","Fecha" DATA Date2Txt(oRsDet:Fields("HDR_FDM"):Value) SIZE 10 RIGHT
COLUMN TITLE "Cantidad","De Entrada" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_CTD"):Value,"") SIZE 08 RIGHT PICTURE "@Z 9,999.999" TOTAL
COLUMN TITLE "","Unitario" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_COU"):Value,"") SIZE 07 RIGHT PICTURE "@Z 99,999.99"
COLUMN TITLE "Importe","De Entrada" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_COS"):Value,"") SIZE 10 RIGHT PICTURE "@Z 999,999,999.99" TOTAL
COLUMN TITLE "Cantidad","De Salida" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_CTD"):Value,"") SIZE 08 RIGHT PICTURE "@Z 9,999.999" TOTAL
COLUMN TITLE "","Unitario" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_COU"):Value,"") SIZE 07 RIGHT PICTURE "@Z 99,999.99"
COLUMN TITLE "Importe","De Salida" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_COS"):Value,"") SIZE 10 RIGHT PICTURE "@Z 999,999,999.99" TOTAL
COLUMN TITLE "Sucursal" DATA IIF(oRsDet:Fields("SUC_NOM"):Value <> Nil,;
AllTrim(oRsDet:Fields("SUC_NOM"):Value),"") SIZE 18 LEFT
GROUP gMaterial ON oRsDet:Fields("DET_MAT"):Value;
FOOTER Space(08) + "Totales del material:" FONT 2

gMaterial:bHeader := {|| "* Material: " + oRsDet:Fields("DET_MAT"):Value + " " + IIF(oRsMat:Fields("MAT_DES"):Value <> Nil, AllTrim(oRsMat:Fields("MAT_DES"):Value),"")}
END REPORT
Saludos]]>

Tengo un reporte (TREPORT) definido con grupos, y defino totales por grupo, esto funciona muy bien
el tema es que también me pinta los totales finales, la pregunta, ¿ cómo evitar que se pinten
los totales finales?

Este es mi código

REPORT oReporte CAPTION cTitulo PREVIEW;
HEADER ALLTRIM(oApp:cRazonSocial),;
"",;
cTitulo CENTER;
TITLE "Fecha: "+Date2Txt(DATE(),,,,,,),;
"Página:"+STR(oReporte:nPage,3);
FONT oFont1,oFont2,oFont3;
PEN oPen1

COLUMN TITLE "","Folio" DATA oRsDet:Fields("DET_FOL"):Value SIZE 5 RIGHT PICTURE "@Z 9999999"
COLUMN TITLE "","Fecha" DATA Date2Txt(oRsDet:Fields("HDR_FDM"):Value) SIZE 10 RIGHT
COLUMN TITLE "Cantidad","De Entrada" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_CTD"):Value,"") SIZE 08 RIGHT PICTURE "@Z 9,999.999" TOTAL
COLUMN TITLE "","Unitario" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_COU"):Value,"") SIZE 07 RIGHT PICTURE "@Z 99,999.99"
COLUMN TITLE "Importe","De Entrada" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 1,;
oRsDet:Fields("DET_COS"):Value,"") SIZE 10 RIGHT PICTURE "@Z 999,999,999.99" TOTAL
COLUMN TITLE "Cantidad","De Salida" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_CTD"):Value,"") SIZE 08 RIGHT PICTURE "@Z 9,999.999" TOTAL
COLUMN TITLE "","Unitario" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_COU"):Value,"") SIZE 07 RIGHT PICTURE "@Z 99,999.99"
COLUMN TITLE "Importe","De Salida" DATA IIF(oRsDet:Fields("HDR_EOS"):Value == 2,;
oRsDet:Fields("DET_COS"):Value,"") SIZE 10 RIGHT PICTURE "@Z 999,999,999.99" TOTAL
COLUMN TITLE "Sucursal" DATA IIF(oRsDet:Fields("SUC_NOM"):Value <> Nil,;
AllTrim(oRsDet:Fields("SUC_NOM"):Value),"") SIZE 18 LEFT
GROUP gMaterial ON oRsDet:Fields("DET_MAT"):Value;
FOOTER Space(08) + "Totales del material:" FONT 2

gMaterial:bHeader := {|| "* Material: " + oRsDet:Fields("DET_MAT"):Value + " " + IIF(oRsMat:Fields("MAT_DES"):Value <> Nil, AllTrim(oRsMat:Fields("MAT_DES"):Value),"")}
END REPORT
Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: No pintar totales finales, cómo? :: Reply by FranciscoA]]> 2025-01-16T20:01:41-07:00 2025-01-16T20:01:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45314&p=276957#p276957 //No poner el gran total para determinada columna

Code: Select all | Expand

 oReport:bEnd:={|| oReport:aColumns[5]:nTotal := 0,oReport:aColumns[6]:nTotal := 0 }
]]>
//No poner el gran total para determinada columna

Code: Select all | Expand

 oReport:bEnd:={|| oReport:aColumns[5]:nTotal := 0,oReport:aColumns[6]:nTotal := 0 }
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: No pintar totales finales, cómo? :: Reply by Armando]]> 2025-01-16T21:01:27-07:00 2025-01-16T21:01:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45314&p=276959#p276959
Funcionó de 100, aunque pensé que existía algo parecido a oReporte:cGrandTotal := ""

Revise la clase pero no encontré.

Saludos]]>

Funcionó de 100, aunque pensé que existía algo parecido a oReporte:cGrandTotal := ""

Revise la clase pero no encontré.

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Colores en las filas de un xbrowse :: Author TOTOVIOTTI]]> 2025-01-15T06:54:05-07:00 2025-01-15T06:54:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276921#p276921 Les hago una consulta: se puede colorear filas de un xbrowse sin tener algo fijo,
por ejemplo, necesito colorear las filas cuyos comprobantes corresponden al mismo cliente,
o son de la misma fecha, o lo que sea, controlar el color de las filas dependiendo el contenido de las mismas,
no con algo fijo, por ejemplo, si el cliente es igual a "xxxx", sino, colorear de cualquier color, los comprobantes
que sean del mismo cliente... ?

Lo necesito para un caso especial, el ejemplo no es el más conveniente, pero para que se entienda, lo explico así...

Desde ya, muchas gracias!!

Roberto]]>
Les hago una consulta: se puede colorear filas de un xbrowse sin tener algo fijo,
por ejemplo, necesito colorear las filas cuyos comprobantes corresponden al mismo cliente,
o son de la misma fecha, o lo que sea, controlar el color de las filas dependiendo el contenido de las mismas,
no con algo fijo, por ejemplo, si el cliente es igual a "xxxx", sino, colorear de cualquier color, los comprobantes
que sean del mismo cliente... ?

Lo necesito para un caso especial, el ejemplo no es el más conveniente, pero para que se entienda, lo explico así...

Desde ya, muchas gracias!!

Roberto]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by karinha]]> 2025-01-15T07:06:24-07:00 2025-01-15T07:06:24-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276922#p276922
https://www.fivetechsoft.com/forums/vie ... td#p234927

Regards, saludos.]]>

https://www.fivetechsoft.com/forums/vie ... td#p234927

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by TOTOVIOTTI]]> 2025-01-15T07:26:54-07:00 2025-01-15T07:26:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276923#p276923 Pero no, en este caso hay una condición prestablecida, ya sé
porque "condición" debo colorear.
En mi caso, esa condición será variable, depende por ejemplo, que coincida
la fecha del comprobante, o el número de comprobante o el cliente.

Saludos
Muchas gracias!
Roberto]]>
Pero no, en este caso hay una condición prestablecida, ya sé
porque "condición" debo colorear.
En mi caso, esa condición será variable, depende por ejemplo, que coincida
la fecha del comprobante, o el número de comprobante o el cliente.

Saludos
Muchas gracias!
Roberto]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by sysctrl2]]> 2025-01-15T11:11:20-07:00 2025-01-15T11:11:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276924#p276924 sería un efecto pijama basado en el código del cliente, :roll: :roll: :roll: :roll:
Image]]>
sería un efecto pijama basado en el código del cliente, :roll: :roll: :roll: :roll:
Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by TOTOVIOTTI]]> 2025-01-16T06:34:43-07:00 2025-01-16T06:34:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276929#p276929 una solución interesante que me propuso el amigo César Gómez de Argentina..

FUNCTION Roberto()
LOCAL oBrw, oCn, oRs, oForm
oCn := maria_Connect( "localhost:3306,test,root,prueba", .t. )
if oCn == nil
? "can not connect to server"
return nil
endif
oRs := oCn:query("SELECT * from roberto order by fecha ")
DEFINE DIALOG oForm TITLE "Roberto" FROM 05,15 TO 36,99

@05,05 XBROWSE oBrw DATASOURCE oRs;
COLUMNS "fecha","nombre","comprobante","importe";
HEADERS "Fecha","Cliente","Comprobante","Importe";
SIZES 80,200,100,90;
FOOTERS;
OF oForm CELL SIZE 300,200 PIXEL
WITH OBJECT oBrw
:bClrStd := { || { CLR_BLACK, RGB(255-44*oRs:codcli,255-66*oRs:codcli,11*oRs:codcli) } }
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oForm CENTER


RETURN nil

Hay que trabajar un poquito el tema de los colores y el rango entre 1 y 255, pero la idea está!

Saludos

Roberto]]>
una solución interesante que me propuso el amigo César Gómez de Argentina..

FUNCTION Roberto()
LOCAL oBrw, oCn, oRs, oForm
oCn := maria_Connect( "localhost:3306,test,root,prueba", .t. )
if oCn == nil
? "can not connect to server"
return nil
endif
oRs := oCn:query("SELECT * from roberto order by fecha ")
DEFINE DIALOG oForm TITLE "Roberto" FROM 05,15 TO 36,99

@05,05 XBROWSE oBrw DATASOURCE oRs;
COLUMNS "fecha","nombre","comprobante","importe";
HEADERS "Fecha","Cliente","Comprobante","Importe";
SIZES 80,200,100,90;
FOOTERS;
OF oForm CELL SIZE 300,200 PIXEL
WITH OBJECT oBrw
:bClrStd := { || { CLR_BLACK, RGB(255-44*oRs:codcli,255-66*oRs:codcli,11*oRs:codcli) } }
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oForm CENTER


RETURN nil

Hay que trabajar un poquito el tema de los colores y el rango entre 1 y 255, pero la idea está!

Saludos

Roberto]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by sysctrl2]]> 2025-01-16T16:00:03-07:00 2025-01-16T16:00:03-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276952#p276952 saludos !]]> saludos !]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by jacgsoft]]> 2025-01-17T14:31:56-07:00 2025-01-17T14:31:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=276972#p276972 columna adicional el cual tendrá un correlativo del 1 al infinito. El numero representa el agrupamiento de lo que tu desees (Código de la empresa, código de cliente, fecha de venta, etc.)

Ejemplo:

Codigo fecha nombre Ventas Columna adicional
------------------------------------------------- -----------------------
10 2024-01-01 Empresa1 100.20 1
10 2024-01-20 Empresa1 500.80 1
11 2024-01-01 Empresa2 80.20 2
11 2024-01-31 Empresa2 180.20 2
20 2024-02-01 Empresa3 10.20 3
30 2024-02-20 Empresa3 50.80 3


Luego aplicar lo ya conocido, para el efecto Pijama sobre la columna adicional.

oBrw:bClrStd = { || If( oBrw:oCol('Columna adicional'):value % 2 == 0, ;
{ CLR_BLACK, RGB( 198, 255, 198 ) }, ;
{ CLR_BLACK, RGB( 232, 255, 232 ) } ) }]]>
columna adicional el cual tendrá un correlativo del 1 al infinito. El numero representa el agrupamiento de lo que tu desees (Código de la empresa, código de cliente, fecha de venta, etc.)

Ejemplo:

Codigo fecha nombre Ventas Columna adicional
------------------------------------------------- -----------------------
10 2024-01-01 Empresa1 100.20 1
10 2024-01-20 Empresa1 500.80 1
11 2024-01-01 Empresa2 80.20 2
11 2024-01-31 Empresa2 180.20 2
20 2024-02-01 Empresa3 10.20 3
30 2024-02-20 Empresa3 50.80 3


Luego aplicar lo ya conocido, para el efecto Pijama sobre la columna adicional.

oBrw:bClrStd = { || If( oBrw:oCol('Columna adicional'):value % 2 == 0, ;
{ CLR_BLACK, RGB( 198, 255, 198 ) }, ;
{ CLR_BLACK, RGB( 232, 255, 232 ) } ) }]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Colores en las filas de un xbrowse :: Reply by russimicro]]> 2025-01-18T03:36:46-07:00 2025-01-18T03:36:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45310&p=277005#p277005

Code: Select all | Expand


                     :bClrStd    := { || If( (cAliTab  )->(oBrwFW2:KeyNo()) % 2 == 0, ;
                                    {  RGB(0,0,0), IF( (cAliTab  )->cEstProTra == "S", RGB(136,119,134), ;
                                                                    IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156),  RGB( 234,234,234 ))  ) },;
                                    {  RGB(0,0,0), IF((cAliTab  )->cEstProTra == "S", RGB(136,119,134), ;
                                                                    IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156),  RGB( 255,255,242 ) )  ) } ) }

]]>

Code: Select all | Expand


                     :bClrStd    := { || If( (cAliTab  )->(oBrwFW2:KeyNo()) % 2 == 0, ;
                                    {  RGB(0,0,0), IF( (cAliTab  )->cEstProTra == "S", RGB(136,119,134), ;
                                                                    IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156),  RGB( 234,234,234 ))  ) },;
                                    {  RGB(0,0,0), IF((cAliTab  )->cEstProTra == "S", RGB(136,119,134), ;
                                                                    IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156),  RGB( 255,255,242 ) )  ) } ) }

]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Problemas con curl compilado msvc y harbour :: Author leandro]]> 2025-01-18T13:43:39-07:00 2025-01-18T13:43:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45322&p=277014#p277014
Lo que si determino Enrico, es que es únicamente con xharbour y en 64 bits, por eso la necesidad de migrar.

El post del error en las operaciones, por si alguien quiere consultarlo.
https://forums.fivetechsupport.com/view ... hp?t=45315

Por otro lado, ya logramos compilar la aplicación, pero hay varias cosas que no logramos hacer funcionar, en este post vamos a reportar el problema con la libcurl, montamos este ejemplo para ver si alguien nos puede ayudar, tampoco sabemos si hace falta agregar alguna lib o dll.

El codigo:

Code: Select all | Expand

#include "FiveWin.ch"
#include "hbcurl.ch"

function Main()
	recuperainfo() //Con el este código funciona, lo montamos para comprobar que el endpoint está funcionando.
	recuperainfocurl()  //Pero con curl no arranca.
return nil

Function recuperainfo()
Local aHasRes
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")

IF !IsInternet()
	msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
	user := "hymlymatest"
	pass := "HymTestLeo"   //TEMPORAL
	cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))

	//NIT DEL AUTORIZADO
	hInfo["ano"] = cAno
	hInfo["usua"] := user
	hInfo["pass"] := pass

	enviar := hb_jsonEncode( hInfo )	

	ohttp := CreateObject( "MSXML2.XMLHTTP" )
	ohttp:Open( "POST" ,cUrl,.F.)
	oHttp:SetRequestHeader("cache-control", "no-cache")
	ohttp:SetRequestHeader("content-type", "application/json" )
	ohttp:SetRequestHeader("authorization", "Basic "+cBas64 )
	TRY
	  ohttp:Send(enviar)
	CATCH
		msginfo("No Se Pudo Enviar Solicitud")
	END
	response := ohttp:responseText
	
	if valtype(response)!="U"
		aHasRes := hash()
		hb_jsondecode(response ,@aHasRes)
		if valtype(aHasRes)="U"
			aHasRes := {=>}
		endif
	else
		msginfo("Respuesa del servidor no valida")
	endif
	
	xbrowse(aHasRes,"SIN CURL")
	
ENDIF
return nil 

Function recuperainfocurl()
Local aHasRes,enviar,oCurl
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
Local aHeader := {} 

IF !IsInternet()
	msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
	user := "hymlymatest"
	pass := "HymTestLeo"   //TEMPORAL
	cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))

	AADD(aHeader,"Authorization: Basic "+cBas64 )
	AADD(aHeader,"Content-Type: application/json")
	AADD(aHeader,"cache-control: no-cache")

	//NIT DEL AUTORIZADO
	hInfo["ano"] = cAno
	hInfo["usua"] := user
	hInfo["pass"] := pass
	enviar := hb_jsonEncode( hInfo )	

	oCurl = curl_easy_init()
	
	IF !EMPTY( cUrl )
		curl_easy_setopt( oCurl, HB_CURLOPT_URL, cUrl )
		curl_easy_setopt( oCurl, HB_CURLOPT_DL_BUFF_SETUP )
		curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYPEER, 0 )
		curl_easy_setopt( oCurl, HB_CURLOPT_POSTFIELDS, enviar )
		curl_easy_setopt( oCurl, HB_CURLOPT_CUSTOMREQUEST , "POST")
		curl_easy_setopt( oCurl, HB_CURLOPT_HTTPHEADER, aHeader )		

		IF CURL_EASY_PERFORM( oCurl ) == 0
			response = curl_easy_dl_buff_get( oCurl )
		ENDIF
		
		curl_easy_cleanup( oCurl )
	
	ENDIF	
	
	aHasRes := hash()
	
	hb_jsondecode(response ,@aHasRes)
	if valtype(aHasRes)="U"
		aHasRes := {=>}
	endif
	
	xbrowse(aHasRes,"USANDO LA CURL")
	
ENDIF
return nil 
El resultado
Image

La carpeta con los archivos con los que generamos el ejecutable
https://hymplus.com/descargas/cmplar_test_64.zip

Gracias de antemano]]>

Lo que si determino Enrico, es que es únicamente con xharbour y en 64 bits, por eso la necesidad de migrar.

El post del error en las operaciones, por si alguien quiere consultarlo.
https://forums.fivetechsupport.com/view ... hp?t=45315

Por otro lado, ya logramos compilar la aplicación, pero hay varias cosas que no logramos hacer funcionar, en este post vamos a reportar el problema con la libcurl, montamos este ejemplo para ver si alguien nos puede ayudar, tampoco sabemos si hace falta agregar alguna lib o dll.

El codigo:

Code: Select all | Expand

#include "FiveWin.ch"
#include "hbcurl.ch"

function Main()
	recuperainfo() //Con el este código funciona, lo montamos para comprobar que el endpoint está funcionando.
	recuperainfocurl()  //Pero con curl no arranca.
return nil

Function recuperainfo()
Local aHasRes
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")

IF !IsInternet()
	msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
	user := "hymlymatest"
	pass := "HymTestLeo"   //TEMPORAL
	cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))

	//NIT DEL AUTORIZADO
	hInfo["ano"] = cAno
	hInfo["usua"] := user
	hInfo["pass"] := pass

	enviar := hb_jsonEncode( hInfo )	

	ohttp := CreateObject( "MSXML2.XMLHTTP" )
	ohttp:Open( "POST" ,cUrl,.F.)
	oHttp:SetRequestHeader("cache-control", "no-cache")
	ohttp:SetRequestHeader("content-type", "application/json" )
	ohttp:SetRequestHeader("authorization", "Basic "+cBas64 )
	TRY
	  ohttp:Send(enviar)
	CATCH
		msginfo("No Se Pudo Enviar Solicitud")
	END
	response := ohttp:responseText
	
	if valtype(response)!="U"
		aHasRes := hash()
		hb_jsondecode(response ,@aHasRes)
		if valtype(aHasRes)="U"
			aHasRes := {=>}
		endif
	else
		msginfo("Respuesa del servidor no valida")
	endif
	
	xbrowse(aHasRes,"SIN CURL")
	
ENDIF
return nil 

Function recuperainfocurl()
Local aHasRes,enviar,oCurl
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
Local aHeader := {} 

IF !IsInternet()
	msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
	user := "hymlymatest"
	pass := "HymTestLeo"   //TEMPORAL
	cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))

	AADD(aHeader,"Authorization: Basic "+cBas64 )
	AADD(aHeader,"Content-Type: application/json")
	AADD(aHeader,"cache-control: no-cache")

	//NIT DEL AUTORIZADO
	hInfo["ano"] = cAno
	hInfo["usua"] := user
	hInfo["pass"] := pass
	enviar := hb_jsonEncode( hInfo )	

	oCurl = curl_easy_init()
	
	IF !EMPTY( cUrl )
		curl_easy_setopt( oCurl, HB_CURLOPT_URL, cUrl )
		curl_easy_setopt( oCurl, HB_CURLOPT_DL_BUFF_SETUP )
		curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYPEER, 0 )
		curl_easy_setopt( oCurl, HB_CURLOPT_POSTFIELDS, enviar )
		curl_easy_setopt( oCurl, HB_CURLOPT_CUSTOMREQUEST , "POST")
		curl_easy_setopt( oCurl, HB_CURLOPT_HTTPHEADER, aHeader )		

		IF CURL_EASY_PERFORM( oCurl ) == 0
			response = curl_easy_dl_buff_get( oCurl )
		ENDIF
		
		curl_easy_cleanup( oCurl )
	
	ENDIF	
	
	aHasRes := hash()
	
	hb_jsondecode(response ,@aHasRes)
	if valtype(aHasRes)="U"
		aHasRes := {=>}
	endif
	
	xbrowse(aHasRes,"USANDO LA CURL")
	
ENDIF
return nil 
El resultado
Image

La carpeta con los archivos con los que generamos el ejecutable
https://hymplus.com/descargas/cmplar_test_64.zip

Gracias de antemano]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Problemas con curl compilado msvc y harbour :: Reply by Antonio Linares]]> 2025-01-19T08:54:22-07:00 2025-01-19T08:54:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45322&p=277030#p277030
> ya que ni Antonio, ni Enrico han podido dar con la solución.

https://forums.fivetechsupport.com/view ... 29#p277029]]>

> ya que ni Antonio, ni Enrico han podido dar con la solución.

https://forums.fivetechsupport.com/view ... 29#p277029]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Problemas con curl compilado msvc y harbour :: Reply by Antonio Linares]]> 2025-01-19T12:01:32-07:00 2025-01-19T12:01:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45322&p=277034#p277034

https://forums.fivetechsupport.com/view ... 06#p277032]]>


https://forums.fivetechsupport.com/view ... 06#p277032]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Problemas con curl compilado msvc y harbour :: Reply by leandro]]> 2025-01-19T15:52:33-07:00 2025-01-19T15:52:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45322&p=277047#p277047
Antonio Linares wrote: Sun Jan 19, 2025 3:54 pm Querido Leandro,

> ya que ni Antonio, ni Enrico han podido dar con la solución.

https://forums.fivetechsupport.com/view ... 29#p277029
Antonio muchas gracias como siempre por tan eficiente ayuda. Alcance a entrar en pánico jejejejejejeje :oops: :oops: :oops: :oops:]]>
Antonio Linares wrote: Sun Jan 19, 2025 3:54 pm Querido Leandro,

> ya que ni Antonio, ni Enrico han podido dar con la solución.

https://forums.fivetechsupport.com/view ... 29#p277029
Antonio muchas gracias como siempre por tan eficiente ayuda. Alcance a entrar en pánico jejejejejejeje :oops: :oops: :oops: :oops:]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Bug en los operadores fwh2409 xharbour 64 bits (solucionado) :: Author leandro]]> 2025-01-16T16:38:53-07:00 2025-01-16T16:38:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276953#p276953
Image

Esta es la manera como definimos el xbrowse

El problema empezó a suceder cuando compilamos la aplicación con FW2409_64 bits, hicimos la prueba con la versión anterior en 32 bits y no se generar el inconveniente.

Code: Select all | Expand

	@ 100, 5 XBROWSE oBrw ;
	SIZE 385 ,160 OF oSelf:oDlgSpt PIXEL ;
	LINES STYLE FLAT NOBORDER ;
	DATASOURCE ::aRspNm AUTOCOLS 

	ReArrangeCols( oBrw, ::aCols1 )

	WITH OBJECT oBrw
		:lRecordSelector 		:= .T.
		:lHScroll        	:= .T.
		:lVScroll        	:= .T.
		:l2007           	:= .F.
		:lFitGridHeight  		:= .T.
		:nHeaderHeight   		:= 21
		:nRowHeight      	:= 21
		:nMarqueeStyle   		:= MARQSTYLE_HIGHLROW
		:lColDividerComplete 	:= .t.
		:nColorPen       	:= CLR_HGRAY
		:lFullGrid       	:= .T.
		:nStretchCol        	:= STRETCHCOL_LAST
		:bClrHeader      	:= { || { CLR_WHITE, oLamcla:nClrBrwCab, CLR_HGRAY } }
		:lFooter         	:= .t.
		:nFooterLines    		:= 1
		:nFooterHeight   		:= 25
		:nFreeze		 		:= 4
		//:bRClicked 	       	:= {|nRow, nCol | if(!::lNueva,::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }
		:bRClicked 	       	:= {|nRow, nCol | ::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
		:bKeyDown 	       	:= {|nKey,oGet,nCol|::TecItemNomi(nKey,oGet,nCol, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbGraba, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"])}
		:nRecSelColor        	:= RGB( 255, 255, 255 )

		:bClrStd   			:= {|| if(Len( ::aRspNm ) > 0 , ;
								{ CLR_BLACK,clrEstFondo(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
								{ CLR_BLACK,clrEstFondo("S") } ) }	
		:bClrSelFocus 		:= {|| if(Len( ::aRspNm ) > 0 , ;
								{ CLR_WHITE,clrEstSelec(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
								{ CLR_WHITE,clrEstSelec("S") }) }		
		:SetFont( oFont1Cja )
		
	END

	WITH OBJECT oBrw

		//Colocamos los titulos a las columnas
		FOR j:=1 TO len(::aColTt)
			:aCols[j]:cHeader  := ::aColTt[j]
			:aCols[j]:oHeaderFont = oFontCja	
		NEXT 

		//Ahora las especiales
		:aCols[2]:cFooter      = "Nro.Comp » "+alltrim(transform(len(::aRspNm),oLamcla:PIC3))
		:aCols[2]:oFooterFont := oFontCja

		:aCols[3]:cFooter      = "TOTALES »"
		:aCols[3]:oFooterFont := oFontCja
		
		:aCols[6]:bClrStd    		:= {|| { _CLR_GRIS, if(Len( ::aRspNm ) > 0 , colorEstado2_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }  }
		:aCols[6]:bClrSelFocus	:= {|| { CLR_WHITE,if(Len( ::aRspNm ) > 0 ,colorEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }  }
		:aCols[6]:bStrData 		:= { || if(Len( ::aRspNm ) > 0 , nombreEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] ) , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
	
		:aCols[nColDev]:oFooterFont := oFontCja
		:aCols[nColDev]:bClrStd      = {|| {Rgb(55,55,55),nRGB(212,212,212) }  }
		:aCols[nColDev]:bClrSelFocus = {|| {CLR_WHITE,nRGB(139,139,139) }  }
		
		:aCols[nColDed]:oFooterFont := oFontCja
		:aCols[nColDed]:bClrStd      = {|| {Rgb(55,55,55),nRGB(255,187,187) }  }
		:aCols[nColDed]:bClrSelFocus = {|| {CLR_WHITE,nRGB(255,117,117) }  }

		:aCols[nColPag]:oFooterFont := oFontCja
		:aCols[nColPag]:bClrStd      = {|| {Rgb(55,55,55),nRGB(187,255,187) }  }
		:aCols[nColPag]:bClrSelFocus = {|| {CLR_WHITE,nRGB(0,210,0) }  }
		
		//Colocamos los totales en donde sea necesario
		//y tambien ajustamos el ancho de las columnas
		FOR i:=1 TO len(::aColTl)
			if ::aColTl[i] 
				:aCols[i]:nFooterType  := AGGR_SUM
				:aCols[i]:cFooterPicture := oLamcla:PIC7
				:aCols[i]:cEditPicture := oLamcla:PIC7
				:aCols[i]:oFooterFont := oFontCja
			endif
			:aCols[i]:nWidth = ::aColAn[i]	
		NEXT
		
		:MakeTotals()
		
		//Dejamos fija la columna en la derecha
		:oRightCol     := :aCols[nColPag]

	END

	oBrw:CreateFromCode()
]]>

Image

Esta es la manera como definimos el xbrowse

El problema empezó a suceder cuando compilamos la aplicación con FW2409_64 bits, hicimos la prueba con la versión anterior en 32 bits y no se generar el inconveniente.

Code: Select all | Expand

	@ 100, 5 XBROWSE oBrw ;
	SIZE 385 ,160 OF oSelf:oDlgSpt PIXEL ;
	LINES STYLE FLAT NOBORDER ;
	DATASOURCE ::aRspNm AUTOCOLS 

	ReArrangeCols( oBrw, ::aCols1 )

	WITH OBJECT oBrw
		:lRecordSelector 		:= .T.
		:lHScroll        	:= .T.
		:lVScroll        	:= .T.
		:l2007           	:= .F.
		:lFitGridHeight  		:= .T.
		:nHeaderHeight   		:= 21
		:nRowHeight      	:= 21
		:nMarqueeStyle   		:= MARQSTYLE_HIGHLROW
		:lColDividerComplete 	:= .t.
		:nColorPen       	:= CLR_HGRAY
		:lFullGrid       	:= .T.
		:nStretchCol        	:= STRETCHCOL_LAST
		:bClrHeader      	:= { || { CLR_WHITE, oLamcla:nClrBrwCab, CLR_HGRAY } }
		:lFooter         	:= .t.
		:nFooterLines    		:= 1
		:nFooterHeight   		:= 25
		:nFreeze		 		:= 4
		//:bRClicked 	       	:= {|nRow, nCol | if(!::lNueva,::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }
		:bRClicked 	       	:= {|nRow, nCol | ::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
		:bKeyDown 	       	:= {|nKey,oGet,nCol|::TecItemNomi(nKey,oGet,nCol, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbGraba, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"])}
		:nRecSelColor        	:= RGB( 255, 255, 255 )

		:bClrStd   			:= {|| if(Len( ::aRspNm ) > 0 , ;
								{ CLR_BLACK,clrEstFondo(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
								{ CLR_BLACK,clrEstFondo("S") } ) }	
		:bClrSelFocus 		:= {|| if(Len( ::aRspNm ) > 0 , ;
								{ CLR_WHITE,clrEstSelec(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
								{ CLR_WHITE,clrEstSelec("S") }) }		
		:SetFont( oFont1Cja )
		
	END

	WITH OBJECT oBrw

		//Colocamos los titulos a las columnas
		FOR j:=1 TO len(::aColTt)
			:aCols[j]:cHeader  := ::aColTt[j]
			:aCols[j]:oHeaderFont = oFontCja	
		NEXT 

		//Ahora las especiales
		:aCols[2]:cFooter      = "Nro.Comp » "+alltrim(transform(len(::aRspNm),oLamcla:PIC3))
		:aCols[2]:oFooterFont := oFontCja

		:aCols[3]:cFooter      = "TOTALES »"
		:aCols[3]:oFooterFont := oFontCja
		
		:aCols[6]:bClrStd    		:= {|| { _CLR_GRIS, if(Len( ::aRspNm ) > 0 , colorEstado2_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }  }
		:aCols[6]:bClrSelFocus	:= {|| { CLR_WHITE,if(Len( ::aRspNm ) > 0 ,colorEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }  }
		:aCols[6]:bStrData 		:= { || if(Len( ::aRspNm ) > 0 , nombreEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] ) , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
	
		:aCols[nColDev]:oFooterFont := oFontCja
		:aCols[nColDev]:bClrStd      = {|| {Rgb(55,55,55),nRGB(212,212,212) }  }
		:aCols[nColDev]:bClrSelFocus = {|| {CLR_WHITE,nRGB(139,139,139) }  }
		
		:aCols[nColDed]:oFooterFont := oFontCja
		:aCols[nColDed]:bClrStd      = {|| {Rgb(55,55,55),nRGB(255,187,187) }  }
		:aCols[nColDed]:bClrSelFocus = {|| {CLR_WHITE,nRGB(255,117,117) }  }

		:aCols[nColPag]:oFooterFont := oFontCja
		:aCols[nColPag]:bClrStd      = {|| {Rgb(55,55,55),nRGB(187,255,187) }  }
		:aCols[nColPag]:bClrSelFocus = {|| {CLR_WHITE,nRGB(0,210,0) }  }
		
		//Colocamos los totales en donde sea necesario
		//y tambien ajustamos el ancho de las columnas
		FOR i:=1 TO len(::aColTl)
			if ::aColTl[i] 
				:aCols[i]:nFooterType  := AGGR_SUM
				:aCols[i]:cFooterPicture := oLamcla:PIC7
				:aCols[i]:cEditPicture := oLamcla:PIC7
				:aCols[i]:oFooterFont := oFontCja
			endif
			:aCols[i]:nWidth = ::aColAn[i]	
		NEXT
		
		:MakeTotals()
		
		//Dejamos fija la columna en la derecha
		:oRightCol     := :aCols[nColPag]

	END

	oBrw:CreateFromCode()
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los pictures de xbrowse, creo :: Reply by leandro]]> 2025-01-17T06:51:37-07:00 2025-01-17T06:51:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276963#p276963 :oops:

Se me hace que pueden ser los hash; en este caso, cuando cambiamos de 29 a 30 días laborados, salen los asteriscos, notamos que también en el get salen los asteriscos.

Voy a intentar reproducir el error en un exe externo, estaré comentando si encuentro solución o más preguntas.

Image

Image]]>
:oops:

Se me hace que pueden ser los hash; en este caso, cuando cambiamos de 29 a 30 días laborados, salen los asteriscos, notamos que también en el get salen los asteriscos.

Voy a intentar reproducir el error en un exe externo, estaré comentando si encuentro solución o más preguntas.

Image

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los pictures fw2409 64 bits (hash / xbrowse ?) :: Reply by leandro]]> 2025-01-17T07:36:00-07:00 2025-01-17T07:36:00-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276965#p276965

Cuando hacemos la multiplicación por 29 días, funciona correctamente
Image

pero cuando la hacemos por 30 días, tenga sus asteriscos jejejejeje
Image

Tambien notamos que, si hacemos la división por 60, también arroja los asteriscos.
Image

El codigo es tan sencillo como esto:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

Local nSalario := 2032212
Local nDias := 30 //Si lo cambiamos a 30 salen los asteriscos
Local nTotal := (nSalario/30) * nDias

msginfo(nTotal)

return nil


]]>


Cuando hacemos la multiplicación por 29 días, funciona correctamente
Image

pero cuando la hacemos por 30 días, tenga sus asteriscos jejejejeje
Image

Tambien notamos que, si hacemos la división por 60, también arroja los asteriscos.
Image

El codigo es tan sencillo como esto:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

Local nSalario := 2032212
Local nDias := 30 //Si lo cambiamos a 30 salen los asteriscos
Local nTotal := (nSalario/30) * nDias

msginfo(nTotal)

return nil


]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fw2409 64 bits :: Reply by leandro]]> 2025-01-17T08:03:13-07:00 2025-01-17T08:03:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276967#p276967
Image]]>

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fw2409 64 bits :: Reply by karinha]]> 2025-01-17T08:03:37-07:00 2025-01-17T08:03:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276968#p276968

Code: Select all | Expand

// Testing GETs - C:\FWH..\SAMPLES\TESTGET.PRG y TESTGET.RC

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oGet, oGet2, oGet3, oGet4
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL cText := "                "
   LOCAL nNum := 0
   LOCAL dDat := Date()
   LOCAL nSalario := 2032212
   LOCAL nDias    := 30 // Si lo cambiamos a 30 salen los asteriscos
   LOCAL nTotal   := 0
   LOCAL nTotSal  := nSalario / 30

   nTotal := nTotSal * nDias   // Aqui Leandro, prueba.

   nNum   := nTotal

   SET CENTURY ON
   SET DATE BRITISH
   SET TIME FORMAT TO "HH:MM:SS"
   SET EPOCH TO YEAR( DATE() ) - 30
   SET SOFTSEEK OFF
   SET WRAP ON
   SETCANCEL( .F. )
   SET CONFIRM ON
   SET DELETED ON
   SET _3DLOOK ON
   SET UNIQUE OFF
   SET ESCAPE OFF
   SET EXACT ON       // CONTROLA O :=, = e ==
   SET EXCLUSIVE OFF
   SET MULTIPLE OFF
   SET OPTIMIZE ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   oDlg:lHelpIcon := .F.

   @ 1,    2 SAY "Text..:" OF oDlg

   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K" ;
      PLACEHOLDER "CueBanner" // NO FUNCIONA.

   @ 1.8,  2 SAY "Salario:" OF oDlg

   @ 2,    6 GET oGet2 VAR nNum OF oDlg SIZE 60, 12 PICTURE "@E 9,999,999,999.99" RIGHT

   @ 2.6,  2 SAY "Date:" OF oDlg

   @ 3,    6 GET oGet3 VAR dDat PICTURE "@D 99/99/9999" OF oDlg SIZE 60, 10 CENTER

   @ 4,    2 SAY "Text..:" OF oDlg

   @ 4,    6 GET oGet4 VAR cText PICTURE "@!" OF oDlg SIZE 80, 10   ;
      PLACEHOLDER "CueBanner" // FUNCIONA.

   @ 4,    7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
   @ 4,   16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL

   TGet():SetColorFocus( nRGB( 200, 120, 120 ) )

   ACTIVATE DIALOG oDlg CENTERED

   SET CONFIRM OFF

RETURN NIL

// ------------------------------------------------------------------------//

PROCEDURE appsys // XBase++ requirement
RETURN

/*
// TESTGET.RC
#ifndef __64__
  1 24 "C:\FWH\SAMPLES\winxp\WindowsXP.Manifest"
#endif

#ifdef __64__
  1 24 "winxp\WindowsXP.Manifest64"
#endif

*/
Regards, saludos.
]]>

Code: Select all | Expand

// Testing GETs - C:\FWH..\SAMPLES\TESTGET.PRG y TESTGET.RC

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oGet, oGet2, oGet3, oGet4
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL cText := "                "
   LOCAL nNum := 0
   LOCAL dDat := Date()
   LOCAL nSalario := 2032212
   LOCAL nDias    := 30 // Si lo cambiamos a 30 salen los asteriscos
   LOCAL nTotal   := 0
   LOCAL nTotSal  := nSalario / 30

   nTotal := nTotSal * nDias   // Aqui Leandro, prueba.

   nNum   := nTotal

   SET CENTURY ON
   SET DATE BRITISH
   SET TIME FORMAT TO "HH:MM:SS"
   SET EPOCH TO YEAR( DATE() ) - 30
   SET SOFTSEEK OFF
   SET WRAP ON
   SETCANCEL( .F. )
   SET CONFIRM ON
   SET DELETED ON
   SET _3DLOOK ON
   SET UNIQUE OFF
   SET ESCAPE OFF
   SET EXACT ON       // CONTROLA O :=, = e ==
   SET EXCLUSIVE OFF
   SET MULTIPLE OFF
   SET OPTIMIZE ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   oDlg:lHelpIcon := .F.

   @ 1,    2 SAY "Text..:" OF oDlg

   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K" ;
      PLACEHOLDER "CueBanner" // NO FUNCIONA.

   @ 1.8,  2 SAY "Salario:" OF oDlg

   @ 2,    6 GET oGet2 VAR nNum OF oDlg SIZE 60, 12 PICTURE "@E 9,999,999,999.99" RIGHT

   @ 2.6,  2 SAY "Date:" OF oDlg

   @ 3,    6 GET oGet3 VAR dDat PICTURE "@D 99/99/9999" OF oDlg SIZE 60, 10 CENTER

   @ 4,    2 SAY "Text..:" OF oDlg

   @ 4,    6 GET oGet4 VAR cText PICTURE "@!" OF oDlg SIZE 80, 10   ;
      PLACEHOLDER "CueBanner" // FUNCIONA.

   @ 4,    7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
   @ 4,   16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL

   TGet():SetColorFocus( nRGB( 200, 120, 120 ) )

   ACTIVATE DIALOG oDlg CENTERED

   SET CONFIRM OFF

RETURN NIL

// ------------------------------------------------------------------------//

PROCEDURE appsys // XBase++ requirement
RETURN

/*
// TESTGET.RC
#ifndef __64__
  1 24 "C:\FWH\SAMPLES\winxp\WindowsXP.Manifest"
#endif

#ifdef __64__
  1 24 "winxp\WindowsXP.Manifest64"
#endif

*/
Regards, saludos.
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores xharbour 64 bits :: Reply by leandro]]> 2025-01-17T08:12:20-07:00 2025-01-17T08:12:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276969#p276969
Mismo error

No tiene que ver con los pictures y parece ser que el problema es a 64 bits

Image]]>

Mismo error

No tiene que ver con los pictures y parece ser que el problema es a 64 bits

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by karinha]]> 2025-01-17T08:25:34-07:00 2025-01-17T08:25:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276970#p276970
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Enrico Maria Giordano]]> 2025-01-17T15:30:16-07:00 2025-01-17T15:30:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=276973#p276973 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Enrico Maria Giordano]]> 2025-01-18T01:46:25-07:00 2025-01-18T01:46:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277002#p277002

Code: Select all | Expand

FUNCTION MAIN()

    ? 2032212 / 30 * 30

    INKEY( 0 )

    RETURN NIL
]]>

Code: Select all | Expand

FUNCTION MAIN()

    ? 2032212 / 30 * 30

    INKEY( 0 )

    RETURN NIL
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-18T16:31:51-07:00 2025-01-18T16:31:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277019#p277019
HB_P_PUSHDOUBLE, 255, 255, 255, 255, 83, 2, 63, 65, 255, 255, /* 2032212.000000000000000000000000000000000, 255, 255 *]]>

HB_P_PUSHDOUBLE, 255, 255, 255, 255, 83, 2, 63, 65, 255, 255, /* 2032212.000000000000000000000000000000000, 255, 255 *]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-18T16:37:22-07:00 2025-01-18T16:37:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277020#p277020

Code: Select all | Expand

         case HB_P_PUSHDOUBLE:
            hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ 1 ] ),
                                  ( int ) *( const unsigned char * ) &pCode[ 1 + sizeof( double ) ],
                                  ( int ) *( const unsigned char * ) &pCode[ 2 + sizeof( double ) ] );
            pCode += 3 + sizeof( double );
            break;
xHarbour this way:

Code: Select all | Expand

         case HB_P_PUSHDOUBLE:
            HB_TRACE( HB_TR_DEBUG, ( "HB_P_PUSHDOUBLE" ) );

            hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ w + 1 ] ),
                                  ( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) ],
                                  ( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) + sizeof( BYTE ) ] );

            w += 1 + sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE );
            break;
]]>

Code: Select all | Expand

         case HB_P_PUSHDOUBLE:
            hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ 1 ] ),
                                  ( int ) *( const unsigned char * ) &pCode[ 1 + sizeof( double ) ],
                                  ( int ) *( const unsigned char * ) &pCode[ 2 + sizeof( double ) ] );
            pCode += 3 + sizeof( double );
            break;
xHarbour this way:

Code: Select all | Expand

         case HB_P_PUSHDOUBLE:
            HB_TRACE( HB_TR_DEBUG, ( "HB_P_PUSHDOUBLE" ) );

            hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ w + 1 ] ),
                                  ( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) ],
                                  ( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) + sizeof( BYTE ) ] );

            w += 1 + sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE );
            break;
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-18T16:45:21-07:00 2025-01-18T16:45:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277021#p277021

Code: Select all | Expand

static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
   HB_STACK_TLS_PRELOAD
   PHB_ITEM pItem = hb_stackAllocItem();

   HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );

   pItem->type = HB_IT_DOUBLE;
   pItem->item.asDouble.value = dNumber;

   if( iDec == HB_DEFAULT_DECIMALS )
      pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS;
   else
      pItem->item.asDouble.decimal = ( HB_USHORT ) iDec;

   if( iWidth == HB_DEFAULT_WIDTH )
      pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber );
   else
      pItem->item.asDouble.length = ( HB_USHORT ) iWidth;
}
xHarbour's implementation:

Code: Select all | Expand

static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
   HB_THREAD_STUB
   PHB_ITEM pItem;

   HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );

   pItem                      = hb_stackAllocItem();
   pItem->type                = HB_IT_DOUBLE;
   pItem->item.asDouble.value = dNumber;

   if( iDec == HB_DEFAULT_DECIMALS )
      pItem->item.asDouble.decimal = hb_stackSetStruct()->HB_SET_DECIMALS;
   else
      pItem->item.asDouble.decimal = ( UINT ) iDec;

   if( iWidth == HB_DEFAULT_WIDTH )
      pItem->item.asDouble.length = ( UINT ) HB_DBL_LENGTH( dNumber );
   else
      pItem->item.asDouble.length = ( UINT ) iWidth;
}
]]>

Code: Select all | Expand

static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
   HB_STACK_TLS_PRELOAD
   PHB_ITEM pItem = hb_stackAllocItem();

   HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );

   pItem->type = HB_IT_DOUBLE;
   pItem->item.asDouble.value = dNumber;

   if( iDec == HB_DEFAULT_DECIMALS )
      pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS;
   else
      pItem->item.asDouble.decimal = ( HB_USHORT ) iDec;

   if( iWidth == HB_DEFAULT_WIDTH )
      pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber );
   else
      pItem->item.asDouble.length = ( HB_USHORT ) iWidth;
}
xHarbour's implementation:

Code: Select all | Expand

static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
   HB_THREAD_STUB
   PHB_ITEM pItem;

   HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );

   pItem                      = hb_stackAllocItem();
   pItem->type                = HB_IT_DOUBLE;
   pItem->item.asDouble.value = dNumber;

   if( iDec == HB_DEFAULT_DECIMALS )
      pItem->item.asDouble.decimal = hb_stackSetStruct()->HB_SET_DECIMALS;
   else
      pItem->item.asDouble.decimal = ( UINT ) iDec;

   if( iWidth == HB_DEFAULT_WIDTH )
      pItem->item.asDouble.length = ( UINT ) HB_DBL_LENGTH( dNumber );
   else
      pItem->item.asDouble.length = ( UINT ) iWidth;
}
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T00:19:05-07:00 2025-01-19T00:19:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277023#p277023
? 2032212
then we get:
HB_P_PUSHLONG, 84, 2, 31, 0, /* 2032212 */

As soon as we divide it then we get a double:
? 2032212 / 30
HB_P_PUSHDOUBLE, 102, 102, 102, 102, 198, 137, 240, 64, 255, 255, /* 67740.40000000000000000000000000000000000, 255, 255 */

In this case, dividing and multiplying for the same number, we also get a double:
? 2032212 / 30 * 30
HB_P_PUSHDOUBLE, 255, 255, 255, 255, 83, 2, 63, 65, 255, 255, /* 2032212.000000000000000000000000000000000, 255, 255 */

If we multiply before and divide later, we don't get a double:
? 2032212 * 30 / 30
HB_P_PUSHLONG, 84, 2, 31, 0, /* 2032212 *]]>

? 2032212
then we get:
HB_P_PUSHLONG, 84, 2, 31, 0, /* 2032212 */

As soon as we divide it then we get a double:
? 2032212 / 30
HB_P_PUSHDOUBLE, 102, 102, 102, 102, 198, 137, 240, 64, 255, 255, /* 67740.40000000000000000000000000000000000, 255, 255 */

In this case, dividing and multiplying for the same number, we also get a double:
? 2032212 / 30 * 30
HB_P_PUSHDOUBLE, 255, 255, 255, 255, 83, 2, 63, 65, 255, 255, /* 2032212.000000000000000000000000000000000, 255, 255 */

If we multiply before and divide later, we don't get a double:
? 2032212 * 30 / 30
HB_P_PUSHLONG, 84, 2, 31, 0, /* 2032212 *]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T00:43:39-07:00 2025-01-19T00:43:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277024#p277024

Code: Select all | Expand

FUNCTION MAIN()

    ? Test( 2032212 / 30 * 30 )

    INKEY( 0 )

    RETURN NIL

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   char buffer[ 50 ];
   double number = hb_parnd( 1 );
   sprintf( buffer, "%f", number );
   OutputDebugString( buffer ); 
   hb_retnd( number );
}

#pragma ENDDUMP
Image]]>

Code: Select all | Expand

FUNCTION MAIN()

    ? Test( 2032212 / 30 * 30 )

    INKEY( 0 )

    RETURN NIL

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   char buffer[ 50 ];
   double number = hb_parnd( 1 );
   sprintf( buffer, "%f", number );
   OutputDebugString( buffer ); 
   hb_retnd( number );
}

#pragma ENDDUMP
Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T01:04:59-07:00 2025-01-19T01:04:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277025#p277025

Code: Select all | Expand

function Main()

   Test( 2032212 / 30 * 30, 50, 2 )

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ), 
                                  hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
}

#pragma ENDDUMP
]]>

Code: Select all | Expand

function Main()

   Test( 2032212 / 30 * 30, 50, 2 )

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ), 
                                  hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
}

#pragma ENDDUMP
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T01:06:24-07:00 2025-01-19T01:06:24-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277026#p277026
/* converts a numeric to a string with optional width & precision.
This function should be used by any function that wants to format numeric
data for displaying, printing, or putting in a database.

Note: The caller is responsible for calling hb_xfree to free the results
buffer, but ONLY if the return value is not a NULL pointer! (If a NULL
pointer is returned, then there was a conversion error.)
*/
char * hb_itemStr( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
]]>
/* converts a numeric to a string with optional width & precision.
This function should be used by any function that wants to format numeric
data for displaying, printing, or putting in a database.

Note: The caller is responsible for calling hb_xfree to free the results
buffer, but ONLY if the return value is not a NULL pointer! (If a NULL
pointer is returned, then there was a conversion error.)
*/
char * hb_itemStr( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T01:26:02-07:00 2025-01-19T01:26:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277027#p277027
/* converts a numeric to a padded string iSize length and iDec number
of digits after dot.
Note: szResult has to be at least iSize + 1 length.
*/
BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )
...
/* Set to asterisks in case of overflow */
if( iPos < 0 )
{
memset( szResult, '*', iSize );
return FALSE;
}
]]>
/* converts a numeric to a padded string iSize length and iDec number
of digits after dot.
Note: szResult has to be at least iSize + 1 length.
*/
BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )
...
/* Set to asterisks in case of overflow */
if( iPos < 0 )
{
memset( szResult, '*', iSize );
return FALSE;
}
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T01:58:12-07:00 2025-01-19T01:58:12-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277028#p277028
BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )

as xHarbour reports the number is NOT finite and thus the "*":

Code: Select all | Expand

function Main()

   Test( 2032212 / 30 * 30, 50, 2 )

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>

#define HB_FINITE_DBL( d )  ( _finite( d ) != 0 )

HB_FUNC( TEST )
{
   PHB_ITEM pNumber = hb_param( 1, HB_IT_DOUBLE );
   char buffer[ 100 ];
   OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ), 
                                  hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
   sprintf (buffer, "%i", (int) pNumber->item.asDouble.length );                               
   OutputDebugString( buffer );
   if( HB_FINITE_DBL( hb_parnd( 1 ) ) )
      OutputDebugString( "Finite" );
   else
      OutputDebugString( "Not finite" ); 
}

#pragma ENDDUMP
]]>

BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )

as xHarbour reports the number is NOT finite and thus the "*":

Code: Select all | Expand

function Main()

   Test( 2032212 / 30 * 30, 50, 2 )

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>

#define HB_FINITE_DBL( d )  ( _finite( d ) != 0 )

HB_FUNC( TEST )
{
   PHB_ITEM pNumber = hb_param( 1, HB_IT_DOUBLE );
   char buffer[ 100 ];
   OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ), 
                                  hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
   sprintf (buffer, "%i", (int) pNumber->item.asDouble.length );                               
   OutputDebugString( buffer );
   if( HB_FINITE_DBL( hb_parnd( 1 ) ) )
      OutputDebugString( "Finite" );
   else
      OutputDebugString( "Not finite" ); 
}

#pragma ENDDUMP
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Antonio Linares]]> 2025-01-19T08:17:43-07:00 2025-01-19T08:17:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277029#p277029

Dear Enrico,

Could you please modify this on xHarbour source code ?
xharbour/source/vm/itemapi.c

on line 1426:

#if defined( __RSXNT__ ) || defined( __EMX__ ) || \
defined( __XCC__ ) || defined( __POCC__ ) || defined( __DMC__ ) || \
defined( HB_OS_HPUX )
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )
#elif defined( __clang__ )
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )

#elif defined( __WATCOMC__ ) || defined( __BORLANDC__ ) || defined( _MSC_VER )
# define HB_FINITE_DBL( d ) ( _finite( d ) != 0 )
#elif defined(__APPLE__)
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )
#elif defined( __GNUC__ ) || defined( __DJGPP__ ) || defined( __MINGW32__ ) || \
defined( __LCC__ )
# define HB_FINITE_DBL( d ) ( finite( d ) != 0 )

Please build xHarbour 64 with this change and lets test your example]]>


Dear Enrico,

Could you please modify this on xHarbour source code ?
xharbour/source/vm/itemapi.c

on line 1426:

#if defined( __RSXNT__ ) || defined( __EMX__ ) || \
defined( __XCC__ ) || defined( __POCC__ ) || defined( __DMC__ ) || \
defined( HB_OS_HPUX )
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )
#elif defined( __clang__ )
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )

#elif defined( __WATCOMC__ ) || defined( __BORLANDC__ ) || defined( _MSC_VER )
# define HB_FINITE_DBL( d ) ( _finite( d ) != 0 )
#elif defined(__APPLE__)
# define HB_FINITE_DBL( d ) ( isfinite( d ) != 0 )
#elif defined( __GNUC__ ) || defined( __DJGPP__ ) || defined( __MINGW32__ ) || \
defined( __LCC__ )
# define HB_FINITE_DBL( d ) ( finite( d ) != 0 )

Please build xHarbour 64 with this change and lets test your example]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by Enrico Maria Giordano]]> 2025-01-19T11:18:59-07:00 2025-01-19T11:18:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277032#p277032
http://xharbour.org/index.asp?page=down ... naries_win]]>

http://xharbour.org/index.asp?page=down ... naries_win]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Bug en los operadores fwh2409 xharbour 64 bits :: Reply by leandro]]> 2025-01-19T15:53:46-07:00 2025-01-19T15:53:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45315&p=277048#p277048 :D

Image]]>
:D

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Archivo de compilacion .mak para Visual Studio :: Author Compuin]]> 2025-01-17T14:08:41-07:00 2025-01-19T12:36:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=276971#p276971
Alguien utiliza archivos .mak para compilar con Visual Studio?

Necesito hacerle una consulta

Gracias de antemano]]>

Alguien utiliza archivos .mak para compilar con Visual Studio?

Necesito hacerle una consulta

Gracias de antemano]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-17T16:20:19-07:00 2025-01-17T16:20:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=276995#p276995 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-17T16:26:25-07:00 2025-01-17T16:26:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=276996#p276996
Necesito crearlo indicándole que los .prg y los .c están alojados en carpetas tales como PRG y C y no en el mismo directorio del ejecutable]]>

Necesito crearlo indicándole que los .prg y los .c están alojados en carpetas tales como PRG y C y no en el mismo directorio del ejecutable]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-17T16:45:37-07:00 2025-01-17T16:45:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=276998#p276998

Code: Select all | Expand

# Variables de rutas
PRG_PATH = src\prg
C_PATH = src\c
OBJ_PATH = obj

# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo

# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\file1.prg $(PRG_PATH)\file2.prg
C_FILES = $(C_PATH)\main.c $(C_PATH)\utils.c
OBJ_FILES = $(OBJ_PATH)\main.obj $(OBJ_PATH)\utils.obj

# Regla para construir el programa
all: program.exe

program.exe: $(OBJ_FILES)
    link /out:$@ $^

# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
    $(CC) $(CFLAGS) /c $< /Fo$@

# Limpieza
clean:
    del /Q $(OBJ_PATH)\*.obj program.exe
]]>

Code: Select all | Expand

# Variables de rutas
PRG_PATH = src\prg
C_PATH = src\c
OBJ_PATH = obj

# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo

# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\file1.prg $(PRG_PATH)\file2.prg
C_FILES = $(C_PATH)\main.c $(C_PATH)\utils.c
OBJ_FILES = $(OBJ_PATH)\main.obj $(OBJ_PATH)\utils.obj

# Regla para construir el programa
all: program.exe

program.exe: $(OBJ_FILES)
    link /out:$@ $^

# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
    $(CC) $(CFLAGS) /c $< /Fo$@

# Limpieza
clean:
    del /Q $(OBJ_PATH)\*.obj program.exe
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-17T16:54:22-07:00 2025-01-17T16:54:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=276999#p276999 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-17T18:16:59-07:00 2025-01-17T18:16:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277000#p277000

Code: Select all | Expand

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

tutor04.mak(77) : fatal error U1001: syntax error : illegal character '^' in macro
Stop.

C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>
Y este es el .mak

Code: Select all | Expand

#Microsoft VS2019 make sample, (c) FiveTech Software 2022

HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=C:\vc2022\bin32
SDKDIR=C:\vc2022\bin32

# Variables de rutas
PRG_PATH = prg
C_PATH = c
OBJ_PATH = obj

# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo

# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\Clinica32.prg $(PRG_PATH)\Clinica32Win.prg $(PRG_PATH)\TPublic.prg
C_FILES = $(C_PATH)\Clinica32.c $(C_PATH)\Clinica32Win.c  $(C_PATH)\TPublic.c
OBJ_FILES = $(OBJ_PATH)\Clinica32.obj $(OBJ_PATH)\Clinica32Win.obj $(OBJ_PATH)\TPublic.obj

# Regla para construir el programa
all: program.exe   

# link /OUT:Clinica32.exe @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt
program.exe: $(OBJ_FILES)
   echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   echo kernel32.lib  >> msvc.tmp
   echo user32.lib    >> msvc.tmp
   echo gdi32.lib     >> msvc.tmp
   echo winspool.lib  >> msvc.tmp
   echo comctl32.lib  >> msvc.tmp
   echo comdlg32.lib  >> msvc.tmp
   echo advapi32.lib  >> msvc.tmp
   echo shell32.lib   >> msvc.tmp
   echo ole32.lib     >> msvc.tmp
   echo oleaut32.lib  >> msvc.tmp
   echo uuid.lib      >> msvc.tmp
   echo odbc32.lib    >> msvc.tmp
   echo odbccp32.lib  >> msvc.tmp
   echo iphlpapi.lib  >> msvc.tmp
   echo mpr.lib       >> msvc.tmp
   echo version.lib   >> msvc.tmp
   echo wsock32.lib   >> msvc.tmp
   echo msimg32.lib   >> msvc.tmp
   echo oledlg.lib    >> msvc.tmp
   echo psapi.lib     >> msvc.tmp
   echo gdiplus.lib   >> msvc.tmp
   echo winmm.lib     >> msvc.tmp
   echo ws2_32.lib    >> msvc.tmp
   
   link /out:$@ $^
	
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@	
]]>

Code: Select all | Expand

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

tutor04.mak(77) : fatal error U1001: syntax error : illegal character '^' in macro
Stop.

C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>
Y este es el .mak

Code: Select all | Expand

#Microsoft VS2019 make sample, (c) FiveTech Software 2022

HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=C:\vc2022\bin32
SDKDIR=C:\vc2022\bin32

# Variables de rutas
PRG_PATH = prg
C_PATH = c
OBJ_PATH = obj

# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo

# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\Clinica32.prg $(PRG_PATH)\Clinica32Win.prg $(PRG_PATH)\TPublic.prg
C_FILES = $(C_PATH)\Clinica32.c $(C_PATH)\Clinica32Win.c  $(C_PATH)\TPublic.c
OBJ_FILES = $(OBJ_PATH)\Clinica32.obj $(OBJ_PATH)\Clinica32Win.obj $(OBJ_PATH)\TPublic.obj

# Regla para construir el programa
all: program.exe   

# link /OUT:Clinica32.exe @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt
program.exe: $(OBJ_FILES)
   echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   echo kernel32.lib  >> msvc.tmp
   echo user32.lib    >> msvc.tmp
   echo gdi32.lib     >> msvc.tmp
   echo winspool.lib  >> msvc.tmp
   echo comctl32.lib  >> msvc.tmp
   echo comdlg32.lib  >> msvc.tmp
   echo advapi32.lib  >> msvc.tmp
   echo shell32.lib   >> msvc.tmp
   echo ole32.lib     >> msvc.tmp
   echo oleaut32.lib  >> msvc.tmp
   echo uuid.lib      >> msvc.tmp
   echo odbc32.lib    >> msvc.tmp
   echo odbccp32.lib  >> msvc.tmp
   echo iphlpapi.lib  >> msvc.tmp
   echo mpr.lib       >> msvc.tmp
   echo version.lib   >> msvc.tmp
   echo wsock32.lib   >> msvc.tmp
   echo msimg32.lib   >> msvc.tmp
   echo oledlg.lib    >> msvc.tmp
   echo psapi.lib     >> msvc.tmp
   echo gdiplus.lib   >> msvc.tmp
   echo winmm.lib     >> msvc.tmp
   echo ws2_32.lib    >> msvc.tmp
   
   link /out:$@ $^
	
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@	
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-18T03:00:13-07:00 2025-01-18T03:00:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277003#p277003
link /out:$@ $^

por:

link /out:$@ $*

ó

link /out:$@ $**]]>

link /out:$@ $^

por:

link /out:$@ $*

ó

link /out:$@ $**]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-18T06:29:24-07:00 2025-01-18T06:29:24-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277008#p277008

Code: Select all | Expand

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro
Stop.

C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>

Code: Select all | Expand

link /out:$@ $*
	
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@	
]]>

Code: Select all | Expand

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro
Stop.

C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>

Code: Select all | Expand

link /out:$@ $*
	
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@	
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-18T10:10:04-07:00 2025-01-18T10:10:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277009#p277009
> tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro]]>

> tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-18T11:08:23-07:00 2025-01-18T11:08:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277012#p277012 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-18T15:01:04-07:00 2025-01-18T15:01:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277015#p277015

Code: Select all | Expand

LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol WinMainCRTStartup
one.exe : fatal error LNK1120: 1 unresolved externals
Aca el .mak ajustado

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022

# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG =         \
prg\one.PRG   \
prg\two.PRG   \
prg\three.PRG 

OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
	@echo Vinculando...
	@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp

	@echo kernel32.lib >> msvc.tmp
	@echo user32.lib >> msvc.tmp
	@echo gdi32.lib >> msvc.tmp
	@echo winspool.lib >> msvc.tmp
	@echo comctl32.lib >> msvc.tmp
	@echo comdlg32.lib >> msvc.tmp
	@echo advapi32.lib >> msvc.tmp
	@echo shell32.lib >> msvc.tmp
	@echo ole32.lib >> msvc.tmp
	@echo oleaut32.lib >> msvc.tmp
	@echo uuid.lib >> msvc.tmp
	@echo odbc32.lib >> msvc.tmp
	@echo odbccp32.lib >> msvc.tmp
	@echo iphlpapi.lib >> msvc.tmp
	@echo mpr.lib >> msvc.tmp
	@echo version.lib >> msvc.tmp
	@echo wsock32.lib >> msvc.tmp
	@echo msimg32.lib >> msvc.tmp
	@echo oledlg.lib >> msvc.tmp
	@echo psapi.lib >> msvc.tmp
	@echo gdiplus.lib >> msvc.tmp
	@echo winmm.lib >> msvc.tmp
	@echo ws2_32.lib >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

 $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
 @type link.log

one.res : one.rc
   $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

.prg.obj:
  $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include 
  $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c

 
]]>

Code: Select all | Expand

LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol WinMainCRTStartup
one.exe : fatal error LNK1120: 1 unresolved externals
Aca el .mak ajustado

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022

# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG =         \
prg\one.PRG   \
prg\two.PRG   \
prg\three.PRG 

OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
	@echo Vinculando...
	@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
	@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp

	@echo kernel32.lib >> msvc.tmp
	@echo user32.lib >> msvc.tmp
	@echo gdi32.lib >> msvc.tmp
	@echo winspool.lib >> msvc.tmp
	@echo comctl32.lib >> msvc.tmp
	@echo comdlg32.lib >> msvc.tmp
	@echo advapi32.lib >> msvc.tmp
	@echo shell32.lib >> msvc.tmp
	@echo ole32.lib >> msvc.tmp
	@echo oleaut32.lib >> msvc.tmp
	@echo uuid.lib >> msvc.tmp
	@echo odbc32.lib >> msvc.tmp
	@echo odbccp32.lib >> msvc.tmp
	@echo iphlpapi.lib >> msvc.tmp
	@echo mpr.lib >> msvc.tmp
	@echo version.lib >> msvc.tmp
	@echo wsock32.lib >> msvc.tmp
	@echo msimg32.lib >> msvc.tmp
	@echo oledlg.lib >> msvc.tmp
	@echo psapi.lib >> msvc.tmp
	@echo gdiplus.lib >> msvc.tmp
	@echo winmm.lib >> msvc.tmp
	@echo ws2_32.lib >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

 $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
 @type link.log

one.res : one.rc
   $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

.prg.obj:
  $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include 
  $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c

 
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-18T15:29:51-07:00 2025-01-18T15:29:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277017#p277017
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log

y enlaza ucrt.lib]]>

$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log

y enlaza ucrt.lib]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-18T15:40:33-07:00 2025-01-18T15:40:33-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277018#p277018
Me sigue dando el mismo error.

Code: Select all | Expand

one.c
three.c
two.c
Generating Code...
        echo prg\one.OBJ    prg\two.OBJ    prg\three.OBJ > msvc.tmp
Vinculando...
        IF EXIST one.res echo one.res >> msvc.tmp
        c:\vc2022\bin32\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log
NMAKE : fatal error U1077: 'c:\vc2022\bin32\link' : return code '0x460'
Stop.

C:\vs2022_make>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>
Aqui esta el contenido del log

Code: Select all | Expand

LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Como le digo al Link que los obj estan en la carpeta \OBJ y no en la \PRG ??]]>

Me sigue dando el mismo error.

Code: Select all | Expand

one.c
three.c
two.c
Generating Code...
        echo prg\one.OBJ    prg\two.OBJ    prg\three.OBJ > msvc.tmp
Vinculando...
        IF EXIST one.res echo one.res >> msvc.tmp
        c:\vc2022\bin32\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log
NMAKE : fatal error U1077: 'c:\vc2022\bin32\link' : return code '0x460'
Stop.

C:\vs2022_make>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\vs2022_make>
Aqui esta el contenido del log

Code: Select all | Expand

LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Como le digo al Link que los obj estan en la carpeta \OBJ y no en la \PRG ??]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio (RESUELTO) :: Reply by Antonio Linares]]> 2025-01-19T12:20:39-07:00 2025-01-19T12:20:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277038#p277038

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG = \
    prg\one.PRG \
    prg\two.PRG \
    prg\three.PRG

# Modified to correctly reference obj folder
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
    echo $(OBJS) > msvc.tmp
    @echo Vinculando...
    @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
    @echo kernel32.lib >> msvc.tmp
    @echo user32.lib >> msvc.tmp
    @echo gdi32.lib >> msvc.tmp
    @echo winspool.lib >> msvc.tmp
    @echo comctl32.lib >> msvc.tmp
    @echo comdlg32.lib >> msvc.tmp
    @echo advapi32.lib >> msvc.tmp
    @echo shell32.lib >> msvc.tmp
    @echo ole32.lib >> msvc.tmp
    @echo oleaut32.lib >> msvc.tmp
    @echo uuid.lib >> msvc.tmp
    @echo odbc32.lib >> msvc.tmp
    @echo odbccp32.lib >> msvc.tmp
    @echo iphlpapi.lib >> msvc.tmp
    @echo mpr.lib >> msvc.tmp
    @echo version.lib >> msvc.tmp
    @echo wsock32.lib >> msvc.tmp
    @echo msimg32.lib >> msvc.tmp
    @echo oledlg.lib >> msvc.tmp
    @echo psapi.lib >> msvc.tmp
    @echo gdiplus.lib >> msvc.tmp
    @echo winmm.lib >> msvc.tmp
    @echo ws2_32.lib >> msvc.tmp
    IF EXIST one.res echo one.res >> msvc.tmp
    $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
    @type link.log

one.res : one.rc
    $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

.prg.obj:
    $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
    $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
]]>

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG = \
    prg\one.PRG \
    prg\two.PRG \
    prg\three.PRG

# Modified to correctly reference obj folder
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
    echo $(OBJS) > msvc.tmp
    @echo Vinculando...
    @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
    @echo kernel32.lib >> msvc.tmp
    @echo user32.lib >> msvc.tmp
    @echo gdi32.lib >> msvc.tmp
    @echo winspool.lib >> msvc.tmp
    @echo comctl32.lib >> msvc.tmp
    @echo comdlg32.lib >> msvc.tmp
    @echo advapi32.lib >> msvc.tmp
    @echo shell32.lib >> msvc.tmp
    @echo ole32.lib >> msvc.tmp
    @echo oleaut32.lib >> msvc.tmp
    @echo uuid.lib >> msvc.tmp
    @echo odbc32.lib >> msvc.tmp
    @echo odbccp32.lib >> msvc.tmp
    @echo iphlpapi.lib >> msvc.tmp
    @echo mpr.lib >> msvc.tmp
    @echo version.lib >> msvc.tmp
    @echo wsock32.lib >> msvc.tmp
    @echo msimg32.lib >> msvc.tmp
    @echo oledlg.lib >> msvc.tmp
    @echo psapi.lib >> msvc.tmp
    @echo gdiplus.lib >> msvc.tmp
    @echo winmm.lib >> msvc.tmp
    @echo ws2_32.lib >> msvc.tmp
    IF EXIST one.res echo one.res >> msvc.tmp
    $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
    @type link.log

one.res : one.rc
    $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

.prg.obj:
    $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
    $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio (RESUELTO) :: Reply by Compuin]]> 2025-01-19T12:32:42-07:00 2025-01-19T12:52:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277039#p277039

Code: Select all | Expand

OBJS=$(OBJ:prg\=obj\)

Code: Select all | Expand

C:\vc2022_MAK>nmake one.mak

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'obj\one.obj'
Stop.

C:\vc2022_MAK>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
]]>

Code: Select all | Expand

OBJS=$(OBJ:prg\=obj\)

Code: Select all | Expand

C:\vc2022_MAK>nmake one.mak

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'obj\one.obj'
Stop.

C:\vc2022_MAK>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-19T12:48:26-07:00 2025-01-19T12:48:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277040#p277040

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG = \
    prg\one.PRG \
    prg\two.PRG \
    prg\three.PRG

OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)

# Crear directorio obj si no existe
!IF ![if not exist obj mkdir obj]
!ENDIF

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
    echo $(OBJS) > msvc.tmp
    @echo Vinculando...
    @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
    @echo kernel32.lib >> msvc.tmp
    @echo user32.lib >> msvc.tmp
    @echo gdi32.lib >> msvc.tmp
    @echo winspool.lib >> msvc.tmp
    @echo comctl32.lib >> msvc.tmp
    @echo comdlg32.lib >> msvc.tmp
    @echo advapi32.lib >> msvc.tmp
    @echo shell32.lib >> msvc.tmp
    @echo ole32.lib >> msvc.tmp
    @echo oleaut32.lib >> msvc.tmp
    @echo uuid.lib >> msvc.tmp
    @echo odbc32.lib >> msvc.tmp
    @echo odbccp32.lib >> msvc.tmp
    @echo iphlpapi.lib >> msvc.tmp
    @echo mpr.lib >> msvc.tmp
    @echo version.lib >> msvc.tmp
    @echo wsock32.lib >> msvc.tmp
    @echo msimg32.lib >> msvc.tmp
    @echo oledlg.lib >> msvc.tmp
    @echo psapi.lib >> msvc.tmp
    @echo gdiplus.lib >> msvc.tmp
    @echo winmm.lib >> msvc.tmp
    @echo ws2_32.lib >> msvc.tmp
    IF EXIST one.res echo one.res >> msvc.tmp
    $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
    @type link.log

one.res : one.rc
    $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

# Regla explícita para construir obj\*.obj desde prg\*.prg
{prg\}.prg{obj\}.obj:
    $(HBDIR)\bin\harbour $< /n /w /o$@ /i$(FWDIR)\include;$(HBDIR)\include
    $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Fo$@ $*.c
]]>

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .prg .c .obj .rc .res

PRG = \
    prg\one.PRG \
    prg\two.PRG \
    prg\three.PRG

OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)

# Crear directorio obj si no existe
!IF ![if not exist obj mkdir obj]
!ENDIF

PROJECT: one.EXE

# Enlace final
one.exe : $(OBJS) one.res
    echo $(OBJS) > msvc.tmp
    @echo Vinculando...
    @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
    @echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
    @echo kernel32.lib >> msvc.tmp
    @echo user32.lib >> msvc.tmp
    @echo gdi32.lib >> msvc.tmp
    @echo winspool.lib >> msvc.tmp
    @echo comctl32.lib >> msvc.tmp
    @echo comdlg32.lib >> msvc.tmp
    @echo advapi32.lib >> msvc.tmp
    @echo shell32.lib >> msvc.tmp
    @echo ole32.lib >> msvc.tmp
    @echo oleaut32.lib >> msvc.tmp
    @echo uuid.lib >> msvc.tmp
    @echo odbc32.lib >> msvc.tmp
    @echo odbccp32.lib >> msvc.tmp
    @echo iphlpapi.lib >> msvc.tmp
    @echo mpr.lib >> msvc.tmp
    @echo version.lib >> msvc.tmp
    @echo wsock32.lib >> msvc.tmp
    @echo msimg32.lib >> msvc.tmp
    @echo oledlg.lib >> msvc.tmp
    @echo psapi.lib >> msvc.tmp
    @echo gdiplus.lib >> msvc.tmp
    @echo winmm.lib >> msvc.tmp
    @echo ws2_32.lib >> msvc.tmp
    IF EXIST one.res echo one.res >> msvc.tmp
    $(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
    @type link.log

one.res : one.rc
    $(VCDIR)\rc.exe -r -d__FLAT__ one.rc

# Regla explícita para construir obj\*.obj desde prg\*.prg
{prg\}.prg{obj\}.obj:
    $(HBDIR)\bin\harbour $< /n /w /o$@ /i$(FWDIR)\include;$(HBDIR)\include
    $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Fo$@ $*.c
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-19T13:02:14-07:00 2025-01-19T13:02:14-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277041#p277041

Code: Select all | Expand

obj\one.OBJ : fatal error LNK1107: invalid or corrupt file: cannot read at 0x588

Code: Select all | Expand

obj\one.OBJ obj\two.OBJ obj\three.OBJ 
c:\fwh\lib\FiveH32.lib c:\fwh\lib\FiveHC32.lib 
c:\harbour_msvc\lib\win\msvc\hbrtl.lib 
c:\harbour_msvc\lib\win\msvc\hbvm.lib 
c:\harbour_msvc\lib\win\msvc\gtgui.lib 
c:\harbour_msvc\lib\win\msvc\hblang.lib 
c:\harbour_msvc\lib\win\msvc\hbmacro.lib 
c:\harbour_msvc\lib\win\msvc\hbrdd.lib 
c:\harbour_msvc\lib\win\msvc\rddntx.lib 
c:\harbour_msvc\lib\win\msvc\rddcdx.lib 
c:\harbour_msvc\lib\win\msvc\rddfpt.lib 
c:\harbour_msvc\lib\win\msvc\hbsix.lib 
c:\harbour_msvc\lib\win\msvc\hbdebug.lib 
c:\harbour_msvc\lib\win\msvc\hbcommon.lib 
c:\harbour_msvc\lib\win\msvc\hbpp.lib 
c:\harbour_msvc\lib\win\msvc\hbwin.lib 
c:\harbour_msvc\lib\win\msvc\hbcplr.lib 
c:\harbour_msvc\lib\win\msvc\xhb.lib 
c:\harbour_msvc\lib\win\msvc\hbpcre.lib 
c:\harbour_msvc\lib\win\msvc\hbct.lib 
c:\harbour_msvc\lib\win\msvc\hbcpage.lib 
c:\harbour_msvc\lib\win\msvc\hbzlib.lib 
c:\harbour_msvc\lib\win\msvc\png.lib 
c:\harbour_msvc\lib\win\msvc\hbziparc.lib 
c:\harbour_msvc\lib\win\msvc\hbmzip.lib 
c:\harbour_msvc\lib\win\msvc\minizip.lib 
kernel32.lib 
user32.lib 
gdi32.lib 
winspool.lib 
comctl32.lib 
comdlg32.lib 
advapi32.lib 
shell32.lib 
ole32.lib 
oleaut32.lib 
uuid.lib 
odbc32.lib 
odbccp32.lib 
iphlpapi.lib 
mpr.lib 
version.lib 
wsock32.lib 
msimg32.lib 
oledlg.lib 
psapi.lib 
gdiplus.lib 
winmm.lib 
ws2_32.lib 
one.res 
]]>

Code: Select all | Expand

obj\one.OBJ : fatal error LNK1107: invalid or corrupt file: cannot read at 0x588

Code: Select all | Expand

obj\one.OBJ obj\two.OBJ obj\three.OBJ 
c:\fwh\lib\FiveH32.lib c:\fwh\lib\FiveHC32.lib 
c:\harbour_msvc\lib\win\msvc\hbrtl.lib 
c:\harbour_msvc\lib\win\msvc\hbvm.lib 
c:\harbour_msvc\lib\win\msvc\gtgui.lib 
c:\harbour_msvc\lib\win\msvc\hblang.lib 
c:\harbour_msvc\lib\win\msvc\hbmacro.lib 
c:\harbour_msvc\lib\win\msvc\hbrdd.lib 
c:\harbour_msvc\lib\win\msvc\rddntx.lib 
c:\harbour_msvc\lib\win\msvc\rddcdx.lib 
c:\harbour_msvc\lib\win\msvc\rddfpt.lib 
c:\harbour_msvc\lib\win\msvc\hbsix.lib 
c:\harbour_msvc\lib\win\msvc\hbdebug.lib 
c:\harbour_msvc\lib\win\msvc\hbcommon.lib 
c:\harbour_msvc\lib\win\msvc\hbpp.lib 
c:\harbour_msvc\lib\win\msvc\hbwin.lib 
c:\harbour_msvc\lib\win\msvc\hbcplr.lib 
c:\harbour_msvc\lib\win\msvc\xhb.lib 
c:\harbour_msvc\lib\win\msvc\hbpcre.lib 
c:\harbour_msvc\lib\win\msvc\hbct.lib 
c:\harbour_msvc\lib\win\msvc\hbcpage.lib 
c:\harbour_msvc\lib\win\msvc\hbzlib.lib 
c:\harbour_msvc\lib\win\msvc\png.lib 
c:\harbour_msvc\lib\win\msvc\hbziparc.lib 
c:\harbour_msvc\lib\win\msvc\hbmzip.lib 
c:\harbour_msvc\lib\win\msvc\minizip.lib 
kernel32.lib 
user32.lib 
gdi32.lib 
winspool.lib 
comctl32.lib 
comdlg32.lib 
advapi32.lib 
shell32.lib 
ole32.lib 
oleaut32.lib 
uuid.lib 
odbc32.lib 
odbccp32.lib 
iphlpapi.lib 
mpr.lib 
version.lib 
wsock32.lib 
msimg32.lib 
oledlg.lib 
psapi.lib 
gdiplus.lib 
winmm.lib 
ws2_32.lib 
one.res 
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-19T15:29:01-07:00 2025-01-19T15:29:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277042#p277042
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp

así:

@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp]]>

@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp

así:

@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-19T15:32:08-07:00 2025-01-19T15:32:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277043#p277043
Edita ese OBJ a ver que tiene dentro]]>

Edita ese OBJ a ver que tiene dentro]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-19T15:32:40-07:00 2025-01-19T15:32:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277044#p277044 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-19T15:33:11-07:00 2025-01-19T15:33:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277045#p277045

Code: Select all | Expand

/*
 * Harbour 3.2.0dev (r2008190002)
 * Microsoft Visual C 19.27.29112 (32-bit)
 * Generated C source from "prg\one.prg"
 */

#include "hbvmpub.h"
#include "hbinit.h"


HB_FUNC( MAIN );
HB_FUNC_EXTERN( TWO );
HB_FUNC_EXTERN( THREE );
HB_FUNC_EXTERN( FW_GT );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_INITSTATICS();


HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_ONE )
{ "MAIN", {HB_FS_PUBLIC | HB_FS_FIRST | HB_FS_LOCAL}, {HB_FUNCNAME( MAIN )}, NULL },
{ "TWO", {HB_FS_PUBLIC}, {HB_FUNCNAME( TWO )}, NULL },
{ "THREE", {HB_FS_PUBLIC}, {HB_FUNCNAME( THREE )}, NULL },
{ "FW_GT", {HB_FS_PUBLIC}, {HB_FUNCNAME( FW_GT )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "(_INITSTATICS00002)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_ONE, "prg\\one.prg", 0x0, 0x0003 )

#if defined( HB_PRAGMA_STARTUP )
   #pragma startup hb_vm_SymbolInit_ONE
#elif defined( HB_DATASEG_STARTUP )
   #define HB_DATASEG_BODY    HB_DATASEG_FUNC( hb_vm_SymbolInit_ONE )
   #include "hbiniseg.h"
#endif

HB_FUNC( MAIN )
{
	static const HB_BYTE pcode[] =
	{
		36,7,0,176,1,0,20,0,36,9,0,176,2,0,
		20,0,36,11,0,100,110,7
	};

	hb_vmExecute( pcode, symbols );
}

HB_FUNC_INITSTATICS()
{
	static const HB_BYTE pcode[] =
	{
		117,5,0,2,0,116,5,0,4,0,0,82,1,0,
		100,82,2,0,7
	};

	hb_vmExecute( pcode, symbols );
}

]]>

Code: Select all | Expand

/*
 * Harbour 3.2.0dev (r2008190002)
 * Microsoft Visual C 19.27.29112 (32-bit)
 * Generated C source from "prg\one.prg"
 */

#include "hbvmpub.h"
#include "hbinit.h"


HB_FUNC( MAIN );
HB_FUNC_EXTERN( TWO );
HB_FUNC_EXTERN( THREE );
HB_FUNC_EXTERN( FW_GT );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_INITSTATICS();


HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_ONE )
{ "MAIN", {HB_FS_PUBLIC | HB_FS_FIRST | HB_FS_LOCAL}, {HB_FUNCNAME( MAIN )}, NULL },
{ "TWO", {HB_FS_PUBLIC}, {HB_FUNCNAME( TWO )}, NULL },
{ "THREE", {HB_FS_PUBLIC}, {HB_FUNCNAME( THREE )}, NULL },
{ "FW_GT", {HB_FS_PUBLIC}, {HB_FUNCNAME( FW_GT )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "(_INITSTATICS00002)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_ONE, "prg\\one.prg", 0x0, 0x0003 )

#if defined( HB_PRAGMA_STARTUP )
   #pragma startup hb_vm_SymbolInit_ONE
#elif defined( HB_DATASEG_STARTUP )
   #define HB_DATASEG_BODY    HB_DATASEG_FUNC( hb_vm_SymbolInit_ONE )
   #include "hbiniseg.h"
#endif

HB_FUNC( MAIN )
{
	static const HB_BYTE pcode[] =
	{
		36,7,0,176,1,0,20,0,36,9,0,176,2,0,
		20,0,36,11,0,100,110,7
	};

	hb_vmExecute( pcode, symbols );
}

HB_FUNC_INITSTATICS()
{
	static const HB_BYTE pcode[] =
	{
		117,5,0,2,0,116,5,0,4,0,0,82,1,0,
		100,82,2,0,7
	};

	hb_vmExecute( pcode, symbols );
}

]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-19T15:45:58-07:00 2025-01-19T15:45:58-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277046#p277046
Con este codigo funciona Ok, pero se le debe indicar la carpeta prg porque esta creando alli los .obj

Code: Select all | Expand

$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c 
La idea es tener separado los .prg y los.obj en carpetas diferentes

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .PRG .C .OBJ .RC .RES

PRG =       \
prg\one.PRG      \
prg\two.PRG      \
prg\three.PRG 
#place here as many PRGs as needed

OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)

PROJECT: ONE.EXE

one.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
   @echo Vinculando...
   @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp   
   @echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   @echo kernel32.lib  >> msvc.tmp
   @echo user32.lib    >> msvc.tmp
   @echo gdi32.lib     >> msvc.tmp
   @echo winspool.lib  >> msvc.tmp
   @echo comctl32.lib  >> msvc.tmp
   @echo comdlg32.lib  >> msvc.tmp
   @echo advapi32.lib  >> msvc.tmp
   @echo shell32.lib   >> msvc.tmp
   @echo ole32.lib     >> msvc.tmp
   @echo oleaut32.lib  >> msvc.tmp
   @echo uuid.lib      >> msvc.tmp
   @echo odbc32.lib    >> msvc.tmp
   @echo odbccp32.lib  >> msvc.tmp
   @echo iphlpapi.lib  >> msvc.tmp
   @echo mpr.lib       >> msvc.tmp
   @echo version.lib   >> msvc.tmp
   @echo wsock32.lib   >> msvc.tmp
   @echo msimg32.lib   >> msvc.tmp
   @echo oledlg.lib    >> msvc.tmp
   @echo psapi.lib     >> msvc.tmp
   @echo gdiplus.lib   >> msvc.tmp
   @echo winmm.lib     >> msvc.tmp
   @echo ws2_32.lib    >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   $(VCDIR)\link @msvc.tmp /out:One.exe /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt > link.log
   @type link.log

one.res : one.rc
   $(VCDIR)\rc.exe -r -d__FLAT__ one.rc 

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include 
  $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c 
]]>

Con este codigo funciona Ok, pero se le debe indicar la carpeta prg porque esta creando alli los .obj

Code: Select all | Expand

$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c 
La idea es tener separado los .prg y los.obj en carpetas diferentes

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32

.SUFFIXES: .PRG .C .OBJ .RC .RES

PRG =       \
prg\one.PRG      \
prg\two.PRG      \
prg\three.PRG 
#place here as many PRGs as needed

OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)

PROJECT: ONE.EXE

one.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
   @echo Vinculando...
   @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp   
   @echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   @echo kernel32.lib  >> msvc.tmp
   @echo user32.lib    >> msvc.tmp
   @echo gdi32.lib     >> msvc.tmp
   @echo winspool.lib  >> msvc.tmp
   @echo comctl32.lib  >> msvc.tmp
   @echo comdlg32.lib  >> msvc.tmp
   @echo advapi32.lib  >> msvc.tmp
   @echo shell32.lib   >> msvc.tmp
   @echo ole32.lib     >> msvc.tmp
   @echo oleaut32.lib  >> msvc.tmp
   @echo uuid.lib      >> msvc.tmp
   @echo odbc32.lib    >> msvc.tmp
   @echo odbccp32.lib  >> msvc.tmp
   @echo iphlpapi.lib  >> msvc.tmp
   @echo mpr.lib       >> msvc.tmp
   @echo version.lib   >> msvc.tmp
   @echo wsock32.lib   >> msvc.tmp
   @echo msimg32.lib   >> msvc.tmp
   @echo oledlg.lib    >> msvc.tmp
   @echo psapi.lib     >> msvc.tmp
   @echo gdiplus.lib   >> msvc.tmp
   @echo winmm.lib     >> msvc.tmp
   @echo ws2_32.lib    >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   $(VCDIR)\link @msvc.tmp /out:One.exe /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt > link.log
   @type link.log

one.res : one.rc
   $(VCDIR)\rc.exe -r -d__FLAT__ one.rc 

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include 
  $(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c 
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-19T16:24:55-07:00 2025-01-19T16:24:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277049#p277049
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c

así:

$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c]]>

$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c

así:

$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-19T16:35:44-07:00 2025-01-19T16:35:44-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277050#p277050

Code: Select all | Expand

LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
]]>

Code: Select all | Expand

LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-20T01:47:44-07:00 2025-01-20T01:47:44-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277056#p277056
go.bat

Code: Select all | Expand

setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
nmake test.mak
endlocal
myapp.exe
test.mak

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2025
# Rutas de herramientas y librerías
HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR=c:\Program\ Files\ (x86)\Microsoft\ Visual\ Studio\ 11.0\VC

.SUFFIXES: .prg .c .obj .rc .res

PRG =       \
prg\one.prg      \
prg\two.prg      \
prg\three.prg 
#place here as many PRGs as needed

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:prg=obj)

PROJECT: myapp.exe 

myapp.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
   @echo Vinculando...
   @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp   
   @echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   @echo kernel32.lib  >> msvc.tmp
   @echo user32.lib    >> msvc.tmp
   @echo gdi32.lib     >> msvc.tmp
   @echo winspool.lib  >> msvc.tmp
   @echo comctl32.lib  >> msvc.tmp
   @echo comdlg32.lib  >> msvc.tmp
   @echo advapi32.lib  >> msvc.tmp
   @echo shell32.lib   >> msvc.tmp
   @echo ole32.lib     >> msvc.tmp
   @echo oleaut32.lib  >> msvc.tmp
   @echo uuid.lib      >> msvc.tmp
   @echo odbc32.lib    >> msvc.tmp
   @echo odbccp32.lib  >> msvc.tmp
   @echo iphlpapi.lib  >> msvc.tmp
   @echo mpr.lib       >> msvc.tmp
   @echo version.lib   >> msvc.tmp
   @echo wsock32.lib   >> msvc.tmp
   @echo msimg32.lib   >> msvc.tmp
   @echo oledlg.lib    >> msvc.tmp
   @echo psapi.lib     >> msvc.tmp
   @echo gdiplus.lib   >> msvc.tmp
   @echo winmm.lib     >> msvc.tmp
   @echo ws2_32.lib    >> msvc.tmp
   @echo ucrt.lib      >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   link @msvc.tmp /out:myapp.exe /nologo /subsystem:windows /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libucrt > link.log
   @type link.log

one.res : one.rc
   rc.exe -r -d__FLAT__ one.rc 

obj\one.obj : prg\one.prg
   $(HBDIR)\bin\win\msvc\harbour prg\one.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   

obj\two.obj : prg\two.prg
   $(HBDIR)\bin\win\msvc\harbour prg\two.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   

obj\three.obj : prg\three.prg
   $(HBDIR)\bin\win\msvc\harbour prg\three.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   
Si intentamos generalizar las tres ultimas reglas en una:

Code: Select all | Expand

obj\%.obj : prg\%.prg
    $(HBDIR)\bin\win\msvc\harbour $< /n /w /Oobj\$@ /i$(FWDIR)\include;$(HBDIR)\include 
    cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Entonces da el error de que no sabe como construir obj\one.obj

Eso es lo que falta, pero como te indico, el go.bat y el test.mak aqui funcionan correctamente]]>

go.bat

Code: Select all | Expand

setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
nmake test.mak
endlocal
myapp.exe
test.mak

Code: Select all | Expand

# Microsoft VS2022 make sample, (c) FiveTech Software 2025
# Rutas de herramientas y librerías
HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR=c:\Program\ Files\ (x86)\Microsoft\ Visual\ Studio\ 11.0\VC

.SUFFIXES: .prg .c .obj .rc .res

PRG =       \
prg\one.prg      \
prg\two.prg      \
prg\three.prg 
#place here as many PRGs as needed

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:prg=obj)

PROJECT: myapp.exe 

myapp.exe : $(OBJS) one.res
   echo $(OBJS) > msvc.tmp
   @echo Vinculando...
   @echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp   
   @echo $(HBDIR)\lib\win\msvc\hbrtl.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbvm.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\gtgui.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hblang.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmacro.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbrdd.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddntx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddcdx.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\rddfpt.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbsix.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbdebug.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpp.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbwin.lib    >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcplr.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\xhb.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbpcre.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbct.lib     >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbcpage.lib  >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbzlib.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\png.lib      >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\hbmzip.lib   >> msvc.tmp
   @echo $(HBDIR)\lib\win\msvc\minizip.lib  >> msvc.tmp

   @echo kernel32.lib  >> msvc.tmp
   @echo user32.lib    >> msvc.tmp
   @echo gdi32.lib     >> msvc.tmp
   @echo winspool.lib  >> msvc.tmp
   @echo comctl32.lib  >> msvc.tmp
   @echo comdlg32.lib  >> msvc.tmp
   @echo advapi32.lib  >> msvc.tmp
   @echo shell32.lib   >> msvc.tmp
   @echo ole32.lib     >> msvc.tmp
   @echo oleaut32.lib  >> msvc.tmp
   @echo uuid.lib      >> msvc.tmp
   @echo odbc32.lib    >> msvc.tmp
   @echo odbccp32.lib  >> msvc.tmp
   @echo iphlpapi.lib  >> msvc.tmp
   @echo mpr.lib       >> msvc.tmp
   @echo version.lib   >> msvc.tmp
   @echo wsock32.lib   >> msvc.tmp
   @echo msimg32.lib   >> msvc.tmp
   @echo oledlg.lib    >> msvc.tmp
   @echo psapi.lib     >> msvc.tmp
   @echo gdiplus.lib   >> msvc.tmp
   @echo winmm.lib     >> msvc.tmp
   @echo ws2_32.lib    >> msvc.tmp
   @echo ucrt.lib      >> msvc.tmp

   IF EXIST one.res echo one.res >> msvc.tmp

   link @msvc.tmp /out:myapp.exe /nologo /subsystem:windows /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libucrt > link.log
   @type link.log

one.res : one.rc
   rc.exe -r -d__FLAT__ one.rc 

obj\one.obj : prg\one.prg
   $(HBDIR)\bin\win\msvc\harbour prg\one.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   

obj\two.obj : prg\two.prg
   $(HBDIR)\bin\win\msvc\harbour prg\two.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   

obj\three.obj : prg\three.prg
   $(HBDIR)\bin\win\msvc\harbour prg\three.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include 
   cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c   
Si intentamos generalizar las tres ultimas reglas en una:

Code: Select all | Expand

obj\%.obj : prg\%.prg
    $(HBDIR)\bin\win\msvc\harbour $< /n /w /Oobj\$@ /i$(FWDIR)\include;$(HBDIR)\include 
    cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Entonces da el error de que no sabe como construir obj\one.obj

Eso es lo que falta, pero como te indico, el go.bat y el test.mak aqui funcionan correctamente]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-20T03:02:48-07:00 2025-01-20T03:02:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277062#p277062 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-20T05:20:41-07:00 2025-01-20T05:20:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277064#p277064
Uso tambien el hbmk2.exe pero al crear una Window, las barras de herramientas y la barra de status se crean mas pequenas y debo aumentar el size en toda las ventanas de la aplicacion, lo cual no es deseable.

Esa es la razon principal por la cual vuelvo al .makefile, donde si se crea bien

https://forums.fivetechsupport.com/view ... b056a18703]]>

Uso tambien el hbmk2.exe pero al crear una Window, las barras de herramientas y la barra de status se crean mas pequenas y debo aumentar el size en toda las ventanas de la aplicacion, lo cual no es deseable.

Esa es la razon principal por la cual vuelvo al .makefile, donde si se crea bien

https://forums.fivetechsupport.com/view ... b056a18703]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-20T05:46:27-07:00 2025-01-20T05:46:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277068#p277068
Si tienes ambos EXEs por favor envíamelos y los revisamos]]>

Si tienes ambos EXEs por favor envíamelos y los revisamos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-20T06:32:52-07:00 2025-01-20T06:32:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277072#p277072 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Compuin]]> 2025-01-20T07:21:16-07:00 2025-01-20T07:21:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277073#p277073 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Archivo de compilacion .mak para Visual Studio :: Reply by Antonio Linares]]> 2025-01-20T12:05:18-07:00 2025-01-20T12:05:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45318&p=277078#p277078
https://wormhole.app/]]>

https://wormhole.app/]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Ayuda para conectarme a una pagina y obtener info :: Author Armando]]> 2025-01-20T10:56:27-07:00 2025-01-20T10:56:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277077#p277077
Tengo el prospecto para desarrollar una tienda virtual de envíos de paquetes, la idea es el sistema haga los siguiente:

1.-EL sistema debe estar en diferentes puntos de venta
2.- Cada punto de venta se conecta al servidor
3.- EL cliente proporciona la información del paquete a enviar
4.- El sistema se debe conectar a los diferentes courier (DHL, FEDEX, ect) y obtener el precio por el envío
5.- El cliente decide que courier le ajusta y lo elije
6.- La elección del cliente regresa al sistema que voy a desarrollar y genera la guía de envío
7.- Por último el cliente la imprime.

No tengo experiencia al respecto, así que toda la ayuda, sugerencias y consejos es bien recibida, como por ejemplo
los protocolos para la conexión a las diferentes plataformas (DHL, FEDEX)

Un abrazo]]>

Tengo el prospecto para desarrollar una tienda virtual de envíos de paquetes, la idea es el sistema haga los siguiente:

1.-EL sistema debe estar en diferentes puntos de venta
2.- Cada punto de venta se conecta al servidor
3.- EL cliente proporciona la información del paquete a enviar
4.- El sistema se debe conectar a los diferentes courier (DHL, FEDEX, ect) y obtener el precio por el envío
5.- El cliente decide que courier le ajusta y lo elije
6.- La elección del cliente regresa al sistema que voy a desarrollar y genera la guía de envío
7.- Por último el cliente la imprime.

No tengo experiencia al respecto, así que toda la ayuda, sugerencias y consejos es bien recibida, como por ejemplo
los protocolos para la conexión a las diferentes plataformas (DHL, FEDEX)

Un abrazo]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Antonio Linares]]> 2025-01-20T12:16:36-07:00 2025-01-20T12:16:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277080#p277080
Eres consciente de la complejidad de lo que te estás planteando y pidiendo ? :)

Yo optaria por buscar una IA que tenga conexión a internet y que tenga un API de programación]]>

Eres consciente de la complejidad de lo que te estás planteando y pidiendo ? :)

Yo optaria por buscar una IA que tenga conexión a internet y que tenga un API de programación]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Antonio Linares]]> 2025-01-20T12:18:13-07:00 2025-01-20T12:18:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277081#p277081 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Antonio Linares]]> 2025-01-20T12:21:32-07:00 2025-01-20T12:21:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277082#p277082 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Antonio Linares]]> 2025-01-20T12:30:21-07:00 2025-01-20T12:30:21-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277083#p277083
Precio: Grok-beta no es el modelo más económico, con costos de $38.15 por 1 millón de tokens de entrada y $114.44 por 1 millón de tokens de salida, lo que lo hace más caro en comparación con otros modelos como GPT-4o, Claude 3 Opus, y Gemini Pro.
]]>
Precio: Grok-beta no es el modelo más económico, con costos de $38.15 por 1 millón de tokens de entrada y $114.44 por 1 millón de tokens de salida, lo que lo hace más caro en comparación con otros modelos como GPT-4o, Claude 3 Opus, y Gemini Pro.
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by wilsongamboa]]> 2025-01-20T12:48:20-07:00 2025-01-20T12:48:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277084#p277084 -a esos dhl ups etc digamos que son 3 les hacemos web scrapping ( si hubiera como claro ) y obtenemos cotizacion
- con esas cotizaciones procedemos con lo demas
en Harbour ya hay muuuuchasss herramientas que manejan web, curls, etc etc
un abrazo
Perdon pero me dio por opinar
saludos
Wilson]]>
-a esos dhl ups etc digamos que son 3 les hacemos web scrapping ( si hubiera como claro ) y obtenemos cotizacion
- con esas cotizaciones procedemos con lo demas
en Harbour ya hay muuuuchasss herramientas que manejan web, curls, etc etc
un abrazo
Perdon pero me dio por opinar
saludos
Wilson]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Armando]]> 2025-01-20T13:25:04-07:00 2025-01-20T13:25:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277085#p277085
Llevas razón, es complejo y caro, pero el que no arriesga no gana, voy a tirar un ojo por la IA, ademas
tengo el respaldo de este fabuloso foro.

Adhemar:

Nada de pedir perdón, también pienso que por ahí van los tiros.

Vamos muchachos, tormenta de ideas y sugerencias!

Saludos]]>

Llevas razón, es complejo y caro, pero el que no arriesga no gana, voy a tirar un ojo por la IA, ademas
tengo el respaldo de este fabuloso foro.

Adhemar:

Nada de pedir perdón, también pienso que por ahí van los tiros.

Vamos muchachos, tormenta de ideas y sugerencias!

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by sysctrl2]]> 2025-01-20T14:55:00-07:00 2025-01-20T14:55:00-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277086#p277086 https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services]]>
https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Antonio Linares]]> 2025-01-21T00:38:51-07:00 2025-01-21T00:38:51-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277090#p277090 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Ayuda para conectarme a una pagina y obtener info :: Reply by Armando]]> 2025-01-21T18:59:26-07:00 2025-01-21T18:59:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45331&p=277108#p277108
Exactamente, por ahí van los tiros.

Al menos sabemos que DHL y Fedex, tienen sus apis.

Saludos

sysctrl2 wrote: Mon Jan 20, 2025 9:55 pm La única manera que veo es con API REST
https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services
]]>

Exactamente, por ahí van los tiros.

Al menos sabemos que DHL y Fedex, tienen sus apis.

Saludos

sysctrl2 wrote: Mon Jan 20, 2025 9:55 pm La única manera que veo es con API REST
https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Dudas con la vista previa :: Reply by sysctrl2]]> 2025-01-22T15:38:31-07:00 2025-01-22T15:38:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44818&p=277134#p277134 como resolviste la vista en el prev. ?
saludos !!! :shock:]]>
como resolviste la vista en el prev. ?
saludos !!! :shock:]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Dudas con la vista previa :: Reply by Armando]]> 2025-01-22T18:19:56-07:00 2025-01-22T18:19:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44818&p=277137#p277137
En mi caso solo le agregue la clausula MODAL al que me fallaba. :oops:

Saludos

sysctrl2 wrote: Wed Jan 22, 2025 10:38 pm Querido amigo paisano de edomex,
como resolviste la vista en el prev. ?
saludos !!! :shock:
]]>

En mi caso solo le agregue la clausula MODAL al que me fallaba. :oops:

Saludos

sysctrl2 wrote: Wed Jan 22, 2025 10:38 pm Querido amigo paisano de edomex,
como resolviste la vista en el prev. ?
saludos !!! :shock:
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Nueva opción de "Me gusta / Gracias" en los foros ! :: Author Antonio Linares]]> 2025-01-23T13:05:55-07:00 2025-01-23T13:05:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45340&p=277164#p277164

Image]]>


Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: cómo inhibir la rueda del ratón? :: Author Armando]]> 2025-01-23T13:08:44-07:00 2025-01-23T13:08:44-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45341&p=277165#p277165
Necesito poder inhibir, que no funcione, la rueda del ratón en un combo box, alguna ayuda?

Saludos]]>

Necesito poder inhibir, que no funcione, la rueda del ratón en un combo box, alguna ayuda?

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: cómo inhibir la rueda del ratón? :: Reply by Antonio Linares]]> 2025-01-23T14:36:13-07:00 2025-01-23T14:36:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45341&p=277169#p277169
METHOD MouseWheel() INLINE 1]]>

METHOD MouseWheel() INLINE 1]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: cómo inhibir la rueda del ratón? :: Reply by Armando]]> 2025-01-23T17:23:41-07:00 2025-01-23T17:23:41-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45341&p=277170#p277170
Muchas gracias, pruebo y aviso.

Saludos]]>

Muchas gracias, pruebo y aviso.

Saludos]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Multihilo - Multithread :: Reply by leandro]]> 2025-01-13T16:52:31-07:00 2025-01-13T16:52:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45217&p=276892#p276892
Pues en ese caso yo usaria un servicio... es lo que se me ocurre de momento, creo que se adapta mejor a lo que quieres hacer. En estos días que me quede un tiempito voy a empezar a trabajar en montar un servicio similar a lo que necesitas hacer, apenas tenga algo de código lo publico.]]>

Pues en ese caso yo usaria un servicio... es lo que se me ocurre de momento, creo que se adapta mejor a lo que quieres hacer. En estos días que me quede un tiempito voy a empezar a trabajar en montar un servicio similar a lo que necesitas hacer, apenas tenga algo de código lo publico.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Multihilo - Multithread :: Reply by TOTOVIOTTI]]> 2025-01-24T04:49:15-07:00 2025-01-24T04:49:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45217&p=277179#p277179
Estaré atento a ver que publicas.

Yo lo hice funcionar de la siguiente manera:

hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @MyFuncForThreads(),parametro1,parametro2,...)

Y luego para compilar reemplacé:

hbvm.lib x hbvmmt.lib
y
cw32.lib x cw32mt.lib

Sakudos!]]>

Estaré atento a ver que publicas.

Yo lo hice funcionar de la siguiente manera:

hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @MyFuncForThreads(),parametro1,parametro2,...)

Y luego para compilar reemplacé:

hbvm.lib x hbvmmt.lib
y
cw32.lib x cw32mt.lib

Sakudos!]]>
<![CDATA[FiveWin para Harbour/xHarbour :: No se puede acceder a las paginas del forum :: Author CARLOS ATUNCAR]]> 2025-01-22T08:51:18-07:00 2025-01-22T08:51:18-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45335&p=277124#p277124
FWH MySQL/MariaDB soporte nativo docs

en la que nos envia a estas pero que no existen

FWH Built-in MySql/MariaDB functionality
https://forums.fivetechsupport.com/view ... =3&t=32657

FWH MariaDb/MySql Backup and Restore
https://forums.fivetechsupport.com/view ... =3&t=32791

FWH MySql/MariaDB: RowSet object
https://forums.fivetechsupport.com/view ... =3&t=32737

FWH Parent Child RowSets (MySql/MariaDB)
https://forums.fivetechsupport.com/view ... =3&t=32736

FWH MYSQL/MARIADB Stored Procedures and Functions
https://forums.fivetechsupport.com/view ... =3&t=33280

Using FWMARIADB for Embedded Server
https://forums.fivetechsupport.com/view ... =3&t=33798

FWHMARIADB Samples
https://forums.fivetechsupport.com/view ... =3&t=33908

se va poder acceder a la información o donde se puede consultar

Gracias]]>

FWH MySQL/MariaDB soporte nativo docs

en la que nos envia a estas pero que no existen

FWH Built-in MySql/MariaDB functionality
https://forums.fivetechsupport.com/view ... =3&t=32657

FWH MariaDb/MySql Backup and Restore
https://forums.fivetechsupport.com/view ... =3&t=32791

FWH MySql/MariaDB: RowSet object
https://forums.fivetechsupport.com/view ... =3&t=32737

FWH Parent Child RowSets (MySql/MariaDB)
https://forums.fivetechsupport.com/view ... =3&t=32736

FWH MYSQL/MARIADB Stored Procedures and Functions
https://forums.fivetechsupport.com/view ... =3&t=33280

Using FWMARIADB for Embedded Server
https://forums.fivetechsupport.com/view ... =3&t=33798

FWHMARIADB Samples
https://forums.fivetechsupport.com/view ... =3&t=33908

se va poder acceder a la información o donde se puede consultar

Gracias]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: No se puede acceder a las paginas del forum :: Reply by Antonio Linares]]> 2025-01-22T09:11:50-07:00 2025-01-22T09:11:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45335&p=277127#p277127
Ahora deberias poder acceder correctamente :)]]>

Ahora deberias poder acceder correctamente :)]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: No se puede acceder a las paginas del forum :: Reply by CARLOS ATUNCAR]]> 2025-01-24T09:18:35-07:00 2025-01-24T09:18:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45335&p=277182#p277182 <![CDATA[FiveWin para Harbour/xHarbour :: Compilar con xharbour y msvc con hbmk2 :: Author leandro]]> 2025-01-19T16:42:27-07:00 2025-01-19T16:42:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277051#p277051
Ya hicimos la descarga de xharbour he intentamos compilar un test, pero nos salen algunos errores que no sabemos solucionar. Tampoco sabemos si está bien configurado el archivo .hbp y el .bat

Desde aquí se puede descargar el xharbour para MSVC
http://xharbour.org/index.asp?page=down ... naries_win

Aquí la configuración que tenemos

xgo64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-optim-
-ldflag+=-aa -n- 
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-opruebas
#-inc
-run
test.prg

Code: Select all | Expand

#include "FiveWin.ch"
function Main()
	msginfo("Hola Mundo")
return nil
La ventana de compilación con los errores
Image

y pues efectivamente revisando en la carpeta del fwh2409_64bits, no está el archivo, hay uno con el mismo nombre, pero con extensión .a
Image

Que debemos ajustar para solucionar el problema?

Gracias de antemano]]>

Ya hicimos la descarga de xharbour he intentamos compilar un test, pero nos salen algunos errores que no sabemos solucionar. Tampoco sabemos si está bien configurado el archivo .hbp y el .bat

Desde aquí se puede descargar el xharbour para MSVC
http://xharbour.org/index.asp?page=down ... naries_win

Aquí la configuración que tenemos

xgo64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-optim-
-ldflag+=-aa -n- 
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-opruebas
#-inc
-run
test.prg

Code: Select all | Expand

#include "FiveWin.ch"
function Main()
	msginfo("Hola Mundo")
return nil
La ventana de compilación con los errores
Image

y pues efectivamente revisando en la carpeta del fwh2409_64bits, no está el archivo, hay uno con el mismo nombre, pero con extensión .a
Image

Que debemos ajustar para solucionar el problema?

Gracias de antemano]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-20T02:50:30-07:00 2025-01-20T02:50:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277061#p277061
De momento no ofrecemos FWH para xHarbour 64 y MSVC64

Tenemos que construirlo y probarlo. Eres el primero en pedirlo :D]]>

De momento no ofrecemos FWH para xHarbour 64 y MSVC64

Tenemos que construirlo y probarlo. Eres el primero en pedirlo :D]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by sysctrl2]]> 2025-01-20T16:30:22-07:00 2025-01-20T16:30:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277087#p277087 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-21T00:33:36-07:00 2025-01-21T00:33:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277089#p277089
La librería de los módulos en C es FiveHC64.lib, la misma que usa Harbour 64 y MSVC y que ya teneis :-)

Image]]>

La librería de los módulos en C es FiveHC64.lib, la misma que usa Harbour 64 y MSVC y que ya teneis :-)

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-21T08:40:26-07:00 2025-01-21T08:40:26-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277096#p277096 :D :D :D :D

Bueno te cuento que estamos intentando generar el primer ejecutable de prueba, con un msginfo simple, sé que tengo algo mal configurado, pero no tengo ni idea que es...

test.prg

Code: Select all | Expand

#include "FiveWin.ch"
function Main()
	msginfo("Hola Mundo")
return nil
xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-optim-
-ldflag+=-aa -n- 
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-opruebas
#-inc
-run
xgo64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
los errores que salen al compilar

Code: Select all | Expand

C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 2, pCodes 19
test.c
hbmk2: Linking... pruebas.exe
LINK : warning LNK4044: opci¢n '/aa' no reconocida; omitida
LINK : warning LNK4098: la biblioteca predeterminada'MSVCRT' entra en conflicto con otras bibliotecas; use la biblioteca /NODEFAULTLIB:biblioteca
LINK : warning LNK4217: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "ct.lib(ctmath2.obj)" en la funci¢n "HB_FUN_CEILING"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfntx.lib(dbfntx1.obj)"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfcdx.lib(dbfcdx1.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""char * __cdecl std::_Maklocstr<char>(char const *,char *,struct _Cvtvec const &)" (??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(gtclip.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(hbwinole.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""wchar_t * __cdecl std::_Maklocwcs(wchar_t const *)" (?_Maklocwcs@std@@YAPEA_WPEB_W@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatformcomm.obj)" en la funci¢n ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""int `public: __cdecl CZipString::CZipString(char const *)'::`1'::dtor$0" (?dtor$0@?0???0CZipString@@QEAA@PEBD@Z@4HA)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstring.obj)" en la funci¢n ""int (__cdecl CZipString::*__cdecl GetCZipStrCompFunc(bool,bool))(char const *)const " (?GetCZipStrCompFunc@@YAP8CZipString@@EBAHPEBD@Z_N1@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipnew.obj)" en la funci¢n ""void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcomp.obj)" en la funci¢n "hb_CmpTdSpan"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4217: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: virtual unsigned int __cdecl CZipFile::Read(void *,unsigned int)" (?Read@CZipFile@@UEAAIPEAXI@Z)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4217: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: void __cdecl CZipString::Format(char const *,...)" (?Format@CZipString@@QEAAXPEBDZZ)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "pcrepos.lib(pcreposix.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "zlib.lib(zutil.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "vm.lib(mainwin.obj)"
.....

FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathStringI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddEllipse(int,int,int,int)" (?AddEllipse@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathEllipseI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddPie(int,int,int,int,float,float)" (?AddPie@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::Matrix(void)" (??0Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::~Matrix(void)" (??1Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipTranslateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipTranslateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipScaleMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::Scale(float,float,enum Gdiplus::MatrixOrder)" (?Scale@Matrix@Gdiplus@@QEAA?AW4Status@2@MMW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipScaleMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipRotateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipRotateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionRectI sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::Rect const &)" (??0Region@Gdiplus@@QEAA@AEBVRect@1@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionPath sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::GraphicsPath const *)" (??0Region@Gdiplus@@QEAA@PEBVGraphicsPath@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateRegionPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteRegion sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::~Region(void)" (??1Region@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBrush sin resolver al que se hace referencia en la funci¢n "public: virtual class Gdiplus::Brush * __cdecl Gdiplus::Brush::Clone(void)const " (?Clone@Brush@Gdiplus@@UEBAPEAV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteBrush sin resolver al que se hace referencia en la funci¢n "public: virtual __cdecl Gdiplus::Brush::~Brush(void)" (??1Brush@Gdiplus@@UEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateTexture sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::TextureBrush::TextureBrush(class Gdiplus::Image *,enum Gdiplus::WrapMode)" (??0TextureBrush@Gdiplus@@QEAA@PEAVImage@1@W4WrapMode@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateTexture sin resolver
....
GetHBITMAP@Bitmap@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@PEAPEAUHBITMAP__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateHBITMAPFromBitmap sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateBitmapFromResource sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Bitmap::Bitmap(struct HINSTANCE__ *,wchar_t const *)" (??0Bitmap@Gdiplus@@QEAA@PEAUHINSTANCE__@@PEB_W@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateBitmapFromResource sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBitmapAreaI sin resolver al que se hace referencia en la funci¢n "public: class Gdiplus::Bitmap * __cdecl Gdiplus::Bitmap::Clone(int,int,int,int,int)" (?Clone@Bitmap@Gdiplus@@QEAAPEAV12@HHHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBitmapAreaI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapLockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::LockBits(class Gdiplus::Rect const *,unsigned int,int,class Gdiplus::BitmapData *)" (?LockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEBVRect@2@IHPEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapLockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapUnlockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::UnlockBits(class Gdiplus::BitmapData *)" (?UnlockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapUnlockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapGetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::GetPixel(int,int,class Gdiplus::Color *)" (?GetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHPEAVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapGetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetPixel(int,int,class Gdiplus::Color const &)" (?SetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHAEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapApplyEffect sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::ApplyEffect(class Gdiplus::Effect *,struct tagRECT *)" (?ApplyEffect@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVEffect@2@PEAUtagRECT@@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetResolution sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetResolution(float,float)" (?SetResolution@Bitmap@Gdiplus@@QEAA?AW4Status@2@MM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetResolution sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateImageAttributes sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::ImageAttributes::ImageAttributes(void)" (??0ImageAttributes@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateImageAttributes sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorMatrix(struct Gdiplus::ColorMatrix const *,enum Gdiplus::ColorMatrixFlags,enum Gdiplus::ColorAdjustType)" (?SetColorMatrix@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@PEBUColorMatrix@2@W4ColorMatrixFlags@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesGamma sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetGamma(float,enum Gdiplus::ColorAdjustType)" (?SetGamma@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@MW4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorKeys sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorKey(class Gdiplus::Color const &,class Gdiplus::Color const &,enum Gdiplus::ColorAdjustType)" (?SetColorKey@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@0W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetRemapTable(unsigned int,struct Gdiplus::ColorMap const *,enum Gdiplus::ColorAdjustType)" (?SetRemapTable@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@IPEBUColorMap@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateFromHDC sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::Graphics(struct HDC__ *)" (??0Graphics@Gdiplus@@QEAA@PEAUHDC__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateFromHDC sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteGraphics sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::~Graphics(void)" (??1Graphics@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteGraphics sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetSmoothingMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetSmoothingMode(enum Gdiplus::SmoothingMode)" (?SetSmoothingMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4SmoothingMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetSmoothingMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetTextRenderingHint sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTextRenderingHint(enum Gdiplus::TextRenderingHint)" (?SetTextRenderingHint@Graphics@Gdiplus@@QEAA?AW4Status@2@W4TextRenderingHint@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetTextRenderingHint sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetInterpolationMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetInterpolationMode(enum Gdiplus::InterpolationMode)" (?SetInterpolationMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4InterpolationMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetInterpolationMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTransform(class Gdiplus::Matrix const *)" (?SetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVMatrix@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipResetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::ResetTransform(void)" (?ResetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipResetWorldTransform sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Unit __cdecl Gdiplus::Graphics::GetPageUnit(void)const " (?GetPageUnit@Graphics@Gdiplus@@QEBA?AW4Unit@2@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageScale sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetPageScale(void)const " (?GetPageScale@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiX sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiX(void)const " (?GetDpiX@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiY sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiY(void)const " (?GetDpiY@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLine sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLine(class Gdiplus::Pen const *,float,float,float,float)" (?DrawLine@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawLine sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLinesI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLines(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawLines@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawArcI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawBeziersI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawBeziers(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawBeziers@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,int,int,int,int)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,int,int,int,int)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPolygon(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPath(class Gdiplus::Pen const *,class Gdiplus::GraphicsPath const *)" (?DrawPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawClosedCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGraphicsClear sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::Clear(class Gdiplus::Color const &)" (?Clear@Graphics@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipGraphicsClear sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,float,float,float,float)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangle sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,int,int,int,int)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangleI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPolygon(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode)" (?FillPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,float,float,float,float)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillEllipse sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,int,int,int,int)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,int,int,int,int,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPath(class Gdiplus::Brush const *,class Gdiplus::GraphicsPath const *)" (?FillPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillClosedCurve(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode,float)" (?FillClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@M@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawImageI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageRectI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HHHH@Z)
...
ace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::RotateTransform(float,enum Gdiplus::MatrixOrder)" (?RotateTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@MW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipSetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetPageUnit(enum Gdiplus::Unit)" (?SetPageUnit@Graphics@Gdiplus@@QEAA?AW4Status@2@W4Unit@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawArc sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,float,float,float,float)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,float,float,float,float)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipFillPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,float,float,float,float,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipIsClipEmpty sin resolver al que se hace referencia en la funci¢n "public: int __cdecl Gdiplus::Graphics::IsClipEmpty(void)const " (?IsClipEmpty@Graphics@Gdiplus@@QEBAHXZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipCreateMetafileFromStream sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Metafile::Metafile(struct IStream *)" (??0Metafile@Gdiplus@@QEAA@PEAUIStream@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDeleteFontFamily sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::FontFamily::~FontFamily(void)" (??1FontFamily@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipMeasureString sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::MeasureString(wchar_t const *,int,class Gdiplus::Font const *,class Gdiplus::PointF const &,class Gdiplus::StringFormat const *,class Gdiplus::RectF *)const " (?MeasureString@Graphics@Gdiplus@@QEBA?AW4Status@2@PEB_WHPEBVFont@2@AEBVPointF@2@PEBVStringFormat@2@PEAVRectF@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericDefault sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericDefault(void)" (?GenericDefault@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericTypographic sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericTypographic(void)" (?GenericTypographic@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(richedi5.obj) : error LNK2019: s¡mbolo externo OleUIPasteSpecialA sin resolver al que se hace referencia en la funci¢n HB_FUN_REPASTESPECIAL5
FiveHC64.lib(richedit.obj) : error LNK2001: s¡mbolo externo OleUIPasteSpecialA sin resolver
ct.lib(ctmath2.obj) : error LNK2019: s¡mbolo externo __imp_floor sin resolver al que se hace referencia en la funci¢n HB_FUN_FLOOR
ct.lib(ascpos.obj) : error LNK2019: s¡mbolo externo __imp_isdigit sin resolver al que se hace referencia en la funci¢n do_ascpos
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isdigit sin resolver
hbzip.lib(zipnew.obj) : error LNK2019: s¡mbolo externo __imp__localtime64 sin resolver al que se hace referencia en la funci¢n hb___GetFileNamesFromZip
hbzip.lib(zipfileheader.obj) : error LNK2001: s¡mbolo externo __imp__localtime64 sin resolver
hbzip.lib(zipfileheader.obj) : error LNK2019: s¡mbolo externo __imp__mktime64 sin resolver al que se hace referencia en la funci¢n "public: __int64 __cdecl CZipFileHeader::GetTime(void)const " (?GetTime@CZipFileHeader@@QEBA_JXZ)
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipexception.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
vm.lib(fm.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_srand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_srand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_rand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_rand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_strcoll sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipString::Collate(char const *)const " (?Collate@CZipString@@QEBAHPEBD@Z)
hbzip.lib(zipstring.obj) : error LNK2001: s¡mbolo externo __imp_strcoll sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__time64 sin resolver al que se hace referencia en la funci¢n "public: bool __cdecl CZipArchive::AddNewFile(struct CZipAddNewFileInfo &)" (?AddNewFile@CZipArchive@@QEAA_NAEAUCZipAddNewFileInfo@@@Z)
hbzip.lib(zipplatform.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__tell sin resolver al que se hace referencia en la funci¢n "public: virtual unsigned __int64 __cdecl CZipFile::GetPosition(void)const " (?GetPosition@CZipFile@@UEBA_KXZ)
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipfile.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__stat64i32 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::GetFileModTime(char const *,__int64 &)" (?GetFileModTime@ZipPlatform@@YA_NPEBDAEA_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__access sin resolver al que se hace referencia en la funci¢n "int __cdecl ZipPlatform::FileExists(char const *)" (?FileExists@ZipPlatform@@YAHPEBD@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__utime64 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::SetFileModTime(char const *,__int64)" (?SetFileModTime@ZipPlatform@@YA_NPEBD_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__chdir sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::ChangeDirectory(char const *)" (?ChangeDirectory@ZipPlatform@@YA_NPEBD@Z)
hbzip.lib(zipexception.obj) : error LNK2019: s¡mbolo externo __imp_strncpy sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipException::GetErrorMessage(char *,unsigned int,unsigned int *)" (?GetErrorMessage@CZipException@@QEAAHPEADIPEAI@Z)
pcrepos.lib(pcreposix.obj) : error LNK2001: s¡mbolo externo __imp_strncpy sin resolver
hbzip.lib(zippathcomponent.obj) : error LNK2019: s¡mbolo externo __imp__splitpath sin resolver al que se hace referencia en la funci¢n "public: void __cdecl CZipPathComponent::SetFullPath(char const *)" (?SetFullPath@CZipPathComponent@@QEAAXPEBD@Z)
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbprintf.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(itemapi.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
rtl.lib(fstemp.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2019: s¡mbolo externo __imp_div sin resolver al que se hace referencia en la funci¢n hb_vmSubDate
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_div sin resolver
vm.lib(itemapi.obj) : error LNK2019: s¡mbolo externo __imp__finite sin resolver al que se hace referencia en la funci¢n hb_itemStrBuf
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isxdigit sin resolver al que se hace referencia en la funci¢n HB_FUN_ISXDIGIT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isspace sin resolver al que se hace referencia en la funci¢n HB_FUN_ISSPACE
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_ispunct sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPUNCT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isprint sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPRINT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isgraph sin resolver al que se hace referencia en la funci¢n HB_FUN_ISGRAPH
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_iscntrl sin resolver al que se hace referencia en la funci¢n HB_FUN_ISCNTRL
rtl.lib(dirdrive.obj) : error LNK2019: s¡mbolo externo __imp_remove sin resolver al que se hace referencia en la funci¢n HB_FUN_HB_DISKREADY
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__chdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__getdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(fparse.obj) : error LNK2019: s¡mbolo externo __imp_fgetc sin resolver al que se hace referencia en la funci¢n HB_FUN_FCHARCOUNT
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_toupper sin resolver al que se hace referencia en la funci¢n hb_str2number
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_tolower sin resolver al que se hace referencia en la funci¢n hb_strAtI
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_strerror_s sin resolver al que se hace referencia en la funci¢n hb_strerror
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dclass sin resolver al que se hace referencia en la funci¢n hb_vsnprintf
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dsign sin resolver al que se hace referencia en la funci¢n put_dbl
common.lib(hbtrace.obj) : error LNK2019: s¡mbolo externo __imp__dup sin resolver al que se hace referencia en la funci¢n hb_tr_trace
pruebas.exe : fatal error LNK1120: 200 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\4\f88jtl.lnk

hbmk2: Error: Referenced, missing, but unknown function(s): CEILING(), SET(),
       HB_UTF8STRTRAN(), HB_I18NGETBASELANGUAGE(), WEBVIEW2_SHOWDOWNLOADS(),
       GDIPLUSSTARTUP(), GDIPLUSSHUTDOWN(), REPASTESPECIAL5(), FLOOR(),
       ISXDIGIT(), ISSPACE(), ISPUNCT(), ISPRINT(), ISGRAPH(), ISCNTRL(),
       HB_DISKREADY(), FCHARCOUNT()
Gracias de antemano por la ayuda]]>
:D :D :D :D

Bueno te cuento que estamos intentando generar el primer ejecutable de prueba, con un msginfo simple, sé que tengo algo mal configurado, pero no tengo ni idea que es...

test.prg

Code: Select all | Expand

#include "FiveWin.ch"
function Main()
	msginfo("Hola Mundo")
return nil
xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-optim-
-ldflag+=-aa -n- 
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-opruebas
#-inc
-run
xgo64.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
los errores que salen al compilar

Code: Select all | Expand

C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 2, pCodes 19
test.c
hbmk2: Linking... pruebas.exe
LINK : warning LNK4044: opci¢n '/aa' no reconocida; omitida
LINK : warning LNK4098: la biblioteca predeterminada'MSVCRT' entra en conflicto con otras bibliotecas; use la biblioteca /NODEFAULTLIB:biblioteca
LINK : warning LNK4217: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "ct.lib(ctmath2.obj)" en la funci¢n "HB_FUN_CEILING"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfntx.lib(dbfntx1.obj)"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfcdx.lib(dbfcdx1.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""char * __cdecl std::_Maklocstr<char>(char const *,char *,struct _Cvtvec const &)" (??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(gtclip.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(hbwinole.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""wchar_t * __cdecl std::_Maklocwcs(wchar_t const *)" (?_Maklocwcs@std@@YAPEA_WPEB_W@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatformcomm.obj)" en la funci¢n ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""int `public: __cdecl CZipString::CZipString(char const *)'::`1'::dtor$0" (?dtor$0@?0???0CZipString@@QEAA@PEBD@Z@4HA)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstring.obj)" en la funci¢n ""int (__cdecl CZipString::*__cdecl GetCZipStrCompFunc(bool,bool))(char const *)const " (?GetCZipStrCompFunc@@YAP8CZipString@@EBAHPEBD@Z_N1@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipnew.obj)" en la funci¢n ""void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcomp.obj)" en la funci¢n "hb_CmpTdSpan"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4217: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: virtual unsigned int __cdecl CZipFile::Read(void *,unsigned int)" (?Read@CZipFile@@UEAAIPEAXI@Z)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4217: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: void __cdecl CZipString::Format(char const *,...)" (?Format@CZipString@@QEAAXPEBDZZ)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "pcrepos.lib(pcreposix.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "zlib.lib(zutil.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "vm.lib(mainwin.obj)"
.....

FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathStringI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddEllipse(int,int,int,int)" (?AddEllipse@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathEllipseI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddPie(int,int,int,int,float,float)" (?AddPie@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::Matrix(void)" (??0Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::~Matrix(void)" (??1Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipTranslateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipTranslateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipScaleMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::Scale(float,float,enum Gdiplus::MatrixOrder)" (?Scale@Matrix@Gdiplus@@QEAA?AW4Status@2@MMW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipScaleMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipRotateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipRotateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionRectI sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::Rect const &)" (??0Region@Gdiplus@@QEAA@AEBVRect@1@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionPath sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::GraphicsPath const *)" (??0Region@Gdiplus@@QEAA@PEBVGraphicsPath@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateRegionPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteRegion sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::~Region(void)" (??1Region@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBrush sin resolver al que se hace referencia en la funci¢n "public: virtual class Gdiplus::Brush * __cdecl Gdiplus::Brush::Clone(void)const " (?Clone@Brush@Gdiplus@@UEBAPEAV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteBrush sin resolver al que se hace referencia en la funci¢n "public: virtual __cdecl Gdiplus::Brush::~Brush(void)" (??1Brush@Gdiplus@@UEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateTexture sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::TextureBrush::TextureBrush(class Gdiplus::Image *,enum Gdiplus::WrapMode)" (??0TextureBrush@Gdiplus@@QEAA@PEAVImage@1@W4WrapMode@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateTexture sin resolver
....
GetHBITMAP@Bitmap@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@PEAPEAUHBITMAP__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateHBITMAPFromBitmap sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateBitmapFromResource sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Bitmap::Bitmap(struct HINSTANCE__ *,wchar_t const *)" (??0Bitmap@Gdiplus@@QEAA@PEAUHINSTANCE__@@PEB_W@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateBitmapFromResource sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBitmapAreaI sin resolver al que se hace referencia en la funci¢n "public: class Gdiplus::Bitmap * __cdecl Gdiplus::Bitmap::Clone(int,int,int,int,int)" (?Clone@Bitmap@Gdiplus@@QEAAPEAV12@HHHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBitmapAreaI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapLockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::LockBits(class Gdiplus::Rect const *,unsigned int,int,class Gdiplus::BitmapData *)" (?LockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEBVRect@2@IHPEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapLockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapUnlockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::UnlockBits(class Gdiplus::BitmapData *)" (?UnlockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapUnlockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapGetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::GetPixel(int,int,class Gdiplus::Color *)" (?GetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHPEAVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapGetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetPixel(int,int,class Gdiplus::Color const &)" (?SetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHAEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapApplyEffect sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::ApplyEffect(class Gdiplus::Effect *,struct tagRECT *)" (?ApplyEffect@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVEffect@2@PEAUtagRECT@@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetResolution sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetResolution(float,float)" (?SetResolution@Bitmap@Gdiplus@@QEAA?AW4Status@2@MM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetResolution sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateImageAttributes sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::ImageAttributes::ImageAttributes(void)" (??0ImageAttributes@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateImageAttributes sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorMatrix(struct Gdiplus::ColorMatrix const *,enum Gdiplus::ColorMatrixFlags,enum Gdiplus::ColorAdjustType)" (?SetColorMatrix@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@PEBUColorMatrix@2@W4ColorMatrixFlags@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesGamma sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetGamma(float,enum Gdiplus::ColorAdjustType)" (?SetGamma@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@MW4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorKeys sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorKey(class Gdiplus::Color const &,class Gdiplus::Color const &,enum Gdiplus::ColorAdjustType)" (?SetColorKey@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@0W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetRemapTable(unsigned int,struct Gdiplus::ColorMap const *,enum Gdiplus::ColorAdjustType)" (?SetRemapTable@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@IPEBUColorMap@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateFromHDC sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::Graphics(struct HDC__ *)" (??0Graphics@Gdiplus@@QEAA@PEAUHDC__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateFromHDC sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteGraphics sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::~Graphics(void)" (??1Graphics@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteGraphics sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetSmoothingMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetSmoothingMode(enum Gdiplus::SmoothingMode)" (?SetSmoothingMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4SmoothingMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetSmoothingMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetTextRenderingHint sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTextRenderingHint(enum Gdiplus::TextRenderingHint)" (?SetTextRenderingHint@Graphics@Gdiplus@@QEAA?AW4Status@2@W4TextRenderingHint@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetTextRenderingHint sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetInterpolationMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetInterpolationMode(enum Gdiplus::InterpolationMode)" (?SetInterpolationMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4InterpolationMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetInterpolationMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTransform(class Gdiplus::Matrix const *)" (?SetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVMatrix@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipResetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::ResetTransform(void)" (?ResetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipResetWorldTransform sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Unit __cdecl Gdiplus::Graphics::GetPageUnit(void)const " (?GetPageUnit@Graphics@Gdiplus@@QEBA?AW4Unit@2@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageScale sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetPageScale(void)const " (?GetPageScale@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiX sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiX(void)const " (?GetDpiX@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiY sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiY(void)const " (?GetDpiY@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLine sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLine(class Gdiplus::Pen const *,float,float,float,float)" (?DrawLine@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawLine sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLinesI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLines(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawLines@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawArcI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawBeziersI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawBeziers(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawBeziers@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,int,int,int,int)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,int,int,int,int)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPolygon(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPath(class Gdiplus::Pen const *,class Gdiplus::GraphicsPath const *)" (?DrawPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawClosedCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGraphicsClear sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::Clear(class Gdiplus::Color const &)" (?Clear@Graphics@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipGraphicsClear sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,float,float,float,float)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangle sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,int,int,int,int)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangleI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPolygon(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode)" (?FillPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,float,float,float,float)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillEllipse sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,int,int,int,int)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,int,int,int,int,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPath(class Gdiplus::Brush const *,class Gdiplus::GraphicsPath const *)" (?FillPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillClosedCurve(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode,float)" (?FillClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@M@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawImageI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageRectI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HHHH@Z)
...
ace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::RotateTransform(float,enum Gdiplus::MatrixOrder)" (?RotateTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@MW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipSetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetPageUnit(enum Gdiplus::Unit)" (?SetPageUnit@Graphics@Gdiplus@@QEAA?AW4Status@2@W4Unit@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawArc sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,float,float,float,float)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,float,float,float,float)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipFillPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,float,float,float,float,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipIsClipEmpty sin resolver al que se hace referencia en la funci¢n "public: int __cdecl Gdiplus::Graphics::IsClipEmpty(void)const " (?IsClipEmpty@Graphics@Gdiplus@@QEBAHXZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipCreateMetafileFromStream sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Metafile::Metafile(struct IStream *)" (??0Metafile@Gdiplus@@QEAA@PEAUIStream@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDeleteFontFamily sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::FontFamily::~FontFamily(void)" (??1FontFamily@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipMeasureString sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::MeasureString(wchar_t const *,int,class Gdiplus::Font const *,class Gdiplus::PointF const &,class Gdiplus::StringFormat const *,class Gdiplus::RectF *)const " (?MeasureString@Graphics@Gdiplus@@QEBA?AW4Status@2@PEB_WHPEBVFont@2@AEBVPointF@2@PEBVStringFormat@2@PEAVRectF@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericDefault sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericDefault(void)" (?GenericDefault@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericTypographic sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericTypographic(void)" (?GenericTypographic@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(richedi5.obj) : error LNK2019: s¡mbolo externo OleUIPasteSpecialA sin resolver al que se hace referencia en la funci¢n HB_FUN_REPASTESPECIAL5
FiveHC64.lib(richedit.obj) : error LNK2001: s¡mbolo externo OleUIPasteSpecialA sin resolver
ct.lib(ctmath2.obj) : error LNK2019: s¡mbolo externo __imp_floor sin resolver al que se hace referencia en la funci¢n HB_FUN_FLOOR
ct.lib(ascpos.obj) : error LNK2019: s¡mbolo externo __imp_isdigit sin resolver al que se hace referencia en la funci¢n do_ascpos
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isdigit sin resolver
hbzip.lib(zipnew.obj) : error LNK2019: s¡mbolo externo __imp__localtime64 sin resolver al que se hace referencia en la funci¢n hb___GetFileNamesFromZip
hbzip.lib(zipfileheader.obj) : error LNK2001: s¡mbolo externo __imp__localtime64 sin resolver
hbzip.lib(zipfileheader.obj) : error LNK2019: s¡mbolo externo __imp__mktime64 sin resolver al que se hace referencia en la funci¢n "public: __int64 __cdecl CZipFileHeader::GetTime(void)const " (?GetTime@CZipFileHeader@@QEBA_JXZ)
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipexception.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
vm.lib(fm.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_srand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_srand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_rand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_rand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_strcoll sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipString::Collate(char const *)const " (?Collate@CZipString@@QEBAHPEBD@Z)
hbzip.lib(zipstring.obj) : error LNK2001: s¡mbolo externo __imp_strcoll sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__time64 sin resolver al que se hace referencia en la funci¢n "public: bool __cdecl CZipArchive::AddNewFile(struct CZipAddNewFileInfo &)" (?AddNewFile@CZipArchive@@QEAA_NAEAUCZipAddNewFileInfo@@@Z)
hbzip.lib(zipplatform.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__tell sin resolver al que se hace referencia en la funci¢n "public: virtual unsigned __int64 __cdecl CZipFile::GetPosition(void)const " (?GetPosition@CZipFile@@UEBA_KXZ)
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipfile.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__stat64i32 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::GetFileModTime(char const *,__int64 &)" (?GetFileModTime@ZipPlatform@@YA_NPEBDAEA_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__access sin resolver al que se hace referencia en la funci¢n "int __cdecl ZipPlatform::FileExists(char const *)" (?FileExists@ZipPlatform@@YAHPEBD@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__utime64 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::SetFileModTime(char const *,__int64)" (?SetFileModTime@ZipPlatform@@YA_NPEBD_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__chdir sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::ChangeDirectory(char const *)" (?ChangeDirectory@ZipPlatform@@YA_NPEBD@Z)
hbzip.lib(zipexception.obj) : error LNK2019: s¡mbolo externo __imp_strncpy sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipException::GetErrorMessage(char *,unsigned int,unsigned int *)" (?GetErrorMessage@CZipException@@QEAAHPEADIPEAI@Z)
pcrepos.lib(pcreposix.obj) : error LNK2001: s¡mbolo externo __imp_strncpy sin resolver
hbzip.lib(zippathcomponent.obj) : error LNK2019: s¡mbolo externo __imp__splitpath sin resolver al que se hace referencia en la funci¢n "public: void __cdecl CZipPathComponent::SetFullPath(char const *)" (?SetFullPath@CZipPathComponent@@QEAAXPEBD@Z)
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbprintf.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(itemapi.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
rtl.lib(fstemp.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2019: s¡mbolo externo __imp_div sin resolver al que se hace referencia en la funci¢n hb_vmSubDate
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_div sin resolver
vm.lib(itemapi.obj) : error LNK2019: s¡mbolo externo __imp__finite sin resolver al que se hace referencia en la funci¢n hb_itemStrBuf
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isxdigit sin resolver al que se hace referencia en la funci¢n HB_FUN_ISXDIGIT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isspace sin resolver al que se hace referencia en la funci¢n HB_FUN_ISSPACE
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_ispunct sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPUNCT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isprint sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPRINT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isgraph sin resolver al que se hace referencia en la funci¢n HB_FUN_ISGRAPH
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_iscntrl sin resolver al que se hace referencia en la funci¢n HB_FUN_ISCNTRL
rtl.lib(dirdrive.obj) : error LNK2019: s¡mbolo externo __imp_remove sin resolver al que se hace referencia en la funci¢n HB_FUN_HB_DISKREADY
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__chdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__getdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(fparse.obj) : error LNK2019: s¡mbolo externo __imp_fgetc sin resolver al que se hace referencia en la funci¢n HB_FUN_FCHARCOUNT
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_toupper sin resolver al que se hace referencia en la funci¢n hb_str2number
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_tolower sin resolver al que se hace referencia en la funci¢n hb_strAtI
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_strerror_s sin resolver al que se hace referencia en la funci¢n hb_strerror
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dclass sin resolver al que se hace referencia en la funci¢n hb_vsnprintf
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dsign sin resolver al que se hace referencia en la funci¢n put_dbl
common.lib(hbtrace.obj) : error LNK2019: s¡mbolo externo __imp__dup sin resolver al que se hace referencia en la funci¢n hb_tr_trace
pruebas.exe : fatal error LNK1120: 200 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\4\f88jtl.lnk

hbmk2: Error: Referenced, missing, but unknown function(s): CEILING(), SET(),
       HB_UTF8STRTRAN(), HB_I18NGETBASELANGUAGE(), WEBVIEW2_SHOWDOWNLOADS(),
       GDIPLUSSTARTUP(), GDIPLUSSHUTDOWN(), REPASTESPECIAL5(), FLOOR(),
       ISXDIGIT(), ISSPACE(), ISPUNCT(), ISPRINT(), ISGRAPH(), ISCNTRL(),
       HB_DISKREADY(), FCHARCOUNT()
Gracias de antemano por la ayuda]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-21T09:36:22-07:00 2025-01-21T09:36:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277097#p277097
Funcionando correctamente :)

xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64\include
-Lc:\fwh64\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-opruebas
#-inc
-run
]]>

Funcionando correctamente :)

xtest.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\test.prg

#recursos
#.\res\test.rc

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64\include
-Lc:\fwh64\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-opruebas
#-inc
-run
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-21T11:34:05-07:00 2025-01-21T11:34:05-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277100#p277100
Nos queda unicamente este error

Code: Select all | Expand

C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 1, pCodes 16
test.c
hbmk2: Linking... pruebas.exe
Fivehx64.lib(twebview2.obj) : error LNK2001: s¡mbolo externo HB_FUN_WEBVIEW2_SHOWDOWNLOADS sin resolver
pruebas.exe : fatal error LNK1120: 1 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\5\ulxzrs.lnk

hbmk2: Error: Referenced, missing, but unknown function(s):
       WEBVIEW2_SHOWDOWNLOADS()

C:\cmplar_xtest_64>
]]>

Nos queda unicamente este error

Code: Select all | Expand

C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 1, pCodes 16
test.c
hbmk2: Linking... pruebas.exe
Fivehx64.lib(twebview2.obj) : error LNK2001: s¡mbolo externo HB_FUN_WEBVIEW2_SHOWDOWNLOADS sin resolver
pruebas.exe : fatal error LNK1120: 1 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\5\ulxzrs.lnk

hbmk2: Error: Referenced, missing, but unknown function(s):
       WEBVIEW2_SHOWDOWNLOADS()

C:\cmplar_xtest_64>
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-21T12:00:48-07:00 2025-01-21T12:00:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277101#p277101 ]]> ]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-21T14:09:46-07:00 2025-01-21T14:09:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277103#p277103 :D]]> :D]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-21T14:15:23-07:00 2025-01-21T14:15:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277104#p277104
Nos sale el siguiente error:

Code: Select all | Expand

C:\cmplar_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\conodbc.prg'...
.\PRG\conodbc.prg(7) Error E0001  Statement not allowed outside of procedure or function
1 error

No code generated
hbmk2[conodbc]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\conodbc.prg -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
La línea que nos indica es la siguiente:
Image

Se que hace falta colocar un flag para que no pida la función main() como principal, tú me podrías indicar cuál es?

Gracias de antemano.]]>

Nos sale el siguiente error:

Code: Select all | Expand

C:\cmplar_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\conodbc.prg'...
.\PRG\conodbc.prg(7) Error E0001  Statement not allowed outside of procedure or function
1 error

No code generated
hbmk2[conodbc]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\conodbc.prg -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
La línea que nos indica es la siguiente:
Image

Se que hace falta colocar un flag para que no pida la función main() como principal, tú me podrías indicar cuál es?

Gracias de antemano.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-21T14:31:42-07:00 2025-01-21T14:31:42-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277105#p277105 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-21T15:15:42-07:00 2025-01-21T15:15:42-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277106#p277106 No veo en donde esta la -n perdon :oops: :shock:

conodbc.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\conodbc.prg

#recursos
.\res\conodbc.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-oconodb
#-inc
-run
xgo64_cnn.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 conodbc.hbp -xhb -comp=msvc64
@endlocal

]]>
No veo en donde esta la -n perdon :oops: :shock:

conodbc.hbp

Code: Select all | Expand

-gui

#los prgs
.\PRG\conodbc.prg

#recursos
.\res\conodbc.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-oconodb
#-inc
-run
xgo64_cnn.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 conodbc.hbp -xhb -comp=msvc64
@endlocal

]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-21T23:44:19-07:00 2025-01-21T23:44:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277111#p277111 <![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-22T04:33:29-07:00 2025-01-22T04:33:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277118#p277118
No se como agregar la -n- cuando la colocó en archivo .hbp, no me genera el exe, la estamos colocando como esta en archivo .hbp que compila con borland, pero como te mencione no funciona :(

Code: Select all | Expand

-gui

#los prgs
.\PRG\conodbc.prg

#recursos
.\res\conodbc.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-optim-

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 
-ldflag+= -n- 

-oconodbc
#-inc
-run
]]>

No se como agregar la -n- cuando la colocó en archivo .hbp, no me genera el exe, la estamos colocando como esta en archivo .hbp que compila con borland, pero como te mencione no funciona :(

Code: Select all | Expand

-gui

#los prgs
.\PRG\conodbc.prg

#recursos
.\res\conodbc.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-optim-

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 
-ldflag+= -n- 

-oconodbc
#-inc
-run
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-22T04:39:01-07:00 2025-01-22T04:39:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277119#p277119
-ldflag+= -n-

Eso le da ese flag al enlazador!

tenemos que darle ese flag a Harbour...]]>

-ldflag+= -n-

Eso le da ese flag al enlazador!

tenemos que darle ese flag a Harbour...]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-22T08:40:54-07:00 2025-01-22T08:40:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277123#p277123

Podrías ser un poco mas especifico.

Gracias de antemano.]]>


Podrías ser un poco mas especifico.

Gracias de antemano.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-22T11:59:32-07:00 2025-01-22T11:59:32-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277130#p277130
xgo.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHarbour64\bin\hbmk2 test.hbp -xhb -comp=msvc64
@endlocal
test.hbp

Code: Select all | Expand

-gui

-n-

#los prgs
test.prg

-Ic:\fwh64\include
-Lc:\fwh64\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-oconodbc
#-inc
-run
test.prg

Code: Select all | Expand

#include "FiveWin.ch"

Otro()

function Otro()

    MsgInfo( "ok" )

return nil    
]]>

xgo.bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHarbour64\bin\hbmk2 test.hbp -xhb -comp=msvc64
@endlocal
test.hbp

Code: Select all | Expand

-gui

-n-

#los prgs
test.prg

-Ic:\fwh64\include
-Lc:\fwh64\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-oconodbc
#-inc
-run
test.prg

Code: Select all | Expand

#include "FiveWin.ch"

Otro()

function Otro()

    MsgInfo( "ok" )

return nil    
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by sysctrl2]]> 2025-01-22T15:41:16-07:00 2025-01-22T15:41:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277135#p277135
aprender entonces !!!]]>

aprender entonces !!!]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by Antonio Linares]]> 2025-01-22T18:34:39-07:00 2025-01-22T18:34:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277138#p277138

Pero Borland también funciona excelente. Es cuestión de gustos.

Eso si, el debugger a bajo nivel de Visual Studio es una maravilla y eso no lo tenemos en Borland...]]>


Pero Borland también funciona excelente. Es cuestión de gustos.

Eso si, el debugger a bajo nivel de Visual Studio es una maravilla y eso no lo tenemos en Borland...]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-23T06:32:57-07:00 2025-01-23T06:32:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277150#p277150
De nuevo gracias por todo, ya logramos compilar una aplicación pequeñita que necesitamos para la configuración de la conexión odbc, ahora queremos compilar una aplicación que tiene mas prgs, copiamos la misma configuración, agregamos los prg que generan la app, pero sale un error y no logro identificar por que se genera, el error:

Code: Select all | Expand

C:\cmplar_cnt_64>xgo64

C:\cmplar_cnt_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\Hl_menu.prg'...
.\PRG\Hl_menu.prg(1524) Error E0032  Can't create output file: 'obj\Hl_menu.c'
Lines 1525, Functions/Procedures 15, pCodes 0
hbmk2[xhl_cnt_64]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\Hl_menu.prg -n- -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS

C:\cmplar_cnt_64>
La información del archivo de configuración

Code: Select all | Expand

-gui

-n-

#los prgs
.\PRG\Hl_menu.prg
.\PRG\Alyma.prg
.\PRG\Funciones.prg
.\PRG\Abusc.prg
.\PRG\Ajson.prg
.\PRG\Asql.prg
.\PRG\Photos.prg
.\PRG\Ainve.prg
.\PRG\Amete.prg

#recursos
.\RES\hl_cnt.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-optim-

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-ohl_cnt
#-inc
-run

y el .bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xhl_cnt_64.hbp -xhb -comp=msvc64
@endlocal
]]>

De nuevo gracias por todo, ya logramos compilar una aplicación pequeñita que necesitamos para la configuración de la conexión odbc, ahora queremos compilar una aplicación que tiene mas prgs, copiamos la misma configuración, agregamos los prg que generan la app, pero sale un error y no logro identificar por que se genera, el error:

Code: Select all | Expand

C:\cmplar_cnt_64>xgo64

C:\cmplar_cnt_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\Hl_menu.prg'...
.\PRG\Hl_menu.prg(1524) Error E0032  Can't create output file: 'obj\Hl_menu.c'
Lines 1525, Functions/Procedures 15, pCodes 0
hbmk2[xhl_cnt_64]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\Hl_menu.prg -n- -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS

C:\cmplar_cnt_64>
La información del archivo de configuración

Code: Select all | Expand

-gui

-n-

#los prgs
.\PRG\Hl_menu.prg
.\PRG\Alyma.prg
.\PRG\Funciones.prg
.\PRG\Abusc.prg
.\PRG\Ajson.prg
.\PRG\Asql.prg
.\PRG\Photos.prg
.\PRG\Ainve.prg
.\PRG\Amete.prg

#recursos
.\RES\hl_cnt.res

-info

#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental 
-workdir=.\obj

-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib

-lFivehx64
-lFiveHC64

-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra

-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto

-lgdiplus
-lucrt
-lole32
-loledlg

-optim-

-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt 

-ohl_cnt
#-inc
-run

y el .bat

Code: Select all | Expand

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xhl_cnt_64.hbp -xhb -comp=msvc64
@endlocal
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-23T06:35:27-07:00 2025-01-23T06:35:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277151#p277151 :D :D :oops: :oops:

Hacía falta crear la carpeta ./obj dentro del directorio en donde se compila :oops:

Encontramos la lógica del error, leyendo el mensaje que publicamos para buscar ayuda jejejejejeje.
Can't create output file: 'obj\Hl_menu.c'
]]>
:D :D :oops: :oops:

Hacía falta crear la carpeta ./obj dentro del directorio en donde se compila :oops:

Encontramos la lógica del error, leyendo el mensaje que publicamos para buscar ayuda jejejejejeje.
Can't create output file: 'obj\Hl_menu.c'
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-23T07:01:09-07:00 2025-01-23T07:01:09-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277152#p277152 :D :D :D

A grandes rasgos parece que todo funciona con normalidad, la vamos a copiar en par de clientes de confianza para que la prueben. De momento y de manera visual encontramos el siguiente error:

Image

Pasa en los GET que se definen como password, ya le cambiamos el tipo de idioma y codificación, pero sigue fallando.

Así está definido el GET

Code: Select all | Expand

@ 40, 45 GET oGnro VAR oFac:hEncabezado["numero"] SIZE 100, 30 PIXEL OF oDlgFct UPDATE FONT oFont2 RIGHT PASSWORD
]]>
:D :D :D

A grandes rasgos parece que todo funciona con normalidad, la vamos a copiar en par de clientes de confianza para que la prueben. De momento y de manera visual encontramos el siguiente error:

Image

Pasa en los GET que se definen como password, ya le cambiamos el tipo de idioma y codificación, pero sigue fallando.

Así está definido el GET

Code: Select all | Expand

@ 40, 45 GET oGnro VAR oFac:hEncabezado["numero"] SIZE 100, 30 PIXEL OF oDlgFct UPDATE FONT oFont2 RIGHT PASSWORD
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by karinha]]> 2025-01-23T07:15:08-07:00 2025-01-23T07:15:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277153#p277153

Code: Select all | Expand

METHOD DispText() CLASS TGet



         /* //-> Mudei em 25/10/2016 - Para Aparecer um * no PASSWORD-WS Joao
         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
         */
         // cambiado:
         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
                                          Len( Trim( ::oGet:buffer ) ) ) )

Como esta?

Regards, saludos.]]>

Code: Select all | Expand

METHOD DispText() CLASS TGet



         /* //-> Mudei em 25/10/2016 - Para Aparecer um * no PASSWORD-WS Joao
         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
         */
         // cambiado:
         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
                                          Len( Trim( ::oGet:buffer ) ) ) )

Como esta?

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-23T07:35:17-07:00 2025-01-23T07:35:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277156#p277156
esta así:

Code: Select all | Expand

         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
]]>

esta así:

Code: Select all | Expand

         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by karinha]]> 2025-01-23T07:37:07-07:00 2025-01-23T07:37:07-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277157#p277157

Code: Select all | Expand

SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
Y prueba.

Mira también:

https://forums.fivetechsupport.com/view ... =3&t=44512

Si el error persiste, habla con Enrico, probablemente sea un defecto en el xHarbour de 64 bits.

Regards, saludos.]]>

Code: Select all | Expand

SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
Y prueba.

Mira también:

https://forums.fivetechsupport.com/view ... =3&t=44512

Si el error persiste, habla con Enrico, probablemente sea un defecto en el xHarbour de 64 bits.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-24T10:27:57-07:00 2025-01-24T10:27:57-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277187#p277187
Pero ya hemos revisado más cosas y parece que hay también varios problemas en los acentos, voy a intentar solucionar y cualquier cosa comento.]]>

Pero ya hemos revisado más cosas y parece que hay también varios problemas en los acentos, voy a intentar solucionar y cualquier cosa comento.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by karinha]]> 2025-01-24T10:56:37-07:00 2025-01-24T10:56:37-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277188#p277188
viewtopic.php?p=274969#p274969

El Maestro Nages no pudo dar una solución y hasta el día de hoy no ha respondido.

Quizás ya lo solucionó y se olvidó de responder al tema.

Gracias, tks.

Regards, saludos.]]>

viewtopic.php?p=274969#p274969

El Maestro Nages no pudo dar una solución y hasta el día de hoy no ha respondido.

Quizás ya lo solucionó y se olvidó de responder al tema.

Gracias, tks.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Compilar con xharbour y msvc con hbmk2 :: Reply by leandro]]> 2025-01-24T11:07:55-07:00 2025-01-24T11:07:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45325&p=277189#p277189 <![CDATA[FiveWin para Harbour/xHarbour :: FW_ReadImage error :: Author TOTOVIOTTI]]> 2025-01-20T07:27:01-07:00 2025-01-20T07:27:01-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277074#p277074 de vez en cuando, cuando abro un diálogo que tiene una pequeña imagen que lo identifica
y que lo tomo de mi archivo de recursos, me da el siguiente error:

Error occurred at: 15-01-2025, 12:26:58
Error description: Error BASE/1133 Error de rango: asignaci¢n del array
Args:
[ 1] = N 10

Stack Calls
===========
Called from: .\source\function\imgtxtio.prg => FW_READIMAGE( 1605 )


Se reinicia la compu y listo, no ocurre más, pero, es incómodo. Por ahora
lo puedo zafar diciéndoles esto, pero, me gustaría encontrar la solución para
esto. No son grandes imágenes, son pequeñas y que las tengo en mi archivo
de recursos. Cabe acotar que lo hace en diferentes diálogos y con diferentes imágenes,
no lo hace siempre con la misma.

Alguno sabe como puedo solucionar esto?
Muchas gracias!!

Roberto]]>
de vez en cuando, cuando abro un diálogo que tiene una pequeña imagen que lo identifica
y que lo tomo de mi archivo de recursos, me da el siguiente error:

Error occurred at: 15-01-2025, 12:26:58
Error description: Error BASE/1133 Error de rango: asignaci¢n del array
Args:
[ 1] = N 10

Stack Calls
===========
Called from: .\source\function\imgtxtio.prg => FW_READIMAGE( 1605 )


Se reinicia la compu y listo, no ocurre más, pero, es incómodo. Por ahora
lo puedo zafar diciéndoles esto, pero, me gustaría encontrar la solución para
esto. No son grandes imágenes, son pequeñas y que las tengo en mi archivo
de recursos. Cabe acotar que lo hace en diferentes diálogos y con diferentes imágenes,
no lo hace siempre con la misma.

Alguno sabe como puedo solucionar esto?
Muchas gracias!!

Roberto]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error :: Reply by karinha]]> 2025-01-20T07:48:30-07:00 2025-01-20T07:48:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277076#p277076 https://forums.fivetechsupport.com/view ... rg#p257439

Regards, saludos.]]>
https://forums.fivetechsupport.com/view ... rg#p257439

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error :: Reply by TOTOVIOTTI]]> 2025-01-21T05:02:45-07:00 2025-01-21T05:02:45-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277091#p277091
no saco mucho en claro en el post que me pasas, seguiré buscando
cual puede ser el problema. Entiendo que tenga que ver con el tema
del uso de la memoria respecto de los archivos de imágenes de los recursos...

:(

Muchas gracias..]]>

no saco mucho en claro en el post que me pasas, seguiré buscando
cual puede ser el problema. Entiendo que tenga que ver con el tema
del uso de la memoria respecto de los archivos de imágenes de los recursos...

:(

Muchas gracias..]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error :: Reply by karinha]]> 2025-01-21T06:11:06-07:00 2025-01-21T06:11:06-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277094#p277094
Regards, saludos.]]>

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error :: Reply by nageswaragunupudi]]> 2025-01-22T03:40:28-07:00 2025-01-22T03:40:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277117#p277117 Is the image a bmp or ico or some other? Let me see the entry in the RC file.]]> Is the image a bmp or ico or some other? Let me see the entry in the RC file.]]> <![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error (to Mr.Nages) :: Reply by TOTOVIOTTI]]> 2025-01-23T05:28:52-07:00 2025-01-23T05:28:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277148#p277148
1) My version is 24.08

2) Regarding whether it is from BMP or ICO, yes, they are the only resources I use in my DIALOGs.

3) As for how I use it:
REDEFINE BITMAP oBmp ID 100 OF oDlg RESOURCE "D_CLIENTES" TRANSPARENT

I clarify that it does not always happen, I suppose it must be something of memory, because, once the error occurs, it repeats itself. If I restart the computer, it works fine again.

Thank you so much!!
Roberto]]>

1) My version is 24.08

2) Regarding whether it is from BMP or ICO, yes, they are the only resources I use in my DIALOGs.

3) As for how I use it:
REDEFINE BITMAP oBmp ID 100 OF oDlg RESOURCE "D_CLIENTES" TRANSPARENT

I clarify that it does not always happen, I suppose it must be something of memory, because, once the error occurs, it repeats itself. If I restart the computer, it works fine again.

Thank you so much!!
Roberto]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: FW_ReadImage error :: Reply by nageswaragunupudi]]> 2025-01-25T02:50:29-07:00 2025-01-25T02:50:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45329&p=277194#p277194
Please locate this line of code:

Code: Select all | Expand

aBmp  := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "" }
Replace this line of code with this line

Code: Select all | Expand

aBmp  := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "", nil, "" }
I hope this fixes the issue.
If not, please let me know.]]>

Please locate this line of code:

Code: Select all | Expand

aBmp  := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "" }
Replace this line of code with this line

Code: Select all | Expand

aBmp  := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "", nil, "" }
I hope this fixes the issue.
If not, please let me know.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: WEBVIEW2 una observación :: Author CARLOS ATUNCAR]]> 2025-01-24T09:29:22-07:00 2025-01-24T09:29:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277183#p277183

Code: Select all | Expand

#include "fivewin.ch"

Function Main(importe,vencimiento)
local oWnd,oWebView
local cUrl := "https://casoftsystemweb.com/service-notice.html?deuda="+importe+"&vencimiento="+vencimiento


DEFINE WINDOW oWnd FROM 0,0 TO 50,60 TITLE "AVISO DE VENCIMIENTO DE SERVICIOS" STYLE nOr(WS_SYSMENU)
oWnd:Show()
oWebView = TWebView2():New( oWnd )
oWebView:Navigate( cUrl )
oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )

ACTIVATE WINDOW oWnd CENTER ;
   ON RESIZE oWebView:SetSize( nWidth, nHeight-50 )
   oWebView:End()

Return
]]>

Code: Select all | Expand

#include "fivewin.ch"

Function Main(importe,vencimiento)
local oWnd,oWebView
local cUrl := "https://casoftsystemweb.com/service-notice.html?deuda="+importe+"&vencimiento="+vencimiento


DEFINE WINDOW oWnd FROM 0,0 TO 50,60 TITLE "AVISO DE VENCIMIENTO DE SERVICIOS" STYLE nOr(WS_SYSMENU)
oWnd:Show()
oWebView = TWebView2():New( oWnd )
oWebView:Navigate( cUrl )
oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )

ACTIVATE WINDOW oWnd CENTER ;
   ON RESIZE oWebView:SetSize( nWidth, nHeight-50 )
   oWebView:End()

Return
]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: WEBVIEW2 una observación :: Reply by leandro]]> 2025-01-24T10:25:29-07:00 2025-01-24T10:25:29-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277186#p277186
y si lanzas la alerta en una modal del html, nosotros lo montamos de esa manera y a funcionado correctamente.

Image]]>

y si lanzas la alerta en una modal del html, nosotros lo montamos de esa manera y a funcionado correctamente.

Image]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: WEBVIEW2 una observación :: Reply by CARLOS ATUNCAR]]> 2025-01-25T08:27:02-07:00 2025-01-25T08:27:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277198#p277198 <![CDATA[FiveWin para Harbour/xHarbour :: Re: WEBVIEW2 una observación :: Reply by Antonio Linares]]> 2025-01-25T09:48:25-07:00 2025-01-25T09:48:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277199#p277199
Prueba a cerrar el webview desde el VALID de la ventana]]>

Prueba a cerrar el webview desde el VALID de la ventana]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: WEBVIEW2 una observación :: Reply by CARLOS ATUNCAR]]> 2025-01-25T11:18:54-07:00 2025-01-25T11:18:54-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277204#p277204 <![CDATA[FiveWin para Harbour/xHarbour :: Re: WEBVIEW2 una observación :: Reply by Antonio Linares]]> 2025-01-25T15:15:13-07:00 2025-01-25T15:15:13-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45343&p=277210#p277210
gracias]]>

gracias]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Clausula TRANSPARENT no funciona en GROUP :: Author leandro]]> 2025-01-24T13:40:42-07:00 2025-01-24T13:40:42-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45346&p=277190#p277190
Estamos intentando definir un GROUP desde recursos, pero la clausula transparent no funciona correctamente, creo que cabe aclarar que el group esta a su vez montado sobre un folder.

En muchas partes del programa usamos los group desde recursos, nunca los REDEFINIMOS y funcionan bien, pero en este caso es necesario, por que en algunas ocasiones vamos a necesitar hacer oGroup:hide().

Image

Code: Select all | Expand

REDEFINE GROUP oGgrRt ID 4007 OF oFld:aDialogs[ 2 ] TRANSPARENT 
Gracias de antemano.]]>

Estamos intentando definir un GROUP desde recursos, pero la clausula transparent no funciona correctamente, creo que cabe aclarar que el group esta a su vez montado sobre un folder.

En muchas partes del programa usamos los group desde recursos, nunca los REDEFINIMOS y funcionan bien, pero en este caso es necesario, por que en algunas ocasiones vamos a necesitar hacer oGroup:hide().

Image

Code: Select all | Expand

REDEFINE GROUP oGgrRt ID 4007 OF oFld:aDialogs[ 2 ] TRANSPARENT 
Gracias de antemano.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Clausula TRANSPARENT no funciona en GROUP :: Reply by karinha]]> 2025-01-25T11:06:22-07:00 2025-01-25T11:06:22-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45346&p=277203#p277203
Mustre el código y el .RC, pls.

Regards, saludos.]]>

Mustre el código y el .RC, pls.

Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Clausula TRANSPARENT no funciona en GROUP :: Reply by karinha]]> 2025-01-25T11:46:50-07:00 2025-01-25T11:46:50-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45346&p=277205#p277205

Code: Select all | Expand

// C:\FWH\SAMPLES\LEANDGRP.PRG

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oFont, oBold, aVar[ 2 ], cTitle

   AFill( aVar, Space( 60 ) )

   cTitle := "GROUPBOX con xHarbour de 64 bits - Funciona?"

   DEFINE FONT oFont NAME "ARIAL" SIZE 0, - 14
   DEFINE FONT oBold NAME "ARIAL" SIZE 0, - 14 BOLD

   DEFINE DIALOG oDlg SIZE 500, 250 PIXEL TRUEPIXEL TITLE cTitle FONT oFont ;
      TRANSPARENT

   oDlg:lHelpIcon := .F.

   @  70, 50 GET aVar[ 1 ] SIZE 200, 20 PIXEL OF oDlg

   @ 100, 50 GET aVar[ 2 ] SIZE 200, 20 PIXEL OF oDlg

   oDlg:bPainted := < | hDC |
   RoundBox( hDC, 20, 40, 300, 150, 10, 10, CLR_HRED, 1 )
   oDlg:SayText( "Group Title-64 bits", { 30, 30, 50, 200 }, NIL, oBold, ;
                 { CLR_GREEN, oDlg:nClrPane } )
   RETURN NIL
   >

   @ 200, 200 BUTTON "Ok" SIZE 50, 20 OF oDlg PIXEL ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont, oBold

RETURN NIL
Regards, saludos.]]>

Code: Select all | Expand

// C:\FWH\SAMPLES\LEANDGRP.PRG

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oFont, oBold, aVar[ 2 ], cTitle

   AFill( aVar, Space( 60 ) )

   cTitle := "GROUPBOX con xHarbour de 64 bits - Funciona?"

   DEFINE FONT oFont NAME "ARIAL" SIZE 0, - 14
   DEFINE FONT oBold NAME "ARIAL" SIZE 0, - 14 BOLD

   DEFINE DIALOG oDlg SIZE 500, 250 PIXEL TRUEPIXEL TITLE cTitle FONT oFont ;
      TRANSPARENT

   oDlg:lHelpIcon := .F.

   @  70, 50 GET aVar[ 1 ] SIZE 200, 20 PIXEL OF oDlg

   @ 100, 50 GET aVar[ 2 ] SIZE 200, 20 PIXEL OF oDlg

   oDlg:bPainted := < | hDC |
   RoundBox( hDC, 20, 40, 300, 150, 10, 10, CLR_HRED, 1 )
   oDlg:SayText( "Group Title-64 bits", { 30, 30, 50, 200 }, NIL, oBold, ;
                 { CLR_GREEN, oDlg:nClrPane } )
   RETURN NIL
   >

   @ 200, 200 BUTTON "Ok" SIZE 50, 20 OF oDlg PIXEL ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont, oBold

RETURN NIL
Regards, saludos.]]>
<![CDATA[FiveWin para Harbour/xHarbour :: Re: Clausula TRANSPARENT no funciona en GROUP :: Reply by Antonio Linares]]> 2025-01-25T16:30:46-07:00 2025-01-25T16:30:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=45346&p=277211#p277211
Si lo que necesitas es ocultarlo a veces, solamente, esto se puede hacer aunque no esté redefinido.

Se busca el control por su ID y se le da la orden de ocultarse:

#define SW_HIDE 0

local hWndControl := GetDlgItem( oDlg:hWnd, ID_GROUP )

ShowWindow( hwndControl, SW_HIDE )

Recuerda que esto debes hacerlo desde la claúsula ON INIT del diálogo para que los handles tanto del diálogo como del control existan]]>

Si lo que necesitas es ocultarlo a veces, solamente, esto se puede hacer aunque no esté redefinido.

Se busca el control por su ID y se le da la orden de ocultarse:

#define SW_HIDE 0

local hWndControl := GetDlgItem( oDlg:hWnd, ID_GROUP )

ShowWindow( hwndControl, SW_HIDE )

Recuerda que esto debes hacerlo desde la claúsula ON INIT del diálogo para que los handles tanto del diálogo como del control existan]]>
<![CDATA[mod_harbour :: UT v2.0 - Proyecto Open Souce :: Author Carles]]> 2025-01-24T10:05:11-07:00 2025-01-24T10:05:11-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=46&t=45344&p=277184#p277184
He publicado en el repositorio todos los fuentes del proyecto UT v.2.0 y queda liberado como proyecto MIT. Era el momento y algo que hacia mucho tiempo que queria hacer pero la cantidad de piezas a tocar y reorganizar me hacia aguantar el momento.

Un proyecto que no es una clase, una función o un simple código, sino una herramienta que te ayudará a trabajar la web de una manera fácil pero muy efectiva. Empezamos hace 5 años con mod_harbour en búsqueda de esa solución y todo cambiando, mutando, adaptándose,... Creo que mas de uno lo usará bien. :D

Queda libre para quien quiera aportar, modificar, rehacer, ...

https://carles9000.github.io/

Image]]>

He publicado en el repositorio todos los fuentes del proyecto UT v.2.0 y queda liberado como proyecto MIT. Era el momento y algo que hacia mucho tiempo que queria hacer pero la cantidad de piezas a tocar y reorganizar me hacia aguantar el momento.

Un proyecto que no es una clase, una función o un simple código, sino una herramienta que te ayudará a trabajar la web de una manera fácil pero muy efectiva. Empezamos hace 5 años con mod_harbour en búsqueda de esa solución y todo cambiando, mutando, adaptándose,... Creo que mas de uno lo usará bien. :D

Queda libre para quien quiera aportar, modificar, rehacer, ...

https://carles9000.github.io/

Image]]>
<![CDATA[All products support :: Re: leggere test,hrb :: Reply by goosfancito]]> 2025-01-08T08:53:02-07:00 2025-01-08T08:53:02-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=20&t=42755&p=276832#p276832 Grazie]]> Grazie]]> <![CDATA[WhatsNew / Novedades :: Re: xHarbour.org updated! :: Reply by Enrico Maria Giordano]]> 2025-01-19T11:22:19-07:00 2025-01-19T11:22:19-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=16&t=33542&p=277033#p277033
http://xharbour.org/index.asp?page=down ... naries_win

Fixed a number bug with BCC64.]]>

http://xharbour.org/index.asp?page=down ... naries_win

Fixed a number bug with BCC64.]]>
<![CDATA[Utilities / Utilidades :: How to upgrade these forums / Como actualizar estos foros :: Author Antonio Linares]]> 2025-01-06T01:15:30-07:00 2025-01-06T01:15:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45280&p=276761#p276761
Aqui tenemos un resumen del proceso hecho por Charly:

1. Creamos en la bd de mysql la base de datos que tengamos definida en la base de datos antigua del foro.

2. Creamos el usuario en la base de datos que usabamos en el antiguo foro. En nuestro caso lo llamaremos forums

3. Importamos la base de datos antigua
mysql -u root -p forums < c:\tmp\Fivetech\20250105\fivetech_forums_20250105.sql

4. Instalamos en htdocs/forums la ultima version de phpbb 3.3

5. Eliminamos las carpetas: images, files, store y el fichero config.php

6. Copiamos del foro antiguo las mismas carpetas y el config.php

Es muy importante revisar los datos del config.php para ver si los datos coinciden y los tenemos actualizados: nombre de la base de datos, user, psw,...

Antes de iniciar el proceso de instalacion del nuevo foro, si la base de datos a importar es muy grande habremos de modificar la configuración del tiempo de ejecución de los procesos de php. Para ello, abrir el fichero php/php.ini y aumentar la variable MAX_EXECUTE_TIME , por ejemplo a 1200

Ejecutar phpbb --> localhost/forums/install e iremos a la pestaña UPDATE

Image

Le daremos al proceso y esperaremos a que se ejecute la migración. El proceso dura en funcion de los miles de registros que tengamos en nuestro sistema. Una ve finalizado nos habria de salir una pantalla parecida a esta

Image

Eliminaremos la carpeta /install y accederemos de nuesvo al foro --> localhost/forums]]>

Aqui tenemos un resumen del proceso hecho por Charly:

1. Creamos en la bd de mysql la base de datos que tengamos definida en la base de datos antigua del foro.

2. Creamos el usuario en la base de datos que usabamos en el antiguo foro. En nuestro caso lo llamaremos forums

3. Importamos la base de datos antigua
mysql -u root -p forums < c:\tmp\Fivetech\20250105\fivetech_forums_20250105.sql

4. Instalamos en htdocs/forums la ultima version de phpbb 3.3

5. Eliminamos las carpetas: images, files, store y el fichero config.php

6. Copiamos del foro antiguo las mismas carpetas y el config.php

Es muy importante revisar los datos del config.php para ver si los datos coinciden y los tenemos actualizados: nombre de la base de datos, user, psw,...

Antes de iniciar el proceso de instalacion del nuevo foro, si la base de datos a importar es muy grande habremos de modificar la configuración del tiempo de ejecución de los procesos de php. Para ello, abrir el fichero php/php.ini y aumentar la variable MAX_EXECUTE_TIME , por ejemplo a 1200

Ejecutar phpbb --> localhost/forums/install e iremos a la pestaña UPDATE

Image

Le daremos al proceso y esperaremos a que se ejecute la migración. El proceso dura en funcion de los miles de registros que tengamos en nuestro sistema. Una ve finalizado nos habria de salir una pantalla parecida a esta

Image

Eliminaremos la carpeta /install y accederemos de nuesvo al foro --> localhost/forums]]>
<![CDATA[Utilities / Utilidades :: Re: How to upgrade these forums / Como actualizar estos foros :: Reply by Antonio Linares]]> 2025-01-06T01:29:34-07:00 2025-01-06T01:29:34-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45280&p=276762#p276762
En nuestro caso el SQL dump es tan grande que luego MySQL en el hosting no era capaz de restaurarlo de una sola vez:
ERROR 2013 (HY000) at line 1672: Lost connection to MySQL server during query
Así que nos hemos visto obligados a hacerlo tabla por tabla y en algunas, como phpbb_posts hemos tenido que hacerlo de 50.000 en 50.000 registros:

mysqldump --user=fivetec1_antonio --password=1234 fivetec1_forums phpbb_reports > fivetech_phpbb_reports.sql
...
mysqldump -u fivetec1_antonio -p fivetec1_forums phpbb_posts --where="1 LIMIT 50000" > parte1.sql
mysqldump -u fivetec1_antonio -p fivetec1_forums phpbb_posts --where="1 LIMIT 50000 OFFSET 50000" > parte2.sql
...

En el server la restauración de la base de datos ha sido también tabla a tabla, y/o parte a parte:

mysql -u fivetec1_antonio -p fivetec1_forums < fivetech_usergroup.sql
...
mysql -u fivetec1_antonio -p fivetec1_forums < parte1.sql]]>

En nuestro caso el SQL dump es tan grande que luego MySQL en el hosting no era capaz de restaurarlo de una sola vez:
ERROR 2013 (HY000) at line 1672: Lost connection to MySQL server during query
Así que nos hemos visto obligados a hacerlo tabla por tabla y en algunas, como phpbb_posts hemos tenido que hacerlo de 50.000 en 50.000 registros:

mysqldump --user=fivetec1_antonio --password=1234 fivetec1_forums phpbb_reports > fivetech_phpbb_reports.sql
...
mysqldump -u fivetec1_antonio -p fivetec1_forums phpbb_posts --where="1 LIMIT 50000" > parte1.sql
mysqldump -u fivetec1_antonio -p fivetec1_forums phpbb_posts --where="1 LIMIT 50000 OFFSET 50000" > parte2.sql
...

En el server la restauración de la base de datos ha sido también tabla a tabla, y/o parte a parte:

mysql -u fivetec1_antonio -p fivetec1_forums < fivetech_usergroup.sql
...
mysql -u fivetec1_antonio -p fivetec1_forums < parte1.sql]]>
<![CDATA[Utilities / Utilidades :: Re: How to upgrade these forums / Como actualizar estos foros :: Reply by Antonio Linares]]> 2025-01-06T01:32:25-07:00 2025-01-06T01:32:25-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45280&p=276763#p276763
05/01/2025 21:22 1.842.732 fivetech_users.sql
05/01/2025 21:25 3.062 fivetech_sessions.sql
05/01/2025 21:30 2.488 fivetech_styles.sql
05/01/2025 21:31 64.956 fivetech_usergroup.sql
05/01/2025 21:33 9.115.241 fivetech_topics.sql
05/01/2025 21:35 407.499 fivetech_sessionskeys.sql
05/01/2025 21:36 8.981 fivetech_zebra.sql
05/01/2025 21:37 2.684 fivetech_phpbb_profile_lang.sql
05/01/2025 21:40 5.035 fivetech_phpbb_profile_fields.sql
05/01/2025 21:41 75.309 fivetech_phpbb_profile_fields_data.sql
// 05/01/2025 21:26 467.507.206 fivetech_posts.sql
05/01/2025 21:49 32.595.049 parte1.sql
05/01/2025 21:52 65.031.741 parte2.sql
05/01/2025 21:54 103.337.370 parte3.sql
05/01/2025 21:57 102.104.871 parte4.sql
05/01/2025 22:03 109.319.555 parte5.sql
05/01/2025 22:06 55.138.810 resto.sql
05/01/2025 22:09 690.524 fivetech_phpbb_search_results.sql
05/01/2025 22:10 15.537.942 fivetech_phpbb_topics_track.sql
05/01/2025 22:12 570.334 fivetech_phpbb_topics_watch.sql
05/01/2025 22:13 1.307.829 fivetech_phpbb_topics_posted.sql
05/01/2025 23:20 7.329.738 fivetech_phpbb_search_wordlist.sql
05/01/2025 23:22 134.131.709 fivetech_phpbb_search_wordmatch.sql
06/01/2025 05:54 2.294 fivetech_phpbb_teampage.sql
06/01/2025 08:47 5.043 fivetech_phpbb_reports.sql
06/01/2025 08:49 34.039 fivetech_phpbb_privmsgs.sql
06/01/2025 09:35 1.926.408 fivetech_phpbb_user_notifications.sql
06/01/2025 08:51 2.178 fivetech_phpbb_warnings.sql
06/01/2025 09:07 4.562 fivetech_phpbb_smilies.sql
Es posible que aún pueda aparecer un error de alguna tabla que no haya sido copiada. En tal caso os rogamos que nos lo indiqueis para copiarla :D]]>
05/01/2025 21:22 1.842.732 fivetech_users.sql
05/01/2025 21:25 3.062 fivetech_sessions.sql
05/01/2025 21:30 2.488 fivetech_styles.sql
05/01/2025 21:31 64.956 fivetech_usergroup.sql
05/01/2025 21:33 9.115.241 fivetech_topics.sql
05/01/2025 21:35 407.499 fivetech_sessionskeys.sql
05/01/2025 21:36 8.981 fivetech_zebra.sql
05/01/2025 21:37 2.684 fivetech_phpbb_profile_lang.sql
05/01/2025 21:40 5.035 fivetech_phpbb_profile_fields.sql
05/01/2025 21:41 75.309 fivetech_phpbb_profile_fields_data.sql
// 05/01/2025 21:26 467.507.206 fivetech_posts.sql
05/01/2025 21:49 32.595.049 parte1.sql
05/01/2025 21:52 65.031.741 parte2.sql
05/01/2025 21:54 103.337.370 parte3.sql
05/01/2025 21:57 102.104.871 parte4.sql
05/01/2025 22:03 109.319.555 parte5.sql
05/01/2025 22:06 55.138.810 resto.sql
05/01/2025 22:09 690.524 fivetech_phpbb_search_results.sql
05/01/2025 22:10 15.537.942 fivetech_phpbb_topics_track.sql
05/01/2025 22:12 570.334 fivetech_phpbb_topics_watch.sql
05/01/2025 22:13 1.307.829 fivetech_phpbb_topics_posted.sql
05/01/2025 23:20 7.329.738 fivetech_phpbb_search_wordlist.sql
05/01/2025 23:22 134.131.709 fivetech_phpbb_search_wordmatch.sql
06/01/2025 05:54 2.294 fivetech_phpbb_teampage.sql
06/01/2025 08:47 5.043 fivetech_phpbb_reports.sql
06/01/2025 08:49 34.039 fivetech_phpbb_privmsgs.sql
06/01/2025 09:35 1.926.408 fivetech_phpbb_user_notifications.sql
06/01/2025 08:51 2.178 fivetech_phpbb_warnings.sql
06/01/2025 09:07 4.562 fivetech_phpbb_smilies.sql
Es posible que aún pueda aparecer un error de alguna tabla que no haya sido copiada. En tal caso os rogamos que nos lo indiqueis para copiarla :D]]>
<![CDATA[Utilities / Utilidades :: Re: How to upgrade these forums / Como actualizar estos foros :: Reply by Antonio Linares]]> 2025-01-06T01:45:46-07:00 2025-01-06T01:45:46-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45280&p=276764#p276764 lo hemos hecho desde una ventana cmd, pero el script que se ejecuta es el mismo:

c:\xampp\php>php ../htdocs/forums/bin/phpbbcli.php db:migrate --safe-mode]]>
lo hemos hecho desde una ventana cmd, pero el script que se ejecuta es el mismo:

c:\xampp\php>php ../htdocs/forums/bin/phpbbcli.php db:migrate --safe-mode]]>
<![CDATA[Utilities / Utilidades :: these forums and cookies / estos foros y las cookies :: Author Antonio Linares]]> 2025-01-07T02:11:23-07:00 2025-01-07T02:11:23-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45282&p=276791#p276791
Si alguna vez no puedes loguearte en esta versión de los foros, por favor borra los cookies desde tu navegador de internet]]>

Si alguna vez no puedes loguearte en esta versión de los foros, por favor borra los cookies desde tu navegador de internet]]>
<![CDATA[Utilities / Utilidades :: Re: these forums and cookies / estos foros y las cookies :: Reply by Antonio Linares]]> 2025-01-07T03:11:53-07:00 2025-01-07T03:11:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45282&p=276794#p276794 ]]> ]]> <![CDATA[Utilities / Utilidades :: Re: these forums and cookies / estos foros y las cookies :: Reply by TecniSoftware]]> 2025-01-07T08:23:39-07:00 2025-01-07T08:23:39-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45282&p=276803#p276803
Utilizo el navegador Edge, borré las cookies como indicaste y no logro hacer el login en el foro, si he podido desde chrome, siempre me sale el mensaje "The submitted form was invalid. Try submitting again."

Muchos saludos]]>

Utilizo el navegador Edge, borré las cookies como indicaste y no logro hacer el login en el foro, si he podido desde chrome, siempre me sale el mensaje "The submitted form was invalid. Try submitting again."

Muchos saludos]]>
<![CDATA[Utilities / Utilidades :: New dark style for these forums :: Author Antonio Linares]]> 2025-01-07T12:37:53-07:00 2025-01-07T12:37:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45286&p=276813#p276813

User Control Panel - Board preferences - Edit global settings

Select "Prosilver French edition"]]>


User Control Panel - Board preferences - Edit global settings

Select "Prosilver French edition"]]>
<![CDATA[Utilities / Utilidades :: testing forums code syntax highlighting :: Author Antonio Linares]]> 2025-01-09T16:24:45-07:00 2025-01-09T16:24:45-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45293&p=276850#p276850

Code: Select all | Expand

#include "FiveWin.ch"

// this is a comment

function Test()

return nil

class
   DATA  one
   DATA  two
   METHOD New()
ENDCLASS

class
endclass

if

else

endif

while .T.
end
]]>

Code: Select all | Expand

#include "FiveWin.ch"

// this is a comment

function Test()

return nil

class
   DATA  one
   DATA  two
   METHOD New()
ENDCLASS

class
endclass

if

else

endif

while .T.
end
]]>
<![CDATA[Utilities / Utilidades :: These forums backup database / Backup de estos foros :: Author Antonio Linares]]> 2025-01-10T01:43:55-07:00 2025-01-10T01:43:55-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45295&p=276856#p276856
You can also find all the posts in a DBF that you can easy browse using samples/fivedbu.prg or doing XBrowser( "forums.dbf" )

Aqui teneis un backup completo de estos foros antes de que los migrásemos a la nueva versión 3.3.14

También teneis una DBF para que podais facilmente hojearla usando samples/fivedbu.prg ó haciendo XBrowser( "forums.dbf" )

https://huggingface.co/datasets/fivetec ... /tree/main]]>

You can also find all the posts in a DBF that you can easy browse using samples/fivedbu.prg or doing XBrowser( "forums.dbf" )

Aqui teneis un backup completo de estos foros antes de que los migrásemos a la nueva versión 3.3.14

También teneis una DBF para que podais facilmente hojearla usando samples/fivedbu.prg ó haciendo XBrowser( "forums.dbf" )

https://huggingface.co/datasets/fivetec ... /tree/main]]>
<![CDATA[Utilities / Utilidades :: Re: These forums backup database / Backup de estos foros :: Reply by Antonio Linares]]> 2025-01-10T06:39:16-07:00 2025-01-10T06:39:16-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45295&p=276857#p276857 lista de las tablas en la base de datos junto con una breve explicación de cada una
phpbb_acl_groups: Almacena las relaciones entre grupos de usuarios y sus permisos de acceso a diferentes recursos del foro.

phpbb_acl_options: Contiene las opciones de permisos que pueden ser asignadas a los grupos y usuarios.

phpbb_acl_roles: Define los roles que pueden ser asignados a los grupos de usuarios, facilitando la gestión de permisos.

phpbb_acl_roles_data: Almacena los datos relacionados con los roles asignados a los grupos de usuarios.

phpbb_acl_users: Almacena las relaciones entre usuarios individuales y sus permisos de acceso.

phpbb_attachments: Contiene información sobre los archivos adjuntos a los mensajes del foro.

phpbb_banlist: Almacena la lista de usuarios, direcciones IP y correos electrónicos que están prohibidos de acceder al foro.

phpbb_bbcodes: Define los códigos BB (BBCode) que los usuarios pueden utilizar para dar formato a sus mensajes.

phpbb_bookmarks: Almacena los marcadores que los usuarios han creado para acceder rápidamente a temas específicos.

phpbb_bots: Contiene información sobre los bots que acceden al foro, como motores de búsqueda.

phpbb_config: Almacena la configuración general del foro, incluyendo parámetros de funcionamiento y opciones de personalización.

phpbb_confirm: Utilizada para gestionar los códigos de confirmación enviados a los usuarios, como parte del proceso de registro.

phpbb_disallow: Almacena las palabras o nombres de usuario que están prohibidos en el foro.

phpbb_drafts: Almacena los borradores de mensajes que los usuarios han creado pero no han enviado.

phpbb_extension_groups: Define los grupos de extensiones que pueden ser utilizadas en el foro.

phpbb_extensions: Almacena información sobre las extensiones instaladas en el foro.

phpbb_forums: Contiene la estructura de los foros, incluyendo información sobre cada foro, como nombre, descripción y configuración.

phpbb_forums_access: Almacena las relaciones de acceso a los foros para grupos de usuarios específicos.

phpbb_forums_track: Utilizada para rastrear los foros que los usuarios han visitado.

phpbb_forums_watch: Almacena información sobre los foros que los usuarios han decidido seguir para recibir notificaciones.

phpbb_groups: Contiene información sobre los grupos de usuarios, incluyendo su nombre y descripción.

phpbb_icons: Almacena los iconos utilizados en los temas y mensajes del foro.

phpbb_lang: Contiene las traducciones y textos utilizados en el foro, permitiendo la internacionalización.

phpbb_log: Almacena registros de eventos importantes en el foro, como acciones de moderación y errores.

phpbb_moderator_cache: Almacena información en caché sobre los moderadores de los foros para mejorar el rendimiento.

phpbb_modules: Define los módulos disponibles en el sistema, como módulos de administración y de usuario.

phpbb_poll_options: Almacena las opciones de las encuestas creadas por los usuarios.

phpbb_poll_votes: Registra los votos emitidos por los usuarios en las encuestas.

phpbb_posts: Contiene los mensajes publicados en el foro, incluyendo información como el autor, contenido y fecha.

phpbb_privmsgs: Almacena los mensajes privados enviados entre usuarios.

phpbb_privmsgs_folder: Almacena las carpetas de mensajes privados para organizar los mensajes de los usuarios.

phpbb_privmsgs_rules: Define las reglas para la gestión de mensajes privados.

phpbb_privmsgs_to: Almacena información sobre los destinatarios de los mensajes privados.

phpbb_profile_fields: Define _ de perfil personalizados que los usuarios pueden completar.

phpbb_profile_fields_data: Almacena los datos ingresados por los usuarios en _ de perfil personalizados.

phpbb_profile_fields_lang: Contiene las traducciones para _ de perfil personalizados.

phpbb_profile_lang: Almacena la información de idioma asociada a los perfiles de usuario.

phpbb_ranks: Define los rangos que pueden ser asignados a los usuarios según su actividad en el foro.

phpbb_reports: Almacena los informes de contenido inapropiado realizados por los usuarios.

phpbb_reports_reasons: Define las razones por las cuales los usuarios pueden reportar contenido.

phpbb_search_results: Almacena los resultados de las búsquedas realizadas por los usuarios en el foro.

phpbb_search_wordlist: Contiene una lista de palabras que se utilizan para mejorar la búsqueda en el foro.

phpbb_search_wordmatch: Almacena las coincidencias de palabras encontradas en los mensajes durante las búsquedas.

phpbb_sessions: Almacena información sobre las sesiones de los usuarios que están conectados al foro.

phpbb_sessions_keys: Almacena las claves de sesión para la gestión de las sesiones de usuario.

phpbb_sitelist: Contiene una lista de sitios permitidos o excluidos para el acceso al foro.

phpbb_smilies: Almacena los emoticonos que los usuarios pueden utilizar en sus mensajes.

phpbb_styles: Define los estilos visuales disponibles para el foro.

phpbb_styles_imageset: Almacena los conjuntos de imágenes utilizados por los estilos del foro.

phpbb_styles_imageset_data: Contiene datos específicos sobre las imágenes de los conjuntos de estilos.

phpbb_styles_template: Almacena las plantillas utilizadas por los estilos del foro.

phpbb_styles_template_data: Contiene datos específicos sobre las plantillas de los estilos.

phpbb_styles_theme: Define los temas visuales que pueden aplicarse a los estilos del foro.

phpbb_tapatalk_push_data: Almacena datos relacionados con las notificaciones push de la aplicación Tapatalk.

phpbb_tapatalk_users: Contiene información sobre los usuarios que utilizan Tapatalk para acceder al foro.

phpbb_topics: Almacena información sobre los temas creados en el foro, incluyendo título, autor y fecha de creación.

phpbb_topics_posted: Almacena información sobre los temas que los usuarios han publicado.

phpbb_topics_track: Utilizada para rastrear los temas que los usuarios han visitado.

phpbb_topics_watch: Almacena información sobre los temas que los usuarios han decidido seguir para recibir notificaciones.

phpbb_user_group: Almacena las relaciones entre usuarios y grupos a los que pertenecen.

phpbb_users: Contiene información sobre los usuarios registrados en el foro.

phpbb_warnings: Almacena advertencias emitidas a los usuarios por comportamiento inapropiado.

phpbb_words: Almacena palabras que pueden ser filtradas o censuradas en el foro.

phpbb_zebra: Almacena información sobre las relaciones de amistad y enemistad entre usuarios.
]]>
lista de las tablas en la base de datos junto con una breve explicación de cada una
phpbb_acl_groups: Almacena las relaciones entre grupos de usuarios y sus permisos de acceso a diferentes recursos del foro.

phpbb_acl_options: Contiene las opciones de permisos que pueden ser asignadas a los grupos y usuarios.

phpbb_acl_roles: Define los roles que pueden ser asignados a los grupos de usuarios, facilitando la gestión de permisos.

phpbb_acl_roles_data: Almacena los datos relacionados con los roles asignados a los grupos de usuarios.

phpbb_acl_users: Almacena las relaciones entre usuarios individuales y sus permisos de acceso.

phpbb_attachments: Contiene información sobre los archivos adjuntos a los mensajes del foro.

phpbb_banlist: Almacena la lista de usuarios, direcciones IP y correos electrónicos que están prohibidos de acceder al foro.

phpbb_bbcodes: Define los códigos BB (BBCode) que los usuarios pueden utilizar para dar formato a sus mensajes.

phpbb_bookmarks: Almacena los marcadores que los usuarios han creado para acceder rápidamente a temas específicos.

phpbb_bots: Contiene información sobre los bots que acceden al foro, como motores de búsqueda.

phpbb_config: Almacena la configuración general del foro, incluyendo parámetros de funcionamiento y opciones de personalización.

phpbb_confirm: Utilizada para gestionar los códigos de confirmación enviados a los usuarios, como parte del proceso de registro.

phpbb_disallow: Almacena las palabras o nombres de usuario que están prohibidos en el foro.

phpbb_drafts: Almacena los borradores de mensajes que los usuarios han creado pero no han enviado.

phpbb_extension_groups: Define los grupos de extensiones que pueden ser utilizadas en el foro.

phpbb_extensions: Almacena información sobre las extensiones instaladas en el foro.

phpbb_forums: Contiene la estructura de los foros, incluyendo información sobre cada foro, como nombre, descripción y configuración.

phpbb_forums_access: Almacena las relaciones de acceso a los foros para grupos de usuarios específicos.

phpbb_forums_track: Utilizada para rastrear los foros que los usuarios han visitado.

phpbb_forums_watch: Almacena información sobre los foros que los usuarios han decidido seguir para recibir notificaciones.

phpbb_groups: Contiene información sobre los grupos de usuarios, incluyendo su nombre y descripción.

phpbb_icons: Almacena los iconos utilizados en los temas y mensajes del foro.

phpbb_lang: Contiene las traducciones y textos utilizados en el foro, permitiendo la internacionalización.

phpbb_log: Almacena registros de eventos importantes en el foro, como acciones de moderación y errores.

phpbb_moderator_cache: Almacena información en caché sobre los moderadores de los foros para mejorar el rendimiento.

phpbb_modules: Define los módulos disponibles en el sistema, como módulos de administración y de usuario.

phpbb_poll_options: Almacena las opciones de las encuestas creadas por los usuarios.

phpbb_poll_votes: Registra los votos emitidos por los usuarios en las encuestas.

phpbb_posts: Contiene los mensajes publicados en el foro, incluyendo información como el autor, contenido y fecha.

phpbb_privmsgs: Almacena los mensajes privados enviados entre usuarios.

phpbb_privmsgs_folder: Almacena las carpetas de mensajes privados para organizar los mensajes de los usuarios.

phpbb_privmsgs_rules: Define las reglas para la gestión de mensajes privados.

phpbb_privmsgs_to: Almacena información sobre los destinatarios de los mensajes privados.

phpbb_profile_fields: Define _ de perfil personalizados que los usuarios pueden completar.

phpbb_profile_fields_data: Almacena los datos ingresados por los usuarios en _ de perfil personalizados.

phpbb_profile_fields_lang: Contiene las traducciones para _ de perfil personalizados.

phpbb_profile_lang: Almacena la información de idioma asociada a los perfiles de usuario.

phpbb_ranks: Define los rangos que pueden ser asignados a los usuarios según su actividad en el foro.

phpbb_reports: Almacena los informes de contenido inapropiado realizados por los usuarios.

phpbb_reports_reasons: Define las razones por las cuales los usuarios pueden reportar contenido.

phpbb_search_results: Almacena los resultados de las búsquedas realizadas por los usuarios en el foro.

phpbb_search_wordlist: Contiene una lista de palabras que se utilizan para mejorar la búsqueda en el foro.

phpbb_search_wordmatch: Almacena las coincidencias de palabras encontradas en los mensajes durante las búsquedas.

phpbb_sessions: Almacena información sobre las sesiones de los usuarios que están conectados al foro.

phpbb_sessions_keys: Almacena las claves de sesión para la gestión de las sesiones de usuario.

phpbb_sitelist: Contiene una lista de sitios permitidos o excluidos para el acceso al foro.

phpbb_smilies: Almacena los emoticonos que los usuarios pueden utilizar en sus mensajes.

phpbb_styles: Define los estilos visuales disponibles para el foro.

phpbb_styles_imageset: Almacena los conjuntos de imágenes utilizados por los estilos del foro.

phpbb_styles_imageset_data: Contiene datos específicos sobre las imágenes de los conjuntos de estilos.

phpbb_styles_template: Almacena las plantillas utilizadas por los estilos del foro.

phpbb_styles_template_data: Contiene datos específicos sobre las plantillas de los estilos.

phpbb_styles_theme: Define los temas visuales que pueden aplicarse a los estilos del foro.

phpbb_tapatalk_push_data: Almacena datos relacionados con las notificaciones push de la aplicación Tapatalk.

phpbb_tapatalk_users: Contiene información sobre los usuarios que utilizan Tapatalk para acceder al foro.

phpbb_topics: Almacena información sobre los temas creados en el foro, incluyendo título, autor y fecha de creación.

phpbb_topics_posted: Almacena información sobre los temas que los usuarios han publicado.

phpbb_topics_track: Utilizada para rastrear los temas que los usuarios han visitado.

phpbb_topics_watch: Almacena información sobre los temas que los usuarios han decidido seguir para recibir notificaciones.

phpbb_user_group: Almacena las relaciones entre usuarios y grupos a los que pertenecen.

phpbb_users: Contiene información sobre los usuarios registrados en el foro.

phpbb_warnings: Almacena advertencias emitidas a los usuarios por comportamiento inapropiado.

phpbb_words: Almacena palabras que pueden ser filtradas o censuradas en el foro.

phpbb_zebra: Almacena información sobre las relaciones de amistad y enemistad entre usuarios.
]]>
<![CDATA[Utilities / Utilidades :: Re: These forums backup database / Backup de estos foros :: Reply by Antonio Linares]]> 2025-01-10T06:41:08-07:00 2025-01-10T06:41:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45295&p=276858#p276858 resumen de las relaciones parent-child (padre-hijo) que se utilizan en las tablas de la base de datos:
phpbb_acl_groups:
Relación con phpbb_acl_roles y phpbb_acl_users para definir permisos y roles asignados a grupos de usuarios.

phpbb_acl_roles:
Relación con phpbb_acl_roles_data para almacenar los datos asociados a los roles.

phpbb_acl_users:
Relación con phpbb_acl_options para definir los permisos específicos de cada usuario.

phpbb_attachments:
Relación con phpbb_posts para asociar archivos adjuntos a mensajes específicos.

phpbb_banlist:
Relación con phpbb_users para prohibir el acceso a usuarios específicos.

phpbb_bookmarks:
Relación con phpbb_users y phpbb_topics para almacenar los marcadores de los usuarios en temas específicos.

phpbb_drafts:
Relación con phpbb_users y phpbb_posts para almacenar borradores de mensajes.

phpbb_forums:
Relación con phpbb_forums_access y phpbb_forums_watch para definir el acceso y seguimiento de foros por parte de los usuarios.

phpbb_groups:
Relación con phpbb_users a través de phpbb_user_group para definir la membresía de los usuarios en grupos.

phpbb_posts:
Relación con phpbb_topics para asociar mensajes a temas específicos.
Relación con phpbb_users para identificar al autor del mensaje.

phpbb_privmsgs:
Relación con phpbb_users a través de phpbb_privmsgs_to para identificar los destinatarios de los mensajes privados.

phpbb_profile_fields:
Relación con phpbb_profile_fields_data para almacenar los datos ingresados por los usuarios en _ de perfil personalizados.

phpbb_reports:
Relación con phpbb_posts y phpbb_users para asociar informes a mensajes y a los usuarios que los reportan.

phpbb_topics:
Relación con phpbb_forums para asociar temas a foros específicos.
Relación con phpbb_posts para almacenar los mensajes dentro de un tema.

phpbb_user_group:
Relación con phpbb_users y phpbb_groups para definir la pertenencia de los usuarios a grupos.

phpbb_warnings:
Relación con phpbb_users para asociar advertencias a usuarios específicos.

phpbb_zebra:
Relación con phpbb_users para definir relaciones de amistad y enemistad entre usuarios.
]]>
resumen de las relaciones parent-child (padre-hijo) que se utilizan en las tablas de la base de datos:
phpbb_acl_groups:
Relación con phpbb_acl_roles y phpbb_acl_users para definir permisos y roles asignados a grupos de usuarios.

phpbb_acl_roles:
Relación con phpbb_acl_roles_data para almacenar los datos asociados a los roles.

phpbb_acl_users:
Relación con phpbb_acl_options para definir los permisos específicos de cada usuario.

phpbb_attachments:
Relación con phpbb_posts para asociar archivos adjuntos a mensajes específicos.

phpbb_banlist:
Relación con phpbb_users para prohibir el acceso a usuarios específicos.

phpbb_bookmarks:
Relación con phpbb_users y phpbb_topics para almacenar los marcadores de los usuarios en temas específicos.

phpbb_drafts:
Relación con phpbb_users y phpbb_posts para almacenar borradores de mensajes.

phpbb_forums:
Relación con phpbb_forums_access y phpbb_forums_watch para definir el acceso y seguimiento de foros por parte de los usuarios.

phpbb_groups:
Relación con phpbb_users a través de phpbb_user_group para definir la membresía de los usuarios en grupos.

phpbb_posts:
Relación con phpbb_topics para asociar mensajes a temas específicos.
Relación con phpbb_users para identificar al autor del mensaje.

phpbb_privmsgs:
Relación con phpbb_users a través de phpbb_privmsgs_to para identificar los destinatarios de los mensajes privados.

phpbb_profile_fields:
Relación con phpbb_profile_fields_data para almacenar los datos ingresados por los usuarios en _ de perfil personalizados.

phpbb_reports:
Relación con phpbb_posts y phpbb_users para asociar informes a mensajes y a los usuarios que los reportan.

phpbb_topics:
Relación con phpbb_forums para asociar temas a foros específicos.
Relación con phpbb_posts para almacenar los mensajes dentro de un tema.

phpbb_user_group:
Relación con phpbb_users y phpbb_groups para definir la pertenencia de los usuarios a grupos.

phpbb_warnings:
Relación con phpbb_users para asociar advertencias a usuarios específicos.

phpbb_zebra:
Relación con phpbb_users para definir relaciones de amistad y enemistad entre usuarios.
]]>
<![CDATA[Utilities / Utilidades :: Re: These forums backup database / Backup de estos foros :: Reply by Antonio Linares]]> 2025-01-10T06:52:28-07:00 2025-01-10T06:52:28-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45295&p=276859#p276859 lista de las tablas junto con sus campos y el equivalente en formato DBF
1. phpbb_acl_groups
group_id (mediumint)
group_name (varchar)
group_desc (text)

DBF Equivalent:
group_id N(5)
group_name C(100)
group_desc C(255)

2. phpbb_acl_options
option_id (mediumint)
option_name (varchar)
option_value (varchar)

DBF Equivalent:
option_id N(5)
option_name C(100)
option_value C(100)

3. phpbb_acl_roles
role_id (mediumint)
role_name (varchar)
role_description (text)

DBF Equivalent:
role_id N(5)
role_name C(100)
role_description C(255)

4. phpbb_acl_roles_data
role_id (mediumint)
group_id (mediumint)
auth_option_id (mediumint)

DBF Equivalent:
role_id N(5)
group_id N(5)
auth_option_id N(5)

5. phpbb_acl_users
user_id (mediumint)
auth_option_id (mediumint)

DBF Equivalent:
user_id N(5)
auth_option_id N(5)

6. phpbb_attachments
attach_id (mediumint)
post_id (mediumint)
user_id (mediumint)

DBF Equivalent:
attach_id N(5)
post_id N(5)
user_id N(5)

7. phpbb_banlist
ban_id (mediumint)
ban_userid (mediumint)
ban_ip (varchar)

DBF Equivalent:
ban_id N(5)
ban_userid N(5)
ban_ip C(15)

8. phpbb_bbcodes
bbcode_id (tinyint)
bbcode_tag (varchar)
bbcode_helpline (varchar)

DBF Equivalent:
bbcode_id N(3)
bbcode_tag C(20)
bbcode_helpline C(255)

9. phpbb_bookmarks
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

10. phpbb_bots
bot_id (mediumint)
bot_name (varchar)
bot_agent (varchar)

DBF Equivalent:
bot_id N(5)
bot_name C(100)
bot_agent C(255)

11. phpbb_config
config_name (varchar)
config_value (varchar)

DBF Equivalent:
config_name C(100)
config_value C(255)

12. phpbb_confirm
confirm_id (mediumint)
user_id (mediumint)
code (varchar)

DBF Equivalent:
confirm_id N(5)
user_id N(5)
code C(50)

13. phpbb_disallow
disallow_id (mediumint)
disallow_username (varchar)

DBF Equivalent:
disallow_id N(5)
disallow_username C(100)

14. phpbb_drafts
draft_id (mediumint)
user_id (mediumint)
topic_id (mediumint)

DBF Equivalent:
draft_id N(5)
user_id N(5)
topic_id N(5)

15. phpbb_extension_groups
group_id (mediumint)
group_name (varchar)

DBF Equivalent:
group_id N(5)
group_name C(100)

16. phpbb_extensions
ext_id (mediumint)
ext_name (varchar)

DBF Equivalent:
ext_id N(5)
ext_name C(100)

17. phpbb_forums
forum_id (mediumint)
forum_name (varchar)
forum_desc (text)

DBF Equivalent:
forum_id N(5)
forum_name C(100)
forum_desc C(255)

18. phpbb_forums_access
forum_id (mediumint)
group_id (mediumint)

DBF Equivalent:
forum_id N(5)
group_id N(5)

19. phpbb_forums_track
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

20. phpbb_forums_watch
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

21. phpbb_groups
group_id (mediumint)
group_name (varchar)

DBF Equivalent:
group_id N(5)
group_name C(100)

22. phpbb_icons
icon_id (mediumint)
icon_url (varchar)

DBF Equivalent:
icon_id N(5)
icon_url C(255)

23. phpbb_lang
lang_id (mediumint)
lang_iso (varchar)

DBF Equivalent:
lang_id N(5)
lang_iso C(10)

24. phpbb_log
log_id (mediumint)
log_time (int)
log_type (varchar)

DBF Equivalent:
log_id N(5)
log_time N(10)
log_type C(50)

25. phpbb_moderator_cache
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

26. phpbb_modules
module_id (mediumint)
module_name (varchar)

DBF Equivalent:
module_id N(5)
module_name C(100)

27. phpbb_poll_options
poll_id (mediumint)
option_id (tinyint)
option_text (varchar)

DBF Equivalent:
poll_id N(5)
option_id N(3)
option_text C(255)

28. phpbb_poll_votes
poll_id (mediumint)
user_id (mediumint)
vote_option_id (tinyint)

DBF Equivalent:
poll_id N(5)
user_id N(5)
vote_option_id N(3)

29. phpbb_posts
post_id (mediumint)
topic_id (mediumint)
forum_id (mediumint)

DBF Equivalent:
post_id N(5)
topic_id N(5)
forum_id N(5)

30. phpbb_privmsgs
privmsg_id (mediumint)
user_id_from (mediumint)
user_id_to (mediumint)

DBF Equivalent:
privmsg_id N(5)
user_id_from N(5)
user_id_to N(5)

31. phpbb_privmsgs_folder
folder_id (mediumint)
user_id (mediumint)

DBF Equivalent:
folder_id N(5)
user_id N(5)

32. phpbb_privmsgs_rules
rule_id (mediumint)
user_id (mediumint)

DBF Equivalent:
rule_id N(5)
user_id N(5)

33. phpbb_privmsgs_to
privmsg_id (mediumint)
user_id (mediumint)

DBF Equivalent:
privmsg_id N(5)
user_id N(5)

34. phpbb_profile_fields
field_id (mediumint)
field_name (varchar)

DBF Equivalent:
field_id N(5)
field_name C(100)

35. phpbb_profile_fields_data
user_id (mediumint)
field_id (mediumint)
field_value (varchar)

DBF Equivalent:
user_id N(5)
field_id N(5)
field_value C(255)

36. phpbb_profile_fields_lang
field_id (mediumint)
lang_id (mediumint)
lang_value (varchar)

DBF Equivalent:
field_id N(5)
lang_id N(5)
lang_value C(255)

37. phpbb_profile_lang
user_id (mediumint)
lang_id (mediumint)

DBF Equivalent:
user_id N(5)
lang_id N(5)

38. phpbb_ranks
rank_id (mediumint)
rank_title (varchar)

DBF Equivalent:
rank_id N(5)
rank_title C(100)

39. phpbb_reports
report_id (mediumint)
post_id (mediumint)
user_id (mediumint)

DBF Equivalent:
report_id N(5)
post_id N(5)
user_id N(5)

40. phpbb_reports_reasons
reason_id (mediumint)
reason_text (varchar)

DBF Equivalent:
reason_id N(5)
reason_text C(255)

41. phpbb_search_results
search_id (mediumint)
topic_id (mediumint)

DBF Equivalent:
search_id N(5)
topic_id N(5)

42. phpbb_search_wordlist
word_id (mediumint)
word_text (varchar)

DBF Equivalent:
word_id N(5)
word_text C(100)

43. phpbb_search_wordmatch
word_id (mediumint)
post_id (mediumint)

DBF Equivalent:
word_id N(5)
post_id N(5)

44. phpbb_sessions
session_id (varchar)
user_id (mediumint)

DBF Equivalent:
session_id C(32)
user_id N(5)

45. phpbb_sessions_keys
key_id (varchar)
user_id (mediumint)

DBF Equivalent:
key_id C(32)
user_id N(5)

46. phpbb_sitelist
site_id (mediumint)
site_ip (varchar)

DBF Equivalent:
site_id N(5)
site_ip C(15)

47. phpbb_smilies
smiley_id (mediumint)
code (varchar)

DBF Equivalent:
smiley_id N(5)
code C(10)

48. phpbb_styles
style_id (mediumint)
style_name (varchar)

DBF Equivalent:
style_id N(5)
style_name C(100)

49. phpbb_styles_imageset
imageset_id (mediumint)
imageset_name (varchar)

DBF Equivalent:
imageset_id N(5)
imageset_name C(100)

50. phpbb_styles_imageset_data
imageset_id (mediumint)
image_name (varchar)

DBF Equivalent:
imageset_id N(5)
image_name C(100)

51. phpbb_styles_template
template_id (mediumint)
template_name (varchar)

DBF Equivalent:
template_id N(5)
template_name C(100)

52. phpbb_styles_template_data
template_id (mediumint)
template_data (text)

DBF Equivalent:
template_id N(5)
template_data C(255)

53. phpbb_styles_theme
theme_id (mediumint)
theme_name (varchar)

DBF Equivalent:
theme_id N(5)
theme_name C(100)

54. phpbb_tapatalk_push_data
push_id (mediumint)
user_id (mediumint)

DBF Equivalent:
push_id N(5)
user_id N(5)

55. phpbb_tapatalk_users
userid (mediumint)
announcement (int)

DBF Equivalent:
userid N(5)
announcement N(5)

56. phpbb_topics
topic_id (mediumint)
forum_id (mediumint)
topic_title (varchar)

DBF Equivalent:
topic_id N(5)
forum_id N(5)
topic_title C(255)

57. phpbb_topics_posted
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

58. phpbb_topics_track
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

59. phpbb_topics_watch
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

60. phpbb_user_group
user_id (mediumint)
group_id (mediumint)

DBF Equivalent:
user_id N(5)
group_id N(5)

61. phpbb_users
user_id (mediumint)
username (varchar)

DBF Equivalent:
user_id N(5)
username C(100)

62. phpbb_warnings
warning_id (mediumint)
user_id (mediumint)

DBF Equivalent:
warning_id N(5)
user_id N(5)

63. phpbb_words
word_id (mediumint)
word_text (varchar)

DBF Equivalent:
word_id N(5)
word_text C(100)

64. phpbb_zebra
user_id (mediumint)
friend (tinyint)

DBF Equivalent:
user_id N(5)
friend N(1)
]]>
lista de las tablas junto con sus campos y el equivalente en formato DBF
1. phpbb_acl_groups
group_id (mediumint)
group_name (varchar)
group_desc (text)

DBF Equivalent:
group_id N(5)
group_name C(100)
group_desc C(255)

2. phpbb_acl_options
option_id (mediumint)
option_name (varchar)
option_value (varchar)

DBF Equivalent:
option_id N(5)
option_name C(100)
option_value C(100)

3. phpbb_acl_roles
role_id (mediumint)
role_name (varchar)
role_description (text)

DBF Equivalent:
role_id N(5)
role_name C(100)
role_description C(255)

4. phpbb_acl_roles_data
role_id (mediumint)
group_id (mediumint)
auth_option_id (mediumint)

DBF Equivalent:
role_id N(5)
group_id N(5)
auth_option_id N(5)

5. phpbb_acl_users
user_id (mediumint)
auth_option_id (mediumint)

DBF Equivalent:
user_id N(5)
auth_option_id N(5)

6. phpbb_attachments
attach_id (mediumint)
post_id (mediumint)
user_id (mediumint)

DBF Equivalent:
attach_id N(5)
post_id N(5)
user_id N(5)

7. phpbb_banlist
ban_id (mediumint)
ban_userid (mediumint)
ban_ip (varchar)

DBF Equivalent:
ban_id N(5)
ban_userid N(5)
ban_ip C(15)

8. phpbb_bbcodes
bbcode_id (tinyint)
bbcode_tag (varchar)
bbcode_helpline (varchar)

DBF Equivalent:
bbcode_id N(3)
bbcode_tag C(20)
bbcode_helpline C(255)

9. phpbb_bookmarks
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

10. phpbb_bots
bot_id (mediumint)
bot_name (varchar)
bot_agent (varchar)

DBF Equivalent:
bot_id N(5)
bot_name C(100)
bot_agent C(255)

11. phpbb_config
config_name (varchar)
config_value (varchar)

DBF Equivalent:
config_name C(100)
config_value C(255)

12. phpbb_confirm
confirm_id (mediumint)
user_id (mediumint)
code (varchar)

DBF Equivalent:
confirm_id N(5)
user_id N(5)
code C(50)

13. phpbb_disallow
disallow_id (mediumint)
disallow_username (varchar)

DBF Equivalent:
disallow_id N(5)
disallow_username C(100)

14. phpbb_drafts
draft_id (mediumint)
user_id (mediumint)
topic_id (mediumint)

DBF Equivalent:
draft_id N(5)
user_id N(5)
topic_id N(5)

15. phpbb_extension_groups
group_id (mediumint)
group_name (varchar)

DBF Equivalent:
group_id N(5)
group_name C(100)

16. phpbb_extensions
ext_id (mediumint)
ext_name (varchar)

DBF Equivalent:
ext_id N(5)
ext_name C(100)

17. phpbb_forums
forum_id (mediumint)
forum_name (varchar)
forum_desc (text)

DBF Equivalent:
forum_id N(5)
forum_name C(100)
forum_desc C(255)

18. phpbb_forums_access
forum_id (mediumint)
group_id (mediumint)

DBF Equivalent:
forum_id N(5)
group_id N(5)

19. phpbb_forums_track
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

20. phpbb_forums_watch
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

21. phpbb_groups
group_id (mediumint)
group_name (varchar)

DBF Equivalent:
group_id N(5)
group_name C(100)

22. phpbb_icons
icon_id (mediumint)
icon_url (varchar)

DBF Equivalent:
icon_id N(5)
icon_url C(255)

23. phpbb_lang
lang_id (mediumint)
lang_iso (varchar)

DBF Equivalent:
lang_id N(5)
lang_iso C(10)

24. phpbb_log
log_id (mediumint)
log_time (int)
log_type (varchar)

DBF Equivalent:
log_id N(5)
log_time N(10)
log_type C(50)

25. phpbb_moderator_cache
forum_id (mediumint)
user_id (mediumint)

DBF Equivalent:
forum_id N(5)
user_id N(5)

26. phpbb_modules
module_id (mediumint)
module_name (varchar)

DBF Equivalent:
module_id N(5)
module_name C(100)

27. phpbb_poll_options
poll_id (mediumint)
option_id (tinyint)
option_text (varchar)

DBF Equivalent:
poll_id N(5)
option_id N(3)
option_text C(255)

28. phpbb_poll_votes
poll_id (mediumint)
user_id (mediumint)
vote_option_id (tinyint)

DBF Equivalent:
poll_id N(5)
user_id N(5)
vote_option_id N(3)

29. phpbb_posts
post_id (mediumint)
topic_id (mediumint)
forum_id (mediumint)

DBF Equivalent:
post_id N(5)
topic_id N(5)
forum_id N(5)

30. phpbb_privmsgs
privmsg_id (mediumint)
user_id_from (mediumint)
user_id_to (mediumint)

DBF Equivalent:
privmsg_id N(5)
user_id_from N(5)
user_id_to N(5)

31. phpbb_privmsgs_folder
folder_id (mediumint)
user_id (mediumint)

DBF Equivalent:
folder_id N(5)
user_id N(5)

32. phpbb_privmsgs_rules
rule_id (mediumint)
user_id (mediumint)

DBF Equivalent:
rule_id N(5)
user_id N(5)

33. phpbb_privmsgs_to
privmsg_id (mediumint)
user_id (mediumint)

DBF Equivalent:
privmsg_id N(5)
user_id N(5)

34. phpbb_profile_fields
field_id (mediumint)
field_name (varchar)

DBF Equivalent:
field_id N(5)
field_name C(100)

35. phpbb_profile_fields_data
user_id (mediumint)
field_id (mediumint)
field_value (varchar)

DBF Equivalent:
user_id N(5)
field_id N(5)
field_value C(255)

36. phpbb_profile_fields_lang
field_id (mediumint)
lang_id (mediumint)
lang_value (varchar)

DBF Equivalent:
field_id N(5)
lang_id N(5)
lang_value C(255)

37. phpbb_profile_lang
user_id (mediumint)
lang_id (mediumint)

DBF Equivalent:
user_id N(5)
lang_id N(5)

38. phpbb_ranks
rank_id (mediumint)
rank_title (varchar)

DBF Equivalent:
rank_id N(5)
rank_title C(100)

39. phpbb_reports
report_id (mediumint)
post_id (mediumint)
user_id (mediumint)

DBF Equivalent:
report_id N(5)
post_id N(5)
user_id N(5)

40. phpbb_reports_reasons
reason_id (mediumint)
reason_text (varchar)

DBF Equivalent:
reason_id N(5)
reason_text C(255)

41. phpbb_search_results
search_id (mediumint)
topic_id (mediumint)

DBF Equivalent:
search_id N(5)
topic_id N(5)

42. phpbb_search_wordlist
word_id (mediumint)
word_text (varchar)

DBF Equivalent:
word_id N(5)
word_text C(100)

43. phpbb_search_wordmatch
word_id (mediumint)
post_id (mediumint)

DBF Equivalent:
word_id N(5)
post_id N(5)

44. phpbb_sessions
session_id (varchar)
user_id (mediumint)

DBF Equivalent:
session_id C(32)
user_id N(5)

45. phpbb_sessions_keys
key_id (varchar)
user_id (mediumint)

DBF Equivalent:
key_id C(32)
user_id N(5)

46. phpbb_sitelist
site_id (mediumint)
site_ip (varchar)

DBF Equivalent:
site_id N(5)
site_ip C(15)

47. phpbb_smilies
smiley_id (mediumint)
code (varchar)

DBF Equivalent:
smiley_id N(5)
code C(10)

48. phpbb_styles
style_id (mediumint)
style_name (varchar)

DBF Equivalent:
style_id N(5)
style_name C(100)

49. phpbb_styles_imageset
imageset_id (mediumint)
imageset_name (varchar)

DBF Equivalent:
imageset_id N(5)
imageset_name C(100)

50. phpbb_styles_imageset_data
imageset_id (mediumint)
image_name (varchar)

DBF Equivalent:
imageset_id N(5)
image_name C(100)

51. phpbb_styles_template
template_id (mediumint)
template_name (varchar)

DBF Equivalent:
template_id N(5)
template_name C(100)

52. phpbb_styles_template_data
template_id (mediumint)
template_data (text)

DBF Equivalent:
template_id N(5)
template_data C(255)

53. phpbb_styles_theme
theme_id (mediumint)
theme_name (varchar)

DBF Equivalent:
theme_id N(5)
theme_name C(100)

54. phpbb_tapatalk_push_data
push_id (mediumint)
user_id (mediumint)

DBF Equivalent:
push_id N(5)
user_id N(5)

55. phpbb_tapatalk_users
userid (mediumint)
announcement (int)

DBF Equivalent:
userid N(5)
announcement N(5)

56. phpbb_topics
topic_id (mediumint)
forum_id (mediumint)
topic_title (varchar)

DBF Equivalent:
topic_id N(5)
forum_id N(5)
topic_title C(255)

57. phpbb_topics_posted
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

58. phpbb_topics_track
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

59. phpbb_topics_watch
topic_id (mediumint)
user_id (mediumint)

DBF Equivalent:
topic_id N(5)
user_id N(5)

60. phpbb_user_group
user_id (mediumint)
group_id (mediumint)

DBF Equivalent:
user_id N(5)
group_id N(5)

61. phpbb_users
user_id (mediumint)
username (varchar)

DBF Equivalent:
user_id N(5)
username C(100)

62. phpbb_warnings
warning_id (mediumint)
user_id (mediumint)

DBF Equivalent:
warning_id N(5)
user_id N(5)

63. phpbb_words
word_id (mediumint)
word_text (varchar)

DBF Equivalent:
word_id N(5)
word_text C(100)

64. phpbb_zebra
user_id (mediumint)
friend (tinyint)

DBF Equivalent:
user_id N(5)
friend N(1)
]]>
<![CDATA[Utilities / Utilidades :: Active Topics option is working !!! :: Author Antonio Linares]]> 2025-01-21T05:51:08-07:00 2025-01-21T05:51:08-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277092#p277092
Working fine:
https://forums.fivetechsupport.com/sear ... ive_topics]]>

Working fine:
https://forums.fivetechsupport.com/sear ... ive_topics]]>
<![CDATA[Utilities / Utilidades :: Re: Active Topics option is working !!! :: Reply by Antonio Linares]]> 2025-01-21T06:02:30-07:00 2025-01-21T06:02:30-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277093#p277093
Esta es la mejor manera de comprobar de que se está hablando en estos foros:

Image]]>

Esta es la mejor manera de comprobar de que se está hablando en estos foros:

Image]]>
<![CDATA[Utilities / Utilidades :: Re: Active Topics option is working !!! :: Reply by Antonio Linares]]> 2025-01-21T06:14:09-07:00 2025-01-21T06:14:09-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277095#p277095
También los cookies se han arreglado, por lo que ahora no deberiais ser logeados fuera de los foros. Por favor observad esto y comentar.]]>

También los cookies se han arreglado, por lo que ahora no deberiais ser logeados fuera de los foros. Por favor observad esto y comentar.]]>
<![CDATA[Utilities / Utilidades :: Re: Active Topics option is working !!! :: Reply by hua]]> 2025-01-21T21:03:15-07:00 2025-01-21T21:03:15-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277109#p277109 I don't know if anyone is still using RSS to monitor forum's posts]]> I don't know if anyone is still using RSS to monitor forum's posts]]> <![CDATA[Utilities / Utilidades :: Re: Active Topics option is working !!! :: Reply by Antonio Linares]]> 2025-01-22T03:22:53-07:00 2025-01-22T03:22:53-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277114#p277114
Already implemented! :)
Image]]>

Already implemented! :)
Image]]>
<![CDATA[Utilities / Utilidades :: Re: Active Topics option is working !!! :: Reply by hua]]> 2025-01-23T21:16:20-07:00 2025-01-23T21:16:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=17&t=45332&p=277172#p277172 <![CDATA[Off Topic / Otros temas :: Re: VERIFACTU, criterios, dudas 28/12/2024 :: Reply by FiveWiDi]]> 2024-12-28T02:43:49-07:00 2024-12-28T02:43:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45082&p=276678#p276678
A ver...

1-. He enviado un registro a Verifactu, lo accepta con 'Correcto'.
2-. En la oficina se detecta que el importe de la factura es erróneo (un error al teclear la cantidad).
3-. Se CORRIGE la factura (hoy en día se puede hacer, no se ha entregado al cliente, no ha salido de la oficina).
4-. Se genera la factura, se lee el QR y dice que no existe la factura (el importe que indica el QR ya es el correcto).
5-. Bien, se genera un nuevo registro con los datos correctos y se envía a Verifactu. Verifactu lo rechaza ('Incorrecto') y dice que es un duplicado.
6-. Pués nada, se genera nuevo registro con los mismos datos indicando que es una 'subsanación' con 'registro previo', se envía y Verifactu lo acepta 'Correcto'.
7-. Se vuelve a leer el QR y dice que SI existe la factura.

Entonces....
¿Se pueden modificar facturas sin emitir rectificativas?

Venga, anímense.

¿Que opinan?

O ¿Cómo resolverían Ustedes este caso?]]>

A ver...

1-. He enviado un registro a Verifactu, lo accepta con 'Correcto'.
2-. En la oficina se detecta que el importe de la factura es erróneo (un error al teclear la cantidad).
3-. Se CORRIGE la factura (hoy en día se puede hacer, no se ha entregado al cliente, no ha salido de la oficina).
4-. Se genera la factura, se lee el QR y dice que no existe la factura (el importe que indica el QR ya es el correcto).
5-. Bien, se genera un nuevo registro con los datos correctos y se envía a Verifactu. Verifactu lo rechaza ('Incorrecto') y dice que es un duplicado.
6-. Pués nada, se genera nuevo registro con los mismos datos indicando que es una 'subsanación' con 'registro previo', se envía y Verifactu lo acepta 'Correcto'.
7-. Se vuelve a leer el QR y dice que SI existe la factura.

Entonces....
¿Se pueden modificar facturas sin emitir rectificativas?

Venga, anímense.

¿Que opinan?

O ¿Cómo resolverían Ustedes este caso?]]>
<![CDATA[Off Topic / Otros temas :: Re: VERIFACTU, criterios, dudas 10/11/2024 :: Reply by paquitohm]]> 2024-12-30T03:10:49-07:00 2024-12-30T03:10:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45082&p=276685#p276685
Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Venga, anímense.
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.

Salu2]]>

Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Venga, anímense.
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.

Salu2]]>
<![CDATA[Off Topic / Otros temas :: Re: VERIFACTU, criterios, dudas 10/11/2024 :: Reply by FiveWiDi]]> 2024-12-30T04:26:52-07:00 2024-12-30T04:26:52-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45082&p=276687#p276687
paquitohm wrote:Feliz Navidad,
Cierto!!!! Feliz Navidad !!!
Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Coincido... coincidía. Si Hacienda lo da por válido es que yo no he entendido lo que he leído o que se han explicado mal o nuestros comentarios están contaminados.
Es decir todo el mundo habla de que se envían las facturas a Hacienda, y eso no es cierto (ya se hará con la facturación electrónica), lo que yo entendí es que se envían registros de lo que se **hace** con las facturas.
Es decir yo entiendo que el objetivo no es 'penalizar/limitar' la emisión de facturas, si no fiscalizarlas: haz lo que te de la gana (o casi), pero no me lo ocultes, no me mientas, no defraudes, y de paso automatizaremos procesos declarativos (IVA, 347, etc). De ahí que yo entiendo Verifactu como la publicación a Hacienda de lo que hago con las facturas, y ese punto de vista me permite emitir una corrección de una factura errónea, no es un hecho 'comercial', es un error que no debe tener aparecer en las estadísticas comerciales.

Sólo es una opinión, hoy tenía ganas de escribir.
Venga, anímense.
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.
Bueno, estamos en Navidad, fiesta, turrones, puente, un tema muy concreto que se sale de la programación, en fin muchas coincidencias.

Un abrazo.]]>
paquitohm wrote:Feliz Navidad,
Cierto!!!! Feliz Navidad !!!
Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Coincido... coincidía. Si Hacienda lo da por válido es que yo no he entendido lo que he leído o que se han explicado mal o nuestros comentarios están contaminados.
Es decir todo el mundo habla de que se envían las facturas a Hacienda, y eso no es cierto (ya se hará con la facturación electrónica), lo que yo entendí es que se envían registros de lo que se **hace** con las facturas.
Es decir yo entiendo que el objetivo no es 'penalizar/limitar' la emisión de facturas, si no fiscalizarlas: haz lo que te de la gana (o casi), pero no me lo ocultes, no me mientas, no defraudes, y de paso automatizaremos procesos declarativos (IVA, 347, etc). De ahí que yo entiendo Verifactu como la publicación a Hacienda de lo que hago con las facturas, y ese punto de vista me permite emitir una corrección de una factura errónea, no es un hecho 'comercial', es un error que no debe tener aparecer en las estadísticas comerciales.

Sólo es una opinión, hoy tenía ganas de escribir.
Venga, anímense.
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.
Bueno, estamos en Navidad, fiesta, turrones, puente, un tema muy concreto que se sale de la programación, en fin muchas coincidencias.

Un abrazo.]]>
<![CDATA[Off Topic / Otros temas :: Re: VERIFACTU, criterios, dudas 10/11/2024 :: Reply by paquitohm]]> 2024-12-30T04:42:35-07:00 2024-12-30T04:42:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45082&p=276688#p276688
La intención es fiscalizadora, para eso son el "fisco"
El problema es que esta fiscalización nunca antes había condicionado tanto la forma en que el fiscalizado tenía que actuar al momento de emitir la factura. Sí, era necesario calcular el iva, y el recargo de equivalencia y poner el CIF y ... pero eso se podia hacer de manera que no influyera en la organización de la empresa. Verifactu cambia eso y por mucho que nos cuenten que esto mejorará el dinamismo entre fiscalizado y fiscalizadora no es así sino más bien se "carga" el dinamismo empresarial que ahora deberá pasar por un brete para obtener la medalla de idóneo". Dicho de otra forma, la informática en este caso ha servido para que el usuario tenga más trabajo en vez de menos.

En la antigüedad, en tiempo de romanos, llegaba el publicano, el recaudador de impuestos, casa por casa, con una patrulla a cobrarlos. Ahora es tremendamente facil controlar la recaudación desde la central. Sólo se escapa el gorrilla, que por muchas denuncias que le pongan por invasión de la calzada, al ser insolvente, se va de rositas. La insolvencia es en realidad la auténtica salud.

Salu2]]>

La intención es fiscalizadora, para eso son el "fisco"
El problema es que esta fiscalización nunca antes había condicionado tanto la forma en que el fiscalizado tenía que actuar al momento de emitir la factura. Sí, era necesario calcular el iva, y el recargo de equivalencia y poner el CIF y ... pero eso se podia hacer de manera que no influyera en la organización de la empresa. Verifactu cambia eso y por mucho que nos cuenten que esto mejorará el dinamismo entre fiscalizado y fiscalizadora no es así sino más bien se "carga" el dinamismo empresarial que ahora deberá pasar por un brete para obtener la medalla de idóneo". Dicho de otra forma, la informática en este caso ha servido para que el usuario tenga más trabajo en vez de menos.

En la antigüedad, en tiempo de romanos, llegaba el publicano, el recaudador de impuestos, casa por casa, con una patrulla a cobrarlos. Ahora es tremendamente facil controlar la recaudación desde la central. Sólo se escapa el gorrilla, que por muchas denuncias que le pongan por invasión de la calzada, al ser insolvente, se va de rositas. La insolvencia es en realidad la auténtica salud.

Salu2]]>
<![CDATA[Off Topic / Otros temas :: Re: VERIFACTU, criterios, dudas 09/01/2025 :: Reply by FiveWiDi]]> 2025-01-09T04:29:36-07:00 2025-01-09T04:29:36-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45082&p=276840#p276840
Saben Ustedes si se han modificado las fechas de implantación de Veri*Factu? Y si es así dónde se ha publicado?

Mis últimas noticias es que es el 25/07/2025.

Muchas gracias,]]>

Saben Ustedes si se han modificado las fechas de implantación de Veri*Factu? Y si es así dónde se ha publicado?

Mis últimas noticias es que es el 25/07/2025.

Muchas gracias,]]>
<![CDATA[Off Topic / Otros temas :: Expand CODE :: Author Enrico Maria Giordano]]> 2025-01-07T11:43:43-07:00 2025-01-07T11:43:43-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276806#p276806 <![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Antonio Linares]]> 2025-01-07T12:03:48-07:00 2025-01-07T12:03:48-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276808#p276808
We are still learning the differences between this new pphbb version and the older one :-)

We go carefully not to break it...

This has been a huge upgrade :wink:
05 Jan 2025 06:58 pm Updated Database from version 3.0.4 to version 3.3.14]]>

We are still learning the differences between this new pphbb version and the older one :-)

We go carefully not to break it...

This has been a huge upgrade :wink:
05 Jan 2025 06:58 pm Updated Database from version 3.0.4 to version 3.3.14]]>
<![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Antonio Linares]]> 2025-01-07T12:56:17-07:00 2025-01-07T12:56:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276814#p276814
We have send a post (authorization pending) asking about "Expand code" for 3.3.14 in the official phpbb forums

https://www.phpbb.com/community/index.php

Lets see what they answer...]]>

We have send a post (authorization pending) asking about "Expand code" for 3.3.14 in the official phpbb forums

https://www.phpbb.com/community/index.php

Lets see what they answer...]]>
<![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Antonio Linares]]> 2025-01-07T13:01:27-07:00 2025-01-07T13:01:27-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276815#p276815
https://www.phpbb.com/community/viewtop ... #p16046863

Now lets wait for answers... :)]]>

https://www.phpbb.com/community/viewtop ... #p16046863

Now lets wait for answers... :)]]>
<![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Enrico Maria Giordano]]> 2025-01-07T13:12:40-07:00 2025-01-07T13:12:40-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276816#p276816 ]]> ]]> <![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Antonio Linares]]> 2025-01-09T02:06:35-07:00 2025-01-09T02:06:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276839#p276839

In official phpbb forum a fix was provided but it was not properly working:
https://www.phpbb.com/community/viewtop ... #p16047019

Fortunately we found a way to fix it :)]]>


In official phpbb forum a fix was provided but it was not properly working:
https://www.phpbb.com/community/viewtop ... #p16047019

Fortunately we found a way to fix it :)]]>
<![CDATA[Off Topic / Otros temas :: Re: Expand CODE :: Reply by Enrico Maria Giordano]]> 2025-01-09T08:19:59-07:00 2025-01-09T08:19:59-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45285&p=276846#p276846 ]]> ]]> <![CDATA[Off Topic / Otros temas :: Os funciona la opción "Active topics" en estos foros ? :: Author Antonio Linares]]> 2025-01-16T22:27:17-07:00 2025-01-16T22:27:17-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45316&p=276960#p276960 <![CDATA[Off Topic / Otros temas :: Re: Os funciona la opción "Active topics" en estos foros ? :: Reply by Baxajaun]]> 2025-01-17T06:12:20-07:00 2025-01-17T06:12:20-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45316&p=276962#p276962
Si selcciono Active topics, no aparece nada.

Muchas gracias.

Un abrazo,]]>

Si selcciono Active topics, no aparece nada.

Muchas gracias.

Un abrazo,]]>
<![CDATA[Off Topic / Otros temas :: Check Active Topics :: Author Carles]]> 2025-01-20T05:48:56-07:00 2025-01-20T05:48:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=19&t=45328&p=277069#p277069
Test Active Topics...

C.]]>

Test Active Topics...

C.]]>
<![CDATA[Artificial Intelligence examples :: CLASS Transformer :: Author Antonio Linares]]> 2025-01-11T02:31:31-07:00 2025-01-11T02:31:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=40&t=45296&p=276862#p276862

Code: Select all | Expand

#include "FiveWin.ch"

PROCEDURE Main()

   local transformer, src, tgt, output, loss, d_output
 
   // Crear el Transformer
   transformer := Transformer():New(6, 512, 8)
 
   // Datos de entrada y salida (simulados)
   src := hb_MatrixRandom(10, 512)  // Ejemplo de matriz de entrada
   tgt := hb_MatrixRandom(10, 512)  // Ejemplo de matriz de salida
 
   // Forward pass
   output := transformer:Forward(src, tgt)

   // Cálculo de la pérdida (simplificado)
   loss := hb_MatrixSubstract(output, tgt)
   loss := hb_MatrixSum(hb_MatrixMultiply(loss, hb_MatrixTranspose( loss ) ) )  // Pérdida cuadrática
 
   // Backward pass
   d_output := hb_MatrixSubstract(output, tgt)
   transformer:Backward(d_output)
 
   ? "Pérdida:", loss
 
return

// Clase para la capa de Multi-Head Attention
CLASS MultiHeadAttention
   DATA WQ, WK, WV, WO  // Pesos de la capa
   DATA dWQ, dWK, dWV, dWO  // Gradientes de los pesos
   DATA d_model, n_heads

   METHOD New(d_model, n_heads)
   METHOD ScaledDotProductAttention(Q, K, V)
   METHOD Forward(query, key, value)
   METHOD Backward(d_output, Q, K, V)
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   ::d_model := d_model
   ::n_heads := n_heads

   // Inicialización de pesos (aleatoria)
   ::WQ := hb_MatrixRandom(d_model, d_model)
   ::WK := hb_MatrixRandom(d_model, d_model)
   ::WV := hb_MatrixRandom(d_model, d_model)
   ::WO := hb_MatrixRandom(d_model, d_model)

   // Inicialización de gradientes
   ::dWQ := hb_MatrixZero(d_model, d_model)
   ::dWK := hb_MatrixZero(d_model, d_model)
   ::dWV := hb_MatrixZero(d_model, d_model)
   ::dWO := hb_MatrixZero(d_model, d_model)

   return Self

METHOD ScaledDotProductAttention(Q, K, V) CLASS MultiHeadAttention

   local scores, scaled_scores, attention_weights, output

   // Producto punto escalado
   scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))

   scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))

   // Aplicar softmax
   attention_weights := hb_Softmax(scaled_scores)

   // Atención ponderada
   output := hb_MatrixMultiply(attention_weights, V)
   
return output

METHOD Forward(query, key, value) CLASS MultiHeadAttention

   local Q, K, V, attention_output, output

   // Proyección de los pesos
   Q := hb_MatrixMultiply(query, ::WQ)
   K := hb_MatrixMultiply(key, ::WK)
   V := hb_MatrixMultiply(value, ::WV)

   // Atención escalada
   attention_output := ::ScaledDotProductAttention(Q, K, V)

   // Proyección final
   output := hb_MatrixMultiply(attention_output, ::WO)

return output

METHOD Backward(d_output, Q, K, V) CLASS MultiHeadAttention

   // Gradientes para WO
   ::dWO := hb_MatrixMultiply(hb_MatrixTranspose(Q), d_output)

   // Gradientes para WQ, WK y WV (simplificados)
   ::dWQ := hb_MatrixMultiply(hb_MatrixTranspose(d_output), Q)
   ::dWK := hb_MatrixMultiply(hb_MatrixTranspose(d_output), K)
   ::dWV := hb_MatrixMultiply(hb_MatrixTranspose(d_output), V)

return hb_MatrixZero(::d_model, ::d_model)  // Simplificación para no propagar más

// Clase para el Transformer
CLASS Transformer
   DATA layers
   DATA num_layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer

   local i 

   ::num_layers := num_layers
   ::layers := Array(num_layers)

   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT

return Self

METHOD Forward(src, tgt) CLASS Transformer

   local output, i

   output := src

   FOR i := 1 TO ::num_layers
      output := ::layers[i]:Forward(output, output, output)
   NEXT

return output

METHOD Backward(d_output) CLASS Transformer

   local grad := d_output, i

   FOR i := ::num_layers TO 1 STEP -1
      grad := ::layers[i]:Backward(grad, grad, grad)
   NEXT

return grad

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#include <windows.h>

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>

Code: Select all | Expand

#include "FiveWin.ch"

PROCEDURE Main()

   local transformer, src, tgt, output, loss, d_output
 
   // Crear el Transformer
   transformer := Transformer():New(6, 512, 8)
 
   // Datos de entrada y salida (simulados)
   src := hb_MatrixRandom(10, 512)  // Ejemplo de matriz de entrada
   tgt := hb_MatrixRandom(10, 512)  // Ejemplo de matriz de salida
 
   // Forward pass
   output := transformer:Forward(src, tgt)

   // Cálculo de la pérdida (simplificado)
   loss := hb_MatrixSubstract(output, tgt)
   loss := hb_MatrixSum(hb_MatrixMultiply(loss, hb_MatrixTranspose( loss ) ) )  // Pérdida cuadrática
 
   // Backward pass
   d_output := hb_MatrixSubstract(output, tgt)
   transformer:Backward(d_output)
 
   ? "Pérdida:", loss
 
return

// Clase para la capa de Multi-Head Attention
CLASS MultiHeadAttention
   DATA WQ, WK, WV, WO  // Pesos de la capa
   DATA dWQ, dWK, dWV, dWO  // Gradientes de los pesos
   DATA d_model, n_heads

   METHOD New(d_model, n_heads)
   METHOD ScaledDotProductAttention(Q, K, V)
   METHOD Forward(query, key, value)
   METHOD Backward(d_output, Q, K, V)
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   ::d_model := d_model
   ::n_heads := n_heads

   // Inicialización de pesos (aleatoria)
   ::WQ := hb_MatrixRandom(d_model, d_model)
   ::WK := hb_MatrixRandom(d_model, d_model)
   ::WV := hb_MatrixRandom(d_model, d_model)
   ::WO := hb_MatrixRandom(d_model, d_model)

   // Inicialización de gradientes
   ::dWQ := hb_MatrixZero(d_model, d_model)
   ::dWK := hb_MatrixZero(d_model, d_model)
   ::dWV := hb_MatrixZero(d_model, d_model)
   ::dWO := hb_MatrixZero(d_model, d_model)

   return Self

METHOD ScaledDotProductAttention(Q, K, V) CLASS MultiHeadAttention

   local scores, scaled_scores, attention_weights, output

   // Producto punto escalado
   scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))

   scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))

   // Aplicar softmax
   attention_weights := hb_Softmax(scaled_scores)

   // Atención ponderada
   output := hb_MatrixMultiply(attention_weights, V)
   
return output

METHOD Forward(query, key, value) CLASS MultiHeadAttention

   local Q, K, V, attention_output, output

   // Proyección de los pesos
   Q := hb_MatrixMultiply(query, ::WQ)
   K := hb_MatrixMultiply(key, ::WK)
   V := hb_MatrixMultiply(value, ::WV)

   // Atención escalada
   attention_output := ::ScaledDotProductAttention(Q, K, V)

   // Proyección final
   output := hb_MatrixMultiply(attention_output, ::WO)

return output

METHOD Backward(d_output, Q, K, V) CLASS MultiHeadAttention

   // Gradientes para WO
   ::dWO := hb_MatrixMultiply(hb_MatrixTranspose(Q), d_output)

   // Gradientes para WQ, WK y WV (simplificados)
   ::dWQ := hb_MatrixMultiply(hb_MatrixTranspose(d_output), Q)
   ::dWK := hb_MatrixMultiply(hb_MatrixTranspose(d_output), K)
   ::dWV := hb_MatrixMultiply(hb_MatrixTranspose(d_output), V)

return hb_MatrixZero(::d_model, ::d_model)  // Simplificación para no propagar más

// Clase para el Transformer
CLASS Transformer
   DATA layers
   DATA num_layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer

   local i 

   ::num_layers := num_layers
   ::layers := Array(num_layers)

   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT

return Self

METHOD Forward(src, tgt) CLASS Transformer

   local output, i

   output := src

   FOR i := 1 TO ::num_layers
      output := ::layers[i]:Forward(output, output, output)
   NEXT

return output

METHOD Backward(d_output) CLASS Transformer

   local grad := d_output, i

   FOR i := ::num_layers TO 1 STEP -1
      grad := ::layers[i]:Backward(grad, grad, grad)
   NEXT

return grad

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#include <windows.h>

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>
<![CDATA[Artificial Intelligence examples :: Re: CLASS Transformer :: Reply by Antonio Linares]]> 2025-01-11T13:06:35-07:00 2025-01-11T13:06:35-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=40&t=45296&p=276865#p276865

Code: Select all | Expand

#include "FiveWin.ch"

// Función principal para entrenar el Transformer
PROCEDURE Main()
   LOCAL d_model := 128
   LOCAL n_heads := 4
   LOCAL num_layers := 1
   LOCAL learning_rate := 0.01
   LOCAL max_epochs := 100
   LOCAL output, loss, d_output, epoch

   // Generar datos de entrada y salida aleatorios
   LOCAL src := hb_MatrixRandom(10, d_model)  // 10 secuencias de entrada
   LOCAL tgt := hb_MatrixRandom(10, d_model)  // 10 secuencias de objetivo

   // Crear instancia del Transformer
   LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)

   FOR epoch := 1 TO max_epochs
      output := transformer:Forward(src, tgt)
      loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
                        hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)

      // Gradiente de salida
      d_output := hb_MatrixSubstract(output, tgt)

      // Retropropagación y actualización de pesos
      transformer:Backward(d_output)
      ActualizarPesos(transformer, learning_rate)

      // Mostrar pérdida en cada época
      ? "Época:", epoch, "Pérdida:", loss
   NEXT
RETURN

// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
   DATA WQ, WK, WV, WO
   DATA dWQ, dWK, dWV, dWO

   METHOD New(d_model, n_heads)
   METHOD Forward(Q, K, V)
   METHOD Backward(d_output) VIRTUAL
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   LOCAL scale := 1.0 / Sqrt(d_model)
   ::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WV := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WO := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )

   ::dWQ = hb_MatrixZero(d_model, d_model)  // Gradientes para WQ
   ::dWK = hb_MatrixZero(d_model, d_model)  // Gradientes para WK
   ::dWV = hb_MatrixZero(d_model, d_model)  // Gradientes para WV
   ::dWO = hb_MatrixZero(d_model, d_model)  // Gradientes para WO   

RETURN Self

METHOD Forward(Q, K, V) CLASS MultiHeadAttention
      LOCAL Q_proj := hb_MatrixMultiply(Q, ::WQ)
      LOCAL K_proj := hb_MatrixMultiply(K, ::WK)
      LOCAL V_proj := hb_MatrixMultiply(V, ::WV)
      LOCAL scores := hb_MatrixDiv( hb_MatrixMultiply(Q_proj, hb_MatrixTranspose(K_proj)), Sqrt(Len(Q_proj[1])) )
      LOCAL attention := Softmax(scores)
      RETURN hb_MatrixMultiply(attention, V_proj)

// Clase para implementar el Transformer
CLASS Transformer
   VAR layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer
   local i
   ::layers := Array(num_layers)
   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT
RETURN Self

METHOD Forward(src, tgt) CLASS Transformer
   LOCAL output := src, i
   FOR i := 1 TO Len(::layers)
      output := ::layers[i]:Forward(output, output, output)
   NEXT
RETURN output

METHOD Backward(d_output) CLASS Transformer
   local i
   FOR i := Len(::layers) TO 1 STEP -1
      ::layers[i]:Backward(d_output)
   NEXT
RETURN NIL

// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
   LOCAL rows := Len(matrix)
   LOCAL cols := Len(matrix[1])
   LOCAL result := Array(rows, cols)
   local i, j, max_val, sum_exp, exp_values

   FOR i := 1 TO rows
      max_val := hb_ArrayMax(matrix[i])
      sum_exp := 0
      exp_values := Array(cols)

      FOR j := 1 TO cols
         exp_values[j] := Exp(matrix[i][j] - max_val)
         sum_exp += exp_values[j]
      NEXT

      FOR j := 1 TO cols
         result[i][j] := exp_values[j] / sum_exp
      NEXT
   NEXT

RETURN result

// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
   local i, layer
   FOR i := 1 TO Len(transformer:layers)
      layer := transformer:layers[i]
      layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
      layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
      layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
      layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
   NEXT
RETURN nil

FUNCTION hb_ArrayMax(aArray)
   LOCAL nMax := NIL
   LOCAL i

   // Verificar que el parámetro sea un array
   IF ValType(aArray) != "A"
      RETURN NIL
   ENDIF

   // Recorrer el array para encontrar el máximo
   FOR i := 1 TO Len(aArray)
      IF i == 1 .OR. aArray[i] > nMax
         nMax := aArray[i]
      ENDIF
   NEXT

RETURN nMax

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXDIV )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value / scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>

Code: Select all | Expand

#include "FiveWin.ch"

// Función principal para entrenar el Transformer
PROCEDURE Main()
   LOCAL d_model := 128
   LOCAL n_heads := 4
   LOCAL num_layers := 1
   LOCAL learning_rate := 0.01
   LOCAL max_epochs := 100
   LOCAL output, loss, d_output, epoch

   // Generar datos de entrada y salida aleatorios
   LOCAL src := hb_MatrixRandom(10, d_model)  // 10 secuencias de entrada
   LOCAL tgt := hb_MatrixRandom(10, d_model)  // 10 secuencias de objetivo

   // Crear instancia del Transformer
   LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)

   FOR epoch := 1 TO max_epochs
      output := transformer:Forward(src, tgt)
      loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
                        hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)

      // Gradiente de salida
      d_output := hb_MatrixSubstract(output, tgt)

      // Retropropagación y actualización de pesos
      transformer:Backward(d_output)
      ActualizarPesos(transformer, learning_rate)

      // Mostrar pérdida en cada época
      ? "Época:", epoch, "Pérdida:", loss
   NEXT
RETURN

// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
   DATA WQ, WK, WV, WO
   DATA dWQ, dWK, dWV, dWO

   METHOD New(d_model, n_heads)
   METHOD Forward(Q, K, V)
   METHOD Backward(d_output) VIRTUAL
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   LOCAL scale := 1.0 / Sqrt(d_model)
   ::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WV := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
   ::WO := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )

   ::dWQ = hb_MatrixZero(d_model, d_model)  // Gradientes para WQ
   ::dWK = hb_MatrixZero(d_model, d_model)  // Gradientes para WK
   ::dWV = hb_MatrixZero(d_model, d_model)  // Gradientes para WV
   ::dWO = hb_MatrixZero(d_model, d_model)  // Gradientes para WO   

RETURN Self

METHOD Forward(Q, K, V) CLASS MultiHeadAttention
      LOCAL Q_proj := hb_MatrixMultiply(Q, ::WQ)
      LOCAL K_proj := hb_MatrixMultiply(K, ::WK)
      LOCAL V_proj := hb_MatrixMultiply(V, ::WV)
      LOCAL scores := hb_MatrixDiv( hb_MatrixMultiply(Q_proj, hb_MatrixTranspose(K_proj)), Sqrt(Len(Q_proj[1])) )
      LOCAL attention := Softmax(scores)
      RETURN hb_MatrixMultiply(attention, V_proj)

// Clase para implementar el Transformer
CLASS Transformer
   VAR layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer
   local i
   ::layers := Array(num_layers)
   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT
RETURN Self

METHOD Forward(src, tgt) CLASS Transformer
   LOCAL output := src, i
   FOR i := 1 TO Len(::layers)
      output := ::layers[i]:Forward(output, output, output)
   NEXT
RETURN output

METHOD Backward(d_output) CLASS Transformer
   local i
   FOR i := Len(::layers) TO 1 STEP -1
      ::layers[i]:Backward(d_output)
   NEXT
RETURN NIL

// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
   LOCAL rows := Len(matrix)
   LOCAL cols := Len(matrix[1])
   LOCAL result := Array(rows, cols)
   local i, j, max_val, sum_exp, exp_values

   FOR i := 1 TO rows
      max_val := hb_ArrayMax(matrix[i])
      sum_exp := 0
      exp_values := Array(cols)

      FOR j := 1 TO cols
         exp_values[j] := Exp(matrix[i][j] - max_val)
         sum_exp += exp_values[j]
      NEXT

      FOR j := 1 TO cols
         result[i][j] := exp_values[j] / sum_exp
      NEXT
   NEXT

RETURN result

// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
   local i, layer
   FOR i := 1 TO Len(transformer:layers)
      layer := transformer:layers[i]
      layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
      layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
      layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
      layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
   NEXT
RETURN nil

FUNCTION hb_ArrayMax(aArray)
   LOCAL nMax := NIL
   LOCAL i

   // Verificar que el parámetro sea un array
   IF ValType(aArray) != "A"
      RETURN NIL
   ENDIF

   // Recorrer el array para encontrar el máximo
   FOR i := 1 TO Len(aArray)
      IF i == 1 .OR. aArray[i] > nMax
         nMax := aArray[i]
      ENDIF
   NEXT

RETURN nMax

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXDIV )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value / scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>
<![CDATA[Artificial Intelligence examples :: Re: CLASS Transformer :: Reply by Antonio Linares]]> 2025-01-11T13:23:10-07:00 2025-01-11T13:23:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=40&t=45296&p=276866#p276866

Code: Select all | Expand

#include "FiveWin.ch"

// Función principal para entrenar el Transformer
PROCEDURE Main()
   LOCAL d_model := 128
   LOCAL n_heads := 4
   LOCAL num_layers := 1
   LOCAL learning_rate := 0.001
   LOCAL max_epochs := 100
   LOCAL output, loss, d_output, epoch

   // Generar datos de entrada y salida aleatorios
   LOCAL src := hb_MatrixRandom(10, d_model)  // 10 secuencias de entrada
   LOCAL tgt := hb_MatrixRandom(10, d_model)  // 10 secuencias de objetivo

   // Crear instancia del Transformer
   LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)

   FOR epoch := 1 TO max_epochs
      output := transformer:Forward(src, tgt)
      loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
                        hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)

      // Gradiente de salida
      d_output := hb_MatrixSubstract(output, tgt)

      // Retropropagación y actualización de pesos
      transformer:Backward(d_output)
      ActualizarPesos(transformer, learning_rate)

      // Mostrar pérdida en cada época
      ? "Época:", epoch, "Pérdida:", loss
   NEXT
RETURN

// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
   DATA d_model, n_heads
   DATA WQ, WK, WV, WO
   DATA dWQ, dWK, dWV, dWO
   // Cache para backpropagation
   DATA Q_proj
   DATA K_proj
   DATA V_proj
   DATA attention_scores
   DATA attention_probs   

   METHOD New(d_model, n_heads)
   METHOD Forward(Q, K, V)
   METHOD Backward(d_output) 
   METHOD InitGradients()   
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   LOCAL scale := 1.0 / Sqrt(d_model)
   
   // Guardamos d_model como propiedad de la clase
   ::d_model := d_model
   
   // Inicializar matrices de pesos
   ::WQ := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WK := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WV := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WO := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)

   // Inicializar gradientes
   ::InitGradients() 

RETURN Self

METHOD InitGradients() CLASS MultiHeadAttention
   // Inicializar gradientes como matrices de ceros
   ::dWQ := hb_MatrixZero(::d_model, ::d_model)
   ::dWK := hb_MatrixZero(::d_model, ::d_model)
   ::dWV := hb_MatrixZero(::d_model, ::d_model)
   ::dWO := hb_MatrixZero(::d_model, ::d_model)
RETURN NIL

METHOD Forward(Q, K, V) CLASS MultiHeadAttention

   // Guardamos los valores proyectados para usar en backward
   ::Q_proj := hb_MatrixMultiply(Q, ::WQ)
   ::K_proj := hb_MatrixMultiply(K, ::WK)
   ::V_proj := hb_MatrixMultiply(V, ::WV)
   
   // Calcular scores de atención
   ::attention_scores := hb_MatrixDiv(hb_MatrixMultiply(::Q_proj, hb_MatrixTranspose(::K_proj)), ;
                                    Sqrt(Len(::Q_proj[1])))
   
   // Aplicar softmax para obtener probabilidades de atención
   ::attention_probs := Softmax(::attention_scores)
   
RETURN hb_MatrixMultiply(::attention_probs, ::V_proj)

METHOD Backward(d_output) CLASS MultiHeadAttention
   local attention_grad, Q_grad, K_grad, V_grad
   // Reiniciar gradientes antes de acumularlos
   ::InitGradients()
   
   // Gradientes para la atención
   attention_grad := d_output
   
   // Gradientes para las matrices de peso
   ::dWO := hb_MatrixMultiply(hb_MatrixTranspose(attention_grad), ::V_proj)
   
   // Gradientes para Q, K, V proyectados
   Q_grad := hb_MatrixMultiply(attention_grad, ::WQ)
   K_grad := hb_MatrixMultiply(attention_grad, ::WK)
   V_grad := hb_MatrixMultiply(attention_grad, ::WV)
   
   // Actualizar gradientes acumulados usando los valores cacheados
   ::dWQ := hb_MatrixSum(::dWQ, hb_MatrixMultiply(hb_MatrixTranspose(Q_grad), ::K_proj))
   ::dWK := hb_MatrixSum(::dWK, hb_MatrixMultiply(hb_MatrixTranspose(K_grad), ::Q_proj))
   ::dWV := hb_MatrixSum(::dWV, hb_MatrixMultiply(hb_MatrixTranspose(V_grad), ::attention_scores))

RETURN d_output

// Clase para implementar el Transformer
CLASS Transformer
   VAR layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer
   local i
   ::layers := Array(num_layers)
   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT
RETURN Self

METHOD Forward(src, tgt) CLASS Transformer
   LOCAL output := src, i
   FOR i := 1 TO Len(::layers)
      output := ::layers[i]:Forward(output, output, output)
   NEXT
RETURN output

METHOD Backward(d_output) CLASS Transformer
   local i
   FOR i := Len(::layers) TO 1 STEP -1
      ::layers[i]:Backward(d_output)
   NEXT
RETURN NIL

// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
   LOCAL rows := Len(matrix)
   LOCAL cols := Len(matrix[1])
   LOCAL result := Array(rows, cols)
   local i, j, max_val, sum_exp, exp_values

   FOR i := 1 TO rows
      max_val := hb_ArrayMax(matrix[i])
      sum_exp := 0
      exp_values := Array(cols)

      FOR j := 1 TO cols
         exp_values[j] := Exp(matrix[i][j] - max_val)
         sum_exp += exp_values[j]
      NEXT

      FOR j := 1 TO cols
         result[i][j] := exp_values[j] / sum_exp
      NEXT
   NEXT

RETURN result

// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
   local i, layer
   FOR i := 1 TO Len(transformer:layers)
      layer := transformer:layers[i]
      XBrowser( layer:dWQ )
      layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
      layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
      layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
      layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
   NEXT
RETURN nil

FUNCTION hb_ArrayMax(aArray)
   LOCAL nMax := NIL
   LOCAL i

   // Verificar que el parámetro sea un array
   IF ValType(aArray) != "A"
      RETURN NIL
   ENDIF

   // Recorrer el array para encontrar el máximo
   FOR i := 1 TO Len(aArray)
      IF i == 1 .OR. aArray[i] > nMax
         nMax := aArray[i]
      ENDIF
   NEXT

RETURN nMax

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXDIV )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value / scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>

Code: Select all | Expand

#include "FiveWin.ch"

// Función principal para entrenar el Transformer
PROCEDURE Main()
   LOCAL d_model := 128
   LOCAL n_heads := 4
   LOCAL num_layers := 1
   LOCAL learning_rate := 0.001
   LOCAL max_epochs := 100
   LOCAL output, loss, d_output, epoch

   // Generar datos de entrada y salida aleatorios
   LOCAL src := hb_MatrixRandom(10, d_model)  // 10 secuencias de entrada
   LOCAL tgt := hb_MatrixRandom(10, d_model)  // 10 secuencias de objetivo

   // Crear instancia del Transformer
   LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)

   FOR epoch := 1 TO max_epochs
      output := transformer:Forward(src, tgt)
      loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
                        hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)

      // Gradiente de salida
      d_output := hb_MatrixSubstract(output, tgt)

      // Retropropagación y actualización de pesos
      transformer:Backward(d_output)
      ActualizarPesos(transformer, learning_rate)

      // Mostrar pérdida en cada época
      ? "Época:", epoch, "Pérdida:", loss
   NEXT
RETURN

// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
   DATA d_model, n_heads
   DATA WQ, WK, WV, WO
   DATA dWQ, dWK, dWV, dWO
   // Cache para backpropagation
   DATA Q_proj
   DATA K_proj
   DATA V_proj
   DATA attention_scores
   DATA attention_probs   

   METHOD New(d_model, n_heads)
   METHOD Forward(Q, K, V)
   METHOD Backward(d_output) 
   METHOD InitGradients()   
ENDCLASS

METHOD New(d_model, n_heads) CLASS MultiHeadAttention
   LOCAL scale := 1.0 / Sqrt(d_model)
   
   // Guardamos d_model como propiedad de la clase
   ::d_model := d_model
   
   // Inicializar matrices de pesos
   ::WQ := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WK := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WV := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
   ::WO := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)

   // Inicializar gradientes
   ::InitGradients() 

RETURN Self

METHOD InitGradients() CLASS MultiHeadAttention
   // Inicializar gradientes como matrices de ceros
   ::dWQ := hb_MatrixZero(::d_model, ::d_model)
   ::dWK := hb_MatrixZero(::d_model, ::d_model)
   ::dWV := hb_MatrixZero(::d_model, ::d_model)
   ::dWO := hb_MatrixZero(::d_model, ::d_model)
RETURN NIL

METHOD Forward(Q, K, V) CLASS MultiHeadAttention

   // Guardamos los valores proyectados para usar en backward
   ::Q_proj := hb_MatrixMultiply(Q, ::WQ)
   ::K_proj := hb_MatrixMultiply(K, ::WK)
   ::V_proj := hb_MatrixMultiply(V, ::WV)
   
   // Calcular scores de atención
   ::attention_scores := hb_MatrixDiv(hb_MatrixMultiply(::Q_proj, hb_MatrixTranspose(::K_proj)), ;
                                    Sqrt(Len(::Q_proj[1])))
   
   // Aplicar softmax para obtener probabilidades de atención
   ::attention_probs := Softmax(::attention_scores)
   
RETURN hb_MatrixMultiply(::attention_probs, ::V_proj)

METHOD Backward(d_output) CLASS MultiHeadAttention
   local attention_grad, Q_grad, K_grad, V_grad
   // Reiniciar gradientes antes de acumularlos
   ::InitGradients()
   
   // Gradientes para la atención
   attention_grad := d_output
   
   // Gradientes para las matrices de peso
   ::dWO := hb_MatrixMultiply(hb_MatrixTranspose(attention_grad), ::V_proj)
   
   // Gradientes para Q, K, V proyectados
   Q_grad := hb_MatrixMultiply(attention_grad, ::WQ)
   K_grad := hb_MatrixMultiply(attention_grad, ::WK)
   V_grad := hb_MatrixMultiply(attention_grad, ::WV)
   
   // Actualizar gradientes acumulados usando los valores cacheados
   ::dWQ := hb_MatrixSum(::dWQ, hb_MatrixMultiply(hb_MatrixTranspose(Q_grad), ::K_proj))
   ::dWK := hb_MatrixSum(::dWK, hb_MatrixMultiply(hb_MatrixTranspose(K_grad), ::Q_proj))
   ::dWV := hb_MatrixSum(::dWV, hb_MatrixMultiply(hb_MatrixTranspose(V_grad), ::attention_scores))

RETURN d_output

// Clase para implementar el Transformer
CLASS Transformer
   VAR layers

   METHOD New(num_layers, d_model, n_heads)
   METHOD Forward(src, tgt)
   METHOD Backward(d_output)
ENDCLASS

METHOD New(num_layers, d_model, n_heads) CLASS Transformer
   local i
   ::layers := Array(num_layers)
   FOR i := 1 TO num_layers
      ::layers[i] := MultiHeadAttention():New(d_model, n_heads)
   NEXT
RETURN Self

METHOD Forward(src, tgt) CLASS Transformer
   LOCAL output := src, i
   FOR i := 1 TO Len(::layers)
      output := ::layers[i]:Forward(output, output, output)
   NEXT
RETURN output

METHOD Backward(d_output) CLASS Transformer
   local i
   FOR i := Len(::layers) TO 1 STEP -1
      ::layers[i]:Backward(d_output)
   NEXT
RETURN NIL

// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
   LOCAL rows := Len(matrix)
   LOCAL cols := Len(matrix[1])
   LOCAL result := Array(rows, cols)
   local i, j, max_val, sum_exp, exp_values

   FOR i := 1 TO rows
      max_val := hb_ArrayMax(matrix[i])
      sum_exp := 0
      exp_values := Array(cols)

      FOR j := 1 TO cols
         exp_values[j] := Exp(matrix[i][j] - max_val)
         sum_exp += exp_values[j]
      NEXT

      FOR j := 1 TO cols
         result[i][j] := exp_values[j] / sum_exp
      NEXT
   NEXT

RETURN result

// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
   local i, layer
   FOR i := 1 TO Len(transformer:layers)
      layer := transformer:layers[i]
      XBrowser( layer:dWQ )
      layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
      layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
      layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
      layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
   NEXT
RETURN nil

FUNCTION hb_ArrayMax(aArray)
   LOCAL nMax := NIL
   LOCAL i

   // Verificar que el parámetro sea un array
   IF ValType(aArray) != "A"
      RETURN NIL
   ENDIF

   // Recorrer el array para encontrar el máximo
   FOR i := 1 TO Len(aArray)
      IF i == 1 .OR. aArray[i] > nMax
         nMax := aArray[i]
      ENDIF
   NEXT

RETURN nMax

#pragma BEGINDUMP

#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>

HB_FUNC( HB_MATRIXMULTIPLY )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      // Dimensiones de la primera matriz
      int rows1 = hb_arrayLen( pMatrix1 );
      PHB_ITEM pRow1, pRow2, pResult, pRowResult;
      int i, k, cols1, rows2, cols2;

      if( rows1 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
      if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols1 = hb_arrayLen( pRow1 );

      // Dimensiones de la segunda matriz
      rows2 = hb_arrayLen( pMatrix2 );
      if( rows2 == 0 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
      if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }
      cols2 = hb_arrayLen( pRow2 );

      // Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
      if( cols1 != rows2 )
      {
         hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         return;
      }

      // Crear la matriz de resultado (rows1 x cols2)
      pResult = hb_itemArrayNew( rows1 );

      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
         hb_arraySet( pResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult ); // Liberar referencia local
      }

      // Realizar la multiplicación de matrices
      for( i = 0; i < rows1; i++ )
      {
         PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
         int j;

         for( j = 0; j < cols2; j++ )
         {
            double sum = 0.0;
            for( k = 0; k < cols1; k++ )
            {
               double a = hb_arrayGetND( pRowA, k + 1 );
               PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
               double b = hb_arrayGetND( pRowB, j + 1 );
               sum += a * b;
            }
            
            pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
            hb_arraySetND( pRowResult, j + 1, sum );
         }
      }

      // Devolver la matriz de resultado
      hb_itemReturnRelease( pResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSCALE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value * scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXDIV )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
   double scale = hb_parnd( 2 );                 // Segundo parámetro: escalar

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE i, j;
      PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );

      // Copiar y escalar los datos
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         HB_SIZE nCols = hb_arrayLen( pRow );

         PHB_ITEM pRowResult = hb_itemArrayNew( nCols );

         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 );
            hb_arraySetND( pRowResult, j + 1, value / scale );
         }

         hb_arraySet( pMatrixResult, i + 1, pRowResult );
         hb_itemRelease( pRowResult );
      }

      hb_itemReturnRelease( pMatrixResult );
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXTRANSPOSE )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer

   if( pMatrix )
   {
      HB_SIZE nRows = hb_arrayLen( pMatrix );
      HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
      HB_SIZE i, j;

      PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)

      // Inicializar las filas de la matriz transpuesta
      for( i = 0; i < nCols; i++ )
      {
         hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
      }

      // Rellenar la matriz transpuesta
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
         for( j = 0; j < nCols; j++ )
         {
            double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
            PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
            hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
         }
      }

      hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXZERO )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con ceros
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXRANDOM )
{
   HB_SIZE nRows = hb_parns( 1 ); // Número de filas
   HB_SIZE nCols = hb_parns( 2 ); // Número de columnas

   if( nRows > 0 && nCols > 0 )
   {
      HB_SIZE i, j;

      PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas

      // Inicializar la matriz con valores aleatorios
      for( i = 0; i < nRows; i++ )
      {
         PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
         for( j = 0; j < nCols; j++ )
         {
            double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
            hb_arraySetND( pRow, j + 1, randomValue );
         }
         hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
         hb_itemRelease( pRow ); // Liberar la fila temporal
      }

      hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_SOFTMAX )
{
   PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores

   if( pValues )
   {
      int nRows = hb_arrayLen( pValues ); // Número de filas
      if( nRows > 0 )
      {
         // Asumimos que las filas tienen la misma longitud
         PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
         int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)

         PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
         int i, j;

         // Recorrer cada fila
         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
            PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax

            double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
            double sumExp = 0.0;

            // Calcular e^x para cada elemento de la fila y la suma total
            for( j = 0; j < nCols; j++ )
            {
               double value = hb_arrayGetND( pRow, j + 1 );
               expValues[j] = pow( M_E, value );
               sumExp += expValues[j];
            }

            // Calcular Softmax para la fila dividiendo cada e^x por la suma total
            for( j = 0; j < nCols; j++ )
            {
               double softmaxValue = expValues[j] / sumExp;
               hb_arraySetND( pRowResult, j + 1, softmaxValue );
            }

            hb_xfree( expValues ); // Liberar memoria para los exponentes

            // Guardar la fila de resultados en la matriz resultante
            hb_arraySet( pResult, i + 1, pRowResult );
            hb_itemRelease( pRowResult ); // Liberar la fila de resultados
         }

         hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
      }
      else
      {
         hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUBSTRACT )
{
   PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
   PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz

   if( pMatrix1 && pMatrix2 )
   {
      HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
      HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );

      if( nRows1 == nRows2 && nRows1 > 0 )
      {
         HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
         HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );

         if( nCols1 == nCols2 && nCols1 > 0 )
         {
            HB_SIZE i, j;

            // Crear la matriz de resultado
            PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );

            // Realizar la resta elemento a elemento
            for( i = 0; i < nRows1; i++ )
            {
               PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
               PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );

               PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );

               for( j = 0; j < nCols1; j++ )
               {
                  double value1 = hb_arrayGetND( pRow1, j + 1 );
                  double value2 = hb_arrayGetND( pRow2, j + 1 );
                  hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
               }

               hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
               hb_itemRelease( pRowResult ); // Liberar la fila temporal
            }

            hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
         }
         else
         {
            // Error: Las columnas no coinciden
            hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
         }
      }
      else
      {
         // Error: Las filas no coinciden
         hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

HB_FUNC( HB_MATRIXSUM )
{
   PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada

   if( pMatrix )
   {
      int nRows = hb_arrayLen( pMatrix ); // Número de filas

      if( nRows > 0 )
      {
         double sum = 0.0;
         int i;

         for( i = 0; i < nRows; i++ )
         {
            PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
            int nCols = hb_arrayLen( pRow ); // Número de columnas
            int j;

            for( j = 0; j < nCols; j++ )
            {
               sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
            }
         }

         hb_retnd( sum ); // Devolver la suma como resultado
      }
      else
      {
         // Error: Matriz vacía
         hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
      }
   }
   else
   {
      // Error: Argumentos inválidos
      hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
   }
}

#pragma ENDDUMP
]]>
<![CDATA[latest AI news :: Google Vision API test :: Author Antonio Linares]]> 2024-12-29T00:24:10-07:00 2024-12-29T00:24:10-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=42&t=45273&p=276681#p276681
https://theyseeyourphotos.com/]]>

https://theyseeyourphotos.com/]]>
<![CDATA[latest AI news :: AI prompting techniques :: Author Antonio Linares]]> 2025-01-12T04:16:04-07:00 2025-01-12T04:16:04-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=42&t=45301&p=276876#p276876 ]]> ]]> <![CDATA[latest AI news :: open source Sky-T1 450$ cost :: Author Antonio Linares]]> 2025-01-17T16:28:49-07:00 2025-01-17T16:28:49-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=42&t=45320&p=276997#p276997 https://techcrunch.com/2025/01/11/resea ... -than-450/

Full source code and data provided !!!]]>
https://techcrunch.com/2025/01/11/resea ... -than-450/

Full source code and data provided !!!]]>
<![CDATA[latest AI news :: building a 2 billion parameter llm from scratch :: Author Antonio Linares]]> 2025-01-18T10:23:31-07:00 2025-01-18T10:23:31-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=42&t=45321&p=277011#p277011 https://freedium.cfd/https://levelup.gi ... 25cb05d6fb]]> https://freedium.cfd/https://levelup.gi ... 25cb05d6fb]]> <![CDATA[latest AI news :: Using DeepSeek-R1 locally from WebView :: Author Antonio Linares]]> 2025-01-24T06:44:56-07:00 2025-01-24T06:44:56-07:00 https://forums.fivetechsupport.com/viewtopic.php?f=42&t=45342&p=277181#p277181 https://huggingface.co/spaces/webml-com ... -r1-webgpu

Image]]>
https://huggingface.co/spaces/webml-com ... -r1-webgpu

Image]]>