Code: Select all | Expand
#command @ <nRow>, <nCol> EDIT [ <oEdit> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <lMemo: MEMO,TEXT,MULTILINE> ] ;
...
Code: Select all | Expand
#command @ <nRow>, <nCol> EDIT [ <oEdit> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <lMemo: MEMO,TEXT,MULTILINE> ] ;
...
Code: Select all | Expand
REDEFINE GET oGet[17] VAR wTEXTO MULTILINE ID 217 OF oDlg ;
COLOR CLR_BLUE, CLR_WHITE UPDATE FONT oFont ;
ON CHANGE( SB_LimitText( oGet[17], oSay, oTransmite ) ) // By AleSB
oGet[17]:bGotFocus = { || oGet[17]:SetSel( 0, 0 ),;
oGet[17]:Goto( oGet[17]:GetLineCount() ),;
__Keyboard( Chr( VK_HOME ) ) }
Outro, Other:
REDEFINE GET oGet[4] VAR cDest ID 21 OF oDlgEnv MEMO ;
FONT oFont1 UPDATE COLORS nRgb(0,0,220),nRgb(253,252,213) ;
VALID( CHECA_GET_Dest( ALLTRIM( cDest ) ) )
oGet[4]:bLostFocus := { || oGet[4]:SetColor( CLR_BLACK, CLR_WHITE) }
oGet[4]:bGotFocus := { || oGet[4]:SetColor( CLR_BLACK, nRGB( 255,255,45 )), oGet[4]:setsel(0,0) }
oGet[4]:cToolTip := OemToAnsi( "Para: Contato(Email) Campo Obrigat¢rio" )
// Para que o GET com MEMO possa "pular" Para o Proximo GET. Afff!!
oGet[4]:bKeyDown:={|nKey|IF(nKey==VK_RETURN, VER_FOCO_GET4( oGet ),)}
FUNCTION VER_FOCO_GET4( oGet ) // GET 5 - 24/07/2013 - FWH13.06
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[5]:SetFocus() // nao funciona com XFOCUS()
oGet[5]:bGotFocus := { || oGet[5]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION VER_FOCO_GET5( oGet ) // GET 5 - 24/07/2013
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[6]:SetFocus() // nao funciona com XFOCUS()
oGet[6]:bGotFocus := { || oGet[6]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION VER_FOCO_GET6( oGet ) // GET 6 - 24/07/2013
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[6]:bGotFocus := { || oGet[6]:SetPos(0), Nil }
oGet[5]:SetFocus() // nao funciona com XFOCUS()
oGet[5]:bGotFocus := { || oGet[5]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION SB_LimitText( oGet, oSay, oTransmite )
///////////////////////////////////////////////////////////////////////////
// Autor..........: Peguei no Forum FiveWin Brasil //
// Modificaçoes...: Ale SB - Soft Camus //
// Descricao......: Restringe o Tamanho de um Texto. //
// Parametros ==> //
// - oGet : oBjeto Get. //
// - nSize : Tamanho que deve ter o Texto. //
// Dependencias ==> //
// Retorno ==> nil //
///////////////////////////////////////////////////////////////////////////
LOCAL nTam, nSize
DEFAULT nSize := 999 // maximo ‚ 1000 caracteres
nTam := LEN( ALLTRIM( oGet:cText ) )
IF nTam > nSize
MsgInfo( "A Mensagem da Carta já Alcançou o Tamanho Limite de " + ;
"1000 Caracteres Permitidos Pela Sefaz!", ;
"..:: Atenção ::.." )
oGet:cText := Substr(oGet:cText, 1, nTam-1)
RETURN( .F. )
ENDIF
// Mostra a qtde de caracteres digitados no SAY
oSay:VarPut( Strzero( nTam, 3, 0 ) )
oSay:Refresh()
IF nTam <= 14 // caracteres
lLigaBotao := .F.
// Botao da Transmissao
oTransmite:Disable()
oTransmite:Refresh()
ELSE
lLigaBotao := .T.
// Botao da Transmissao
oTransmite:Enable()
oTransmite:Refresh()
ENDIF
RETURN( .T. )
Code: Select all | Expand
REDEFINE GET oGet[17] VAR wTEXTO MULTILINE ID 217 OF oDlg ;
COLOR CLR_BLUE, CLR_WHITE UPDATE FONT oFont ;
ON CHANGE( SB_LimitText( oGet[17], oSay, oTransmite ) ) // By AleSB
oGet[17]:bGotFocus = { || oGet[17]:SetSel( 0, 0 ),;
oGet[17]:Goto( oGet[17]:GetLineCount() ),;
__Keyboard( Chr( VK_HOME ) ) }
Outro, Other:
REDEFINE GET oGet[4] VAR cDest ID 21 OF oDlgEnv MEMO ;
FONT oFont1 UPDATE COLORS nRgb(0,0,220),nRgb(253,252,213) ;
VALID( CHECA_GET_Dest( ALLTRIM( cDest ) ) )
oGet[4]:bLostFocus := { || oGet[4]:SetColor( CLR_BLACK, CLR_WHITE) }
oGet[4]:bGotFocus := { || oGet[4]:SetColor( CLR_BLACK, nRGB( 255,255,45 )), oGet[4]:setsel(0,0) }
oGet[4]:cToolTip := OemToAnsi( "Para: Contato(Email) Campo Obrigat¢rio" )
// Para que o GET com MEMO possa "pular" Para o Proximo GET. Afff!!
oGet[4]:bKeyDown:={|nKey|IF(nKey==VK_RETURN, VER_FOCO_GET4( oGet ),)}
FUNCTION VER_FOCO_GET4( oGet ) // GET 5 - 24/07/2013 - FWH13.06
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[5]:SetFocus() // nao funciona com XFOCUS()
oGet[5]:bGotFocus := { || oGet[5]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION VER_FOCO_GET5( oGet ) // GET 5 - 24/07/2013
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[6]:SetFocus() // nao funciona com XFOCUS()
oGet[6]:bGotFocus := { || oGet[6]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION VER_FOCO_GET6( oGet ) // GET 6 - 24/07/2013
// Posiciona o Cursor na 1a. Letra do Email Problemas no FOCO do MEMO
oGet[6]:bGotFocus := { || oGet[6]:SetPos(0), Nil }
oGet[5]:SetFocus() // nao funciona com XFOCUS()
oGet[5]:bGotFocus := { || oGet[5]:SetPos(0), Nil }
RETURN( .T. )
FUNCTION SB_LimitText( oGet, oSay, oTransmite )
///////////////////////////////////////////////////////////////////////////
// Autor..........: Peguei no Forum FiveWin Brasil //
// Modificaçoes...: Ale SB - Soft Camus //
// Descricao......: Restringe o Tamanho de um Texto. //
// Parametros ==> //
// - oGet : oBjeto Get. //
// - nSize : Tamanho que deve ter o Texto. //
// Dependencias ==> //
// Retorno ==> nil //
///////////////////////////////////////////////////////////////////////////
LOCAL nTam, nSize
DEFAULT nSize := 999 // maximo ‚ 1000 caracteres
nTam := LEN( ALLTRIM( oGet:cText ) )
IF nTam > nSize
MsgInfo( "A Mensagem da Carta já Alcançou o Tamanho Limite de " + ;
"1000 Caracteres Permitidos Pela Sefaz!", ;
"..:: Atenção ::.." )
oGet:cText := Substr(oGet:cText, 1, nTam-1)
RETURN( .F. )
ENDIF
// Mostra a qtde de caracteres digitados no SAY
oSay:VarPut( Strzero( nTam, 3, 0 ) )
oSay:Refresh()
IF nTam <= 14 // caracteres
lLigaBotao := .F.
// Botao da Transmissao
oTransmite:Disable()
oTransmite:Refresh()
ELSE
lLigaBotao := .T.
// Botao da Transmissao
oTransmite:Enable()
oTransmite:Refresh()
ENDIF
RETURN( .T. )
Code: Select all | Expand
oCtl:=ocopy(oDlg_1:aControls[1])
oDlg_2:AddControl(oCtl)
]]>Code: Select all | Expand
oCtl:=ocopy(oDlg_1:aControls[1])
oDlg_2:AddControl(oCtl)
]]>Code: Select all | Expand
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 199,182,231 ) } }
// 118, 96, 138 / 135, 121, 78
SkinButtons( oSkinB )
Code: Select all | Expand
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 199,182,231 ) } }
// 118, 96, 138 / 135, 121, 78
SkinButtons( oSkinB )
Code: Select all | Expand
DEFINE DIALOG oDlg RESOURCE "FOLDER" ;
TITLE "Gerenciamento dos Devedores - "+ ;
"Cadastro - Inclusão " + ;
"/ Alteração" ;
COLORS CLR_BLACK, nRGB( 193, 205, 205 ) ;
ICON oIco
ODLG:LHELPICON := .F.
REDEFINE FOLDER oFld ID 101 OF oDlg ;
PROMPT "&Dados Comerciais ", "&Complemento ", ;
"&Inadimplencia " ;
DIALOGS "FLD_GENERAL", "FLD_GENERAL_2", ;
"FLD_GENERAL_3" ;
BITMAPS "MFONE", "EXPLORER2", "COMP16" ;
TABCOLOR CLR_HBLUE ;
FOCUSCOLOR CLR_HRED ;
COLORS nRGB( 127, 127, 127 ), nRGB( 143, 188, 143 ) ;
ADJUST
oFld:oFont := FntArial
oFld:SetOption( 1 )
oFld:Show()
oFld:aEnable[ 1 ] := .T.
oFld:Refresh()
Regards, saludos.]]>Code: Select all | Expand
DEFINE DIALOG oDlg RESOURCE "FOLDER" ;
TITLE "Gerenciamento dos Devedores - "+ ;
"Cadastro - Inclusão " + ;
"/ Alteração" ;
COLORS CLR_BLACK, nRGB( 193, 205, 205 ) ;
ICON oIco
ODLG:LHELPICON := .F.
REDEFINE FOLDER oFld ID 101 OF oDlg ;
PROMPT "&Dados Comerciais ", "&Complemento ", ;
"&Inadimplencia " ;
DIALOGS "FLD_GENERAL", "FLD_GENERAL_2", ;
"FLD_GENERAL_3" ;
BITMAPS "MFONE", "EXPLORER2", "COMP16" ;
TABCOLOR CLR_HBLUE ;
FOCUSCOLOR CLR_HRED ;
COLORS nRGB( 127, 127, 127 ), nRGB( 143, 188, 143 ) ;
ADJUST
oFld:oFont := FntArial
oFld:SetOption( 1 )
oFld:Show()
oFld:aEnable[ 1 ] := .T.
oFld:Refresh()
Regards, saludos.]]>Code: Select all | Expand
#include "hbclass.ch"
#include "mysql.ch"
Function Main()
LOCAL oServer, oQuery, oRow
LOCAL cCsvFile := "output.csv"
LOCAL cQuery := "SELECT * FROM clientes"
Local cTable := "fwh"
LOCAL hFile, cLine, aFields, nI
Local nFields
LOCAL cBOM := Chr(0xFF) + Chr(0xFE) // BOM para UTF-16 LE
oServer := TMySQLServer():New("localhost", "root", "", 3306 )
IF oServer:NetErr()
? "Error de conexión: ", oServer:Error()
RETURN
ENDIF
oServer:SelectDB( cTable )
oQuery := oServer:Query( cQuery )
IF oQuery:NetErr()
? "Error en la consulta: ", oQuery:Error()
oServer:End()
RETURN
ENDIF
hFile := FCreate(cCsvFile)
IF hFile == -1
? "Error al crear el archivo CSV"
oQuery:End()
oServer:End()
RETURN
ENDIF
// Escribir BOM para UTF-16 LE
FWrite(hFile, cBOM) // LOOK
nFields := oQuery:FCount()
cLine := ""
FOR nI := 1 TO nFields
cLine += '"' + oQuery:FieldName( nI ) + '"'
IF nI < nFields
cLine += ","
ENDIF
NEXT
cLine += hb_eol()
FWrite(hFile, StrToUTF16LE( cLine )) // LOOK
DO WHILE !oQuery:Eof()
oRow := oQuery:GetRow()
cLine := ""
FOR nI := 1 TO nFields
cLine += '"' + hb_ValToStr(oRow:FieldGet(nI)) + '"'
IF nI < nFields
cLine += ","
ENDIF
NEXT
cLine += hb_eol()
FWrite(hFile, StrToUTF16LE( cLine ) ) // LOOK
oQuery:Skip()
ENDDO
FClose(hFile)
oQuery:End()
oServer:End()
? "Archivo CSV generado exitosamente: ", cCsvFile
Return nil
// IMPORTANT
// Function convert strint to UTF-16 LE
STATIC FUNCTION StrToUTF16LE(cStr)
LOCAL cResult := ""
LOCAL nI, cChar
FOR nI := 1 TO Len(cStr)
cChar := SubStr(cStr, nI, 1)
cResult += Chr(Asc(cChar)) + Chr(0) // Little Endian: byte bajo primero
NEXT
RETURN cResult
Code: Select all | Expand
#include "hbclass.ch"
#include "mysql.ch"
Function Main()
LOCAL oServer, oQuery, oRow
LOCAL cCsvFile := "output.csv"
LOCAL cQuery := "SELECT * FROM clientes"
Local cTable := "fwh"
LOCAL hFile, cLine, aFields, nI
Local nFields
LOCAL cBOM := Chr(0xFF) + Chr(0xFE) // BOM para UTF-16 LE
oServer := TMySQLServer():New("localhost", "root", "", 3306 )
IF oServer:NetErr()
? "Error de conexión: ", oServer:Error()
RETURN
ENDIF
oServer:SelectDB( cTable )
oQuery := oServer:Query( cQuery )
IF oQuery:NetErr()
? "Error en la consulta: ", oQuery:Error()
oServer:End()
RETURN
ENDIF
hFile := FCreate(cCsvFile)
IF hFile == -1
? "Error al crear el archivo CSV"
oQuery:End()
oServer:End()
RETURN
ENDIF
// Escribir BOM para UTF-16 LE
FWrite(hFile, cBOM) // LOOK
nFields := oQuery:FCount()
cLine := ""
FOR nI := 1 TO nFields
cLine += '"' + oQuery:FieldName( nI ) + '"'
IF nI < nFields
cLine += ","
ENDIF
NEXT
cLine += hb_eol()
FWrite(hFile, StrToUTF16LE( cLine )) // LOOK
DO WHILE !oQuery:Eof()
oRow := oQuery:GetRow()
cLine := ""
FOR nI := 1 TO nFields
cLine += '"' + hb_ValToStr(oRow:FieldGet(nI)) + '"'
IF nI < nFields
cLine += ","
ENDIF
NEXT
cLine += hb_eol()
FWrite(hFile, StrToUTF16LE( cLine ) ) // LOOK
oQuery:Skip()
ENDDO
FClose(hFile)
oQuery:End()
oServer:End()
? "Archivo CSV generado exitosamente: ", cCsvFile
Return nil
// IMPORTANT
// Function convert strint to UTF-16 LE
STATIC FUNCTION StrToUTF16LE(cStr)
LOCAL cResult := ""
LOCAL nI, cChar
FOR nI := 1 TO Len(cStr)
cChar := SubStr(cStr, nI, 1)
cResult += Chr(Asc(cChar)) + Chr(0) // Little Endian: byte bajo primero
NEXT
RETURN cResult
Code: Select all | Expand
#include "fivewin.ch"
#include 'constant.ch'
#define DLG_nColorDlg RGB(245,245,235)
FUNCTION Main()
local oDlg
local nRow:= 10,nCol:=10
local nBottom:= 9
local nRight := 75
local nWd := Max( nRight * DLG_CHARPIX_W, 180 )
local nHt := nBottom * DLG_CHARPIX_H
local oFont,oBold
local oSay:=array(1)
local aGet:=array(5)
local cPicture:= "@EZ 999,99 %" //"@E ###,## %"
local nSizeGetSconto := 60
local nSconto1 := 0,;
nSconto2 := 0,;
nSconto3 := 0,;
nSconto4 := 0,;
nSconto5 := 0
oFont := TFont():New( "Arial", 0, -11 )
oBold := TFont():New( "Arial", 0, -11,,.t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "test get numerico %" COLOR CLR_BLACK, DLG_nColorDlg ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
@ nRow, nCol SAY oSay[1] PROMPT "Sconto %:" OF oDlg SIZE 75, 18 PIXEL FONT oFont TRANSPARENT
nCol+=110
@ nRow, nCol GET aGet[1] VAR nSconto1 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
aGet[1]:bChange := {|nKey|(Chr(nKey)$"0123456789.")}
//aGet[1]:bKeyDown := { | nKey |MyKeyHandler( nKey, @nSconto1 ) }
nCol+=78
@ nRow, nCol GET aGet[2] VAR nSconto2 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[3] VAR nSconto3 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[4] VAR nSconto4 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[5] VAR nSconto5 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
// Bottone di conferma
@ 90, 100 BUTTON "OK" SIZE 80, 30 PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
FUNCTION MyKeyHandler( nKey, nVar )
LOCAL cKey := Chr(nKey)
LOCAL cVal
IF cKey == "," .OR. cKey == "."
cVal := LTrim(Str(nVar, 10, 2))
IF "." $ cVal .OR. "," $ cVal
RETURN 0
ENDIF
cVal += ","
nVar := Val( StrTran(cVal, ",", ".") )
RETURN 0
ENDIF
RETURN nKey
Code: Select all | Expand
#include "fivewin.ch"
#include 'constant.ch'
#define DLG_nColorDlg RGB(245,245,235)
FUNCTION Main()
local oDlg
local nRow:= 10,nCol:=10
local nBottom:= 9
local nRight := 75
local nWd := Max( nRight * DLG_CHARPIX_W, 180 )
local nHt := nBottom * DLG_CHARPIX_H
local oFont,oBold
local oSay:=array(1)
local aGet:=array(5)
local cPicture:= "@EZ 999,99 %" //"@E ###,## %"
local nSizeGetSconto := 60
local nSconto1 := 0,;
nSconto2 := 0,;
nSconto3 := 0,;
nSconto4 := 0,;
nSconto5 := 0
oFont := TFont():New( "Arial", 0, -11 )
oBold := TFont():New( "Arial", 0, -11,,.t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "test get numerico %" COLOR CLR_BLACK, DLG_nColorDlg ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
@ nRow, nCol SAY oSay[1] PROMPT "Sconto %:" OF oDlg SIZE 75, 18 PIXEL FONT oFont TRANSPARENT
nCol+=110
@ nRow, nCol GET aGet[1] VAR nSconto1 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
aGet[1]:bChange := {|nKey|(Chr(nKey)$"0123456789.")}
//aGet[1]:bKeyDown := { | nKey |MyKeyHandler( nKey, @nSconto1 ) }
nCol+=78
@ nRow, nCol GET aGet[2] VAR nSconto2 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[3] VAR nSconto3 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[4] VAR nSconto4 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
nCol+=78
@ nRow, nCol GET aGet[5] VAR nSconto5 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture;
OF oDlg
// Bottone di conferma
@ 90, 100 BUTTON "OK" SIZE 80, 30 PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
FUNCTION MyKeyHandler( nKey, nVar )
LOCAL cKey := Chr(nKey)
LOCAL cVal
IF cKey == "," .OR. cKey == "."
cVal := LTrim(Str(nVar, 10, 2))
IF "." $ cVal .OR. "," $ cVal
RETURN 0
ENDIF
cVal += ","
nVar := Val( StrTran(cVal, ",", ".") )
RETURN 0
ENDIF
RETURN nKey
Code: Select all | Expand
@ 10,10 GET oGet VAR cBuf SIZE 60,18 OF oDlg
oGet:bChange := {|nKey| Chr(nKey) $ "0123456789,." .OR. nKey == VK_BACK ? nKey : 0 }
oGet:Valid := { ||
c := StrTran( cBuf, ",", "." ) // comma → period
n := Val( c ) // convert to numeric
IF n < 0 .OR. n > 100
MsgStop( "Invalid value: " + c )
RETURN .F.
ENDIF
nSconto1 := n // assign to your numeric variable
RETURN .T.
}
Code: Select all | Expand
@ 10,10 GET oGet VAR cBuf SIZE 60,18 OF oDlg
oGet:bChange := {|nKey| Chr(nKey) $ "0123456789,." .OR. nKey == VK_BACK ? nKey : 0 }
oGet:Valid := { ||
c := StrTran( cBuf, ",", "." ) // comma → period
n := Val( c ) // convert to numeric
IF n < 0 .OR. n > 100
MsgStop( "Invalid value: " + c )
RETURN .F.
ENDIF
nSconto1 := n // assign to your numeric variable
RETURN .T.
}
Code: Select all | Expand
if ::oGet:Type == "N" .and. ;
( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
if ::oGet:Clear()
#ifndef __XHARBOUR__
::oGet:DelEnd()
#endif
endif
::oGet:ToDecPos()
Code: Select all | Expand
if ::oGet:Type == "N" .and. ;
( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
if ::oGet:Clear()
#ifndef __XHARBOUR__
::oGet:DelEnd()
#endif
endif
::oGet:ToDecPos()
Code: Select all | Expand
#include "fivewin.ch"
#include 'constant.ch'
#define DLG_nColorDlg RGB(245,245,235)
FUNCTION Main()
local oDlg, oFont, oBold
local nRow := 10, nCol := 10
local nBottom := 9
local nRight := 75
local nWd := Max( nRight * DLG_CHARPIX_W, 180 )
local nHt := nBottom * DLG_CHARPIX_H
local oSay := array(5)
local aGet := array(5)
local cPicture := "@E 999999.99 %" // Formato per 6 cifre intere e 2 decimali
local nSizeGetSconto := 60
local nSconto1 := 0, nSconto2 := 0, nSconto3 := 0, nSconto4 := 0, nSconto5 := 0
oFont := TFont():New( "Arial", 0, -11 )
oBold := TFont():New( "Arial", 0, -11,, .t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "Test Get Numerico %" COLOR CLR_BLACK, DLG_nColorDlg;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, WS_MINIMIZEBOX)
@ nRow, nCol SAY oSay[1] PROMPT "Sconto %:" OF oDlg SIZE 75, 18 PIXEL FONT oFont TRANSPARENT
nCol += 110
@ nRow, nCol GET aGet[1] VAR nSconto1 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[1] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[1]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[1] ) }
nCol += 78
@ nRow, nCol SAY oSay[2] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[2] VAR nSconto2 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[2] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[2]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[2] ) }
nCol += 78
@ nRow, nCol SAY oSay[3] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[3] VAR nSconto3 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[3] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[3]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[3] ) }
nCol += 78
@ nRow, nCol SAY oSay[4] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[4] VAR nSconto4 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[4] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[4]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[4] ) }
nCol += 78
@ nRow, nCol SAY oSay[5] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[5] VAR nSconto5 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[5] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[5]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[5] ) }
@ 90, 100 BUTTON "OK" SIZE 80, 30 PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)
RETURN NIL
FUNCTION MyKeyHandler( nKey, oGet )
if oGet:oGet:Type == "N" .and. ( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
oGet:oGet:Assign( StrTran( oGet:oGet:Buffer, ".", "," ) )
oGet:oGet:ToDecPos()
oGet:Refresh()
return 0
endif
RETURN nKey
FUNCTION MyValid( oGet )
local nValue := oGet:Value
if nValue < 0 .or. nValue > 999999.99
MsgAlert( "Valore non valido! Deve essere tra 0 e 999999,99", "Errore" )
return .F.
endif
RETURN .T.
static Function UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlgEdit)
// Sconto 2
if nSconto1 > 0
oSay[2]:Show()
aGet[2]:Show()
else
oSay[2]:Hide()
aGet[2]:Hide()
nSconto2 := 0
endif
// Sconto 3
if nSconto2 > 0
oSay[3]:Show()
aGet[3]:Show()
else
oSay[3]:Hide()
aGet[3]:Hide()
nSconto3 := 0
endif
// Sconto 4
if nSconto3 > 0
oSay[4]:Show()
aGet[4]:Show()
else
oSay[4]:Hide()
aGet[4]:Hide()
nSconto4 := 0
endif
// Sconto 5
if nSconto4 > 0
oSay[5]:Show()
aGet[5]:Show()
else
oSay[5]:Hide()
aGet[5]:Hide()
nSconto5 := 0
endif
return .T.
/code]
but at init I see "0,00%" not Know how change to "0%"
[b]look carefully [/b] this function , so I call todecpos() becuse keychar method of tget class ( line 2335) not is processed
[code]FUNCTION MyKeyHandler( nKey, oGet )
if oGet:oGet:Type == "N" .and. ( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
oGet:oGet:Assign( StrTran( oGet:oGet:Buffer, ".", "," ) )
oGet:oGet:ToDecPos()
oGet:Refresh()
return 0
endif
RETURN nKey
Code: Select all | Expand
#include "fivewin.ch"
#include 'constant.ch'
#define DLG_nColorDlg RGB(245,245,235)
FUNCTION Main()
local oDlg, oFont, oBold
local nRow := 10, nCol := 10
local nBottom := 9
local nRight := 75
local nWd := Max( nRight * DLG_CHARPIX_W, 180 )
local nHt := nBottom * DLG_CHARPIX_H
local oSay := array(5)
local aGet := array(5)
local cPicture := "@E 999999.99 %" // Formato per 6 cifre intere e 2 decimali
local nSizeGetSconto := 60
local nSconto1 := 0, nSconto2 := 0, nSconto3 := 0, nSconto4 := 0, nSconto5 := 0
oFont := TFont():New( "Arial", 0, -11 )
oBold := TFont():New( "Arial", 0, -11,, .t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "Test Get Numerico %" COLOR CLR_BLACK, DLG_nColorDlg;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, WS_MINIMIZEBOX)
@ nRow, nCol SAY oSay[1] PROMPT "Sconto %:" OF oDlg SIZE 75, 18 PIXEL FONT oFont TRANSPARENT
nCol += 110
@ nRow, nCol GET aGet[1] VAR nSconto1 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[1] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[1]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[1] ) }
nCol += 78
@ nRow, nCol SAY oSay[2] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[2] VAR nSconto2 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[2] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[2]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[2] ) }
nCol += 78
@ nRow, nCol SAY oSay[3] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[3] VAR nSconto3 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[3] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[3]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[3] ) }
nCol += 78
@ nRow, nCol SAY oSay[4] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[4] VAR nSconto4 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[4] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[4]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[4] ) }
nCol += 78
@ nRow, nCol SAY oSay[5] PROMPT "+" OF oDlg SIZE 10, 20 PIXEL FONT oFont TRANSPARENT
nCol+=15
@ nRow, nCol GET aGet[5] VAR nSconto5 SIZE nSizeGetSconto, 18 PIXEL RIGHT;
PICTURE cPicture OF oDlg;
VALID {|| (MyValid( aGet[5] ),UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)) }
aGet[5]:bKeyDown := { |nKey| MyKeyHandler( nKey, aGet[5] ) }
@ 90, 100 BUTTON "OK" SIZE 80, 30 PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlg)
RETURN NIL
FUNCTION MyKeyHandler( nKey, oGet )
if oGet:oGet:Type == "N" .and. ( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
oGet:oGet:Assign( StrTran( oGet:oGet:Buffer, ".", "," ) )
oGet:oGet:ToDecPos()
oGet:Refresh()
return 0
endif
RETURN nKey
FUNCTION MyValid( oGet )
local nValue := oGet:Value
if nValue < 0 .or. nValue > 999999.99
MsgAlert( "Valore non valido! Deve essere tra 0 e 999999,99", "Errore" )
return .F.
endif
RETURN .T.
static Function UpdateSconti(nSconto1, nSconto2, nSconto3, nSconto4, nSconto5, aGet, oSay, oDlgEdit)
// Sconto 2
if nSconto1 > 0
oSay[2]:Show()
aGet[2]:Show()
else
oSay[2]:Hide()
aGet[2]:Hide()
nSconto2 := 0
endif
// Sconto 3
if nSconto2 > 0
oSay[3]:Show()
aGet[3]:Show()
else
oSay[3]:Hide()
aGet[3]:Hide()
nSconto3 := 0
endif
// Sconto 4
if nSconto3 > 0
oSay[4]:Show()
aGet[4]:Show()
else
oSay[4]:Hide()
aGet[4]:Hide()
nSconto4 := 0
endif
// Sconto 5
if nSconto4 > 0
oSay[5]:Show()
aGet[5]:Show()
else
oSay[5]:Hide()
aGet[5]:Hide()
nSconto5 := 0
endif
return .T.
/code]
but at init I see "0,00%" not Know how change to "0%"
[b]look carefully [/b] this function , so I call todecpos() becuse keychar method of tget class ( line 2335) not is processed
[code]FUNCTION MyKeyHandler( nKey, oGet )
if oGet:oGet:Type == "N" .and. ( Chr( nKey ) == "." .or. Chr( nKey ) == "," )
oGet:oGet:Assign( StrTran( oGet:oGet:Buffer, ".", "," ) )
oGet:oGet:ToDecPos()
oGet:Refresh()
return 0
endif
RETURN nKey
Code: Select all | Expand
#include "InKey.ch" // Required for VK_ constants
// Assuming oBrw is your TXBrowse object instance
oBrw:bKeyDown := {| nKey, nFlags, oBrowse |
local lCtrlDown
// Check if the Control key is pressed
// GetKeyState returns a negative value if the key is down.
lCtrlDown := ( GetKeyState( VK_CONTROL ) < 0 )
IF lCtrlDown
DO CASE
CASE nKey == VK_ADD // Numpad Plus key
// --- Your custom code for Ctrl + '+' ---
MsgInfo( "Ctrl + Numpad Plus detected!" )
// Example: Maybe change a custom property or call a function
// oBrowse:SomeCustomBackgroundResize( +1 )
// --------------------------------------
RETURN 0 // IMPORTANT: Prevent default FontSize(+1) action
CASE nKey == VK_SUBTRACT // Numpad Minus key
// --- Your custom code for Ctrl + '-' ---
MsgInfo( "Ctrl + Numpad Minus detected!" )
// Example:
// oBrowse:SomeCustomBackgroundResize( -1 )
// --------------------------------------
RETURN 0 // IMPORTANT: Prevent default FontSize(-1) action
/* // Optional: Handling for main keyboard +/- (less common/reliable for this)
CASE nKey == VK_OEM_PLUS .AND. GetKeyState( VK_SHIFT ) < 0 // Main keyboard '+' (usually needs Shift)
MsgInfo( "Ctrl + Main Plus detected!" )
RETURN 0
CASE nKey == VK_OEM_MINUS // Main keyboard '-'
MsgInfo( "Ctrl + Main Minus detected!" )
RETURN 0
*/
ENDCASE
ENDIF
// If the key wasn't handled above, return NIL to allow default processing
// for other keys (like arrows, Enter, etc.)
RETURN NIL
|}
// --- Rest of your browse setup and activation ---
// oBrw:CreateFromCode() or oBrw assigned in resource definition
// ACTIVATE WINDOW ...
Code: Select all | Expand
#include "InKey.ch" // Required for VK_ constants
// Assuming oBrw is your TXBrowse object instance
oBrw:bKeyDown := {| nKey, nFlags, oBrowse |
local lCtrlDown
// Check if the Control key is pressed
// GetKeyState returns a negative value if the key is down.
lCtrlDown := ( GetKeyState( VK_CONTROL ) < 0 )
IF lCtrlDown
DO CASE
CASE nKey == VK_ADD // Numpad Plus key
// --- Your custom code for Ctrl + '+' ---
MsgInfo( "Ctrl + Numpad Plus detected!" )
// Example: Maybe change a custom property or call a function
// oBrowse:SomeCustomBackgroundResize( +1 )
// --------------------------------------
RETURN 0 // IMPORTANT: Prevent default FontSize(+1) action
CASE nKey == VK_SUBTRACT // Numpad Minus key
// --- Your custom code for Ctrl + '-' ---
MsgInfo( "Ctrl + Numpad Minus detected!" )
// Example:
// oBrowse:SomeCustomBackgroundResize( -1 )
// --------------------------------------
RETURN 0 // IMPORTANT: Prevent default FontSize(-1) action
/* // Optional: Handling for main keyboard +/- (less common/reliable for this)
CASE nKey == VK_OEM_PLUS .AND. GetKeyState( VK_SHIFT ) < 0 // Main keyboard '+' (usually needs Shift)
MsgInfo( "Ctrl + Main Plus detected!" )
RETURN 0
CASE nKey == VK_OEM_MINUS // Main keyboard '-'
MsgInfo( "Ctrl + Main Minus detected!" )
RETURN 0
*/
ENDCASE
ENDIF
// If the key wasn't handled above, return NIL to allow default processing
// for other keys (like arrows, Enter, etc.)
RETURN NIL
|}
// --- Rest of your browse setup and activation ---
// oBrw:CreateFromCode() or oBrw assigned in resource definition
// ACTIVATE WINDOW ...
There is a possibility to use the /savecred, but the I have to enter the password manualy one time.Enter the password when prompted. The RunAs program demands that you type the password manually. This was a conscious design decision. If it were possible to pass the password on the command line, people would start embedding passwords into batch files and logon scripts, which is laughably insecure
There is a possibility to use the /savecred, but the I have to enter the password manualy one time.Enter the password when prompted. The RunAs program demands that you type the password manually. This was a conscious design decision. If it were possible to pass the password on the command line, people would start embedding passwords into batch files and logon scripts, which is laughably insecure
Code: Select all | Expand
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src="https://cdn.sheetjs.com/xlsx-latest/xlsx.full.min.js"></script>
<script>
document.getElementById("input").addEventListener("change", async (e) => {
const file = e.target.files[0];
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById("output").innerHTML = html;
});
</script>
Code: Select all | Expand
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src="https://cdn.sheetjs.com/xlsx-latest/xlsx.full.min.js"></script>
<script>
document.getElementById("input").addEventListener("change", async (e) => {
const file = e.target.files[0];
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById("output").innerHTML = html;
});
</script>
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView2():New()
oWebView:SetHtml( Html() )
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
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" )
oWebView:Run()
oWebView:End()
return nil
function Html()
local cHtml
TEXT INTO cHtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read Excel File</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
table {
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
#output p {
color: red;
}
</style>
</head>
<body>
<h1>Upload and Display Excel File</h1>
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src="https://cdn.sheetjs.com/xlsx-latest/xlsx.full.min.js"></script>
<script>
document.getElementById('input').addEventListener('change', async (e) => {
const file = e.target.files[0];
if (!file) return;
try {
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById('output').innerHTML = html;
} catch (error) {
console.error('Error reading file:', error);
document.getElementById('output').innerHTML = '<p>Error reading file.</p>';
}
});
</script>
</body>
</html>
ENDTEXT
return cHtml
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView2():New()
oWebView:SetHtml( Html() )
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
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" )
oWebView:Run()
oWebView:End()
return nil
function Html()
local cHtml
TEXT INTO cHtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read Excel File</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
table {
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
#output p {
color: red;
}
</style>
</head>
<body>
<h1>Upload and Display Excel File</h1>
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src="https://cdn.sheetjs.com/xlsx-latest/xlsx.full.min.js"></script>
<script>
document.getElementById('input').addEventListener('change', async (e) => {
const file = e.target.files[0];
if (!file) return;
try {
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById('output').innerHTML = html;
} catch (error) {
console.error('Error reading file:', error);
document.getElementById('output').innerHTML = '<p>Error reading file.</p>';
}
});
</script>
</body>
</html>
ENDTEXT
return cHtml
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView2():New()
oWebView:SetHtml( Html() )
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
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" )
// oWebView:OpenDevToolsWindow( .T. ) // Open DevTools
oWebView:Run()
oWebView:End()
return nil
function Html()
local cHtml
TEXT INTO cHtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read Excel File</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
table {
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
#output p {
color: red;
}
</style>
</head>
<body>
<h1>Upload and Display Excel File</h1>
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src=https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js></script>
<script>
document.getElementById('input').addEventListener('change', async (e) => {
const file = e.target.files[0];
if (!file) return;
try {
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById('output').innerHTML = html;
} catch (error) {
console.error('Error reading file:', error);
document.getElementById('output').innerHTML = '<p>Error reading file.</p>';
}
});
</script>
</body>
</html>
ENDTEXT
return cHtml
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView2():New()
oWebView:SetHtml( Html() )
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
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" )
// oWebView:OpenDevToolsWindow( .T. ) // Open DevTools
oWebView:Run()
oWebView:End()
return nil
function Html()
local cHtml
TEXT INTO cHtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read Excel File</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
table {
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
#output p {
color: red;
}
</style>
</head>
<body>
<h1>Upload and Display Excel File</h1>
<input type="file" id="input" accept=".xlsx, .xls" />
<div id="output"></div>
<script src=https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js></script>
<script>
document.getElementById('input').addEventListener('change', async (e) => {
const file = e.target.files[0];
if (!file) return;
try {
const data = await file.arrayBuffer();
const workbook = XLSX.read(data);
const firstSheet = workbook.Sheets[workbook.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(firstSheet);
document.getElementById('output').innerHTML = html;
} catch (error) {
console.error('Error reading file:', error);
document.getElementById('output').innerHTML = '<p>Error reading file.</p>';
}
});
</script>
</body>
</html>
ENDTEXT
return cHtml
Code: Select all | Expand
#include "fivewin.ch"
static aStr := { "localhost,fwh,fivetec1_antonio,1234" }
static oCn
//----------------------------------------------------------------------------//
function Main()
local oRs, cSql, oDlg
FWSetLanguage( 1 )
FW_SetUnicode( .t. )
if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil
TEXT INTO cSql
SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName
FROM customer C
LEFT OUTER JOIN states S ON C.STATE = S.CODE
ORDER BY CUSTID
ENDTEXT
oRs := oCn:RowSet( cSql )
DEFINE DIALOG oDlg
@ 1, 1 GET oRs:CustName OF oDlg
@ 3, 1 GET oRs:St OF oDlg
ACTIVATE DIALOG oDlg CENTERED
oCn:Close()
endif
return nil
Code: Select all | Expand
#include "fivewin.ch"
static aStr := { "localhost,fwh,fivetec1_antonio,1234" }
static oCn
//----------------------------------------------------------------------------//
function Main()
local oRs, cSql, oDlg
FWSetLanguage( 1 )
FW_SetUnicode( .t. )
if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil
TEXT INTO cSql
SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName
FROM customer C
LEFT OUTER JOIN states S ON C.STATE = S.CODE
ORDER BY CUSTID
ENDTEXT
oRs := oCn:RowSet( cSql )
DEFINE DIALOG oDlg
@ 1, 1 GET oRs:CustName OF oDlg
@ 3, 1 GET oRs:St OF oDlg
ACTIVATE DIALOG oDlg CENTERED
oCn:Close()
endif
return nil
]]>Antonio Linares wrote: Mon Apr 21, 2025 8:21 am Dear Dutch,
This example is working fine here with Harbour and xHarbour, when pasting on the first GET:
modified maria02.prgCode: Select all | Expand
#include "fivewin.ch" static aStr := { "localhost,fwh,fivetec1_antonio,1234" } static oCn //----------------------------------------------------------------------------// function Main() local oRs, cSql, oDlg FWSetLanguage( 1 ) FW_SetUnicode( .t. ) if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil TEXT INTO cSql SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName FROM customer C LEFT OUTER JOIN states S ON C.STATE = S.CODE ORDER BY CUSTID ENDTEXT oRs := oCn:RowSet( cSql ) DEFINE DIALOG oDlg @ 1, 1 GET oRs:CustName OF oDlg @ 3, 1 GET oRs:St OF oDlg ACTIVATE DIALOG oDlg CENTERED oCn:Close() endif return nil
]]>Antonio Linares wrote: Mon Apr 21, 2025 8:21 am Dear Dutch,
This example is working fine here with Harbour and xHarbour, when pasting on the first GET:
modified maria02.prgCode: Select all | Expand
#include "fivewin.ch" static aStr := { "localhost,fwh,fivetec1_antonio,1234" } static oCn //----------------------------------------------------------------------------// function Main() local oRs, cSql, oDlg FWSetLanguage( 1 ) FW_SetUnicode( .t. ) if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil TEXT INTO cSql SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName FROM customer C LEFT OUTER JOIN states S ON C.STATE = S.CODE ORDER BY CUSTID ENDTEXT oRs := oCn:RowSet( cSql ) DEFINE DIALOG oDlg @ 1, 1 GET oRs:CustName OF oDlg @ 3, 1 GET oRs:St OF oDlg ACTIVATE DIALOG oDlg CENTERED oCn:Close() endif return nil
]]>ertan wrote: Tue Apr 22, 2025 1:09 pm Hi Dutch,
This problem is fixed in Fivewin 25.01
Can you rebuild the fivewin libraries?
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Tue Apr 22, 2025 1:09 pm Hi Dutch,
This problem is fixed in Fivewin 25.01
Can you rebuild the fivewin libraries?
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Tue Apr 22, 2025 2:00 pm Hi again Dutch,
I will check and test again before share details with Mr.Antonio Linares
The problem is in the files source\api\clpbrd.c and fwunicode.c
Best regards,
Ertan Hakan ÖZTÜRK,
ertan_ozturk@yahoo.com
]]>ertan wrote: Tue Apr 22, 2025 2:00 pm Hi again Dutch,
I will check and test again before share details with Mr.Antonio Linares
The problem is in the files source\api\clpbrd.c and fwunicode.c
Best regards,
Ertan Hakan ÖZTÜRK,
ertan_ozturk@yahoo.com
I got it, thanks in advance,unicode.c changed to fwunicode.c in fivewin 25.01
]]>ertan wrote: Tue Apr 22, 2025 2:19 pm Hi Dutch,
My DB Engine is MariaDB and I use always BCC with Harbour.
I need to check your problem in [x]Harbour
I need a litle time, Don't worry. Please...
unicode.c changed to fwunicode.c in fivewin 25.01
Best regards,
Ertan Hakan ÖZTÜRK,
ertan_ozturk@yahoo.com
I got it, thanks in advance,unicode.c changed to fwunicode.c in fivewin 25.01
]]>ertan wrote: Tue Apr 22, 2025 2:19 pm Hi Dutch,
My DB Engine is MariaDB and I use always BCC with Harbour.
I need to check your problem in [x]Harbour
I need a litle time, Don't worry. Please...
unicode.c changed to fwunicode.c in fivewin 25.01
Best regards,
Ertan Hakan ÖZTÜRK,
ertan_ozturk@yahoo.com
]]>ertan wrote: Tue Apr 22, 2025 8:24 pm Hi again Dutch,
Can you send me an e-mail for testing?
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Tue Apr 22, 2025 8:24 pm Hi again Dutch,
Can you send me an e-mail for testing?
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Wed Apr 23, 2025 4:24 am Dear Dutch,
I sent your email.
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Wed Apr 23, 2025 4:24 am Dear Dutch,
I sent your email.
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Wed Apr 23, 2025 10:02 am Dear Dutch,
I try reproduce your error and analysis this with xHarbour
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>ertan wrote: Wed Apr 23, 2025 10:02 am Dear Dutch,
I try reproduce your error and analysis this with xHarbour
Best regards,
Ertan Hakan ÖZTÜRK
ertan_ozturk@yahoo.com
]]>Antonio Linares wrote: Mon Apr 21, 2025 8:21 am Dear Dutch,
This example is working fine here with Harbour and xHarbour, when pasting on the first GET:
modified maria02.prgCode: Select all | Expand
#include "fivewin.ch" static aStr := { "localhost,fwh,fivetec1_antonio,1234" } static oCn //----------------------------------------------------------------------------// function Main() local oRs, cSql, oDlg FWSetLanguage( 1 ) FW_SetUnicode( .t. ) if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil TEXT INTO cSql SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName FROM customer C LEFT OUTER JOIN states S ON C.STATE = S.CODE ORDER BY CUSTID ENDTEXT oRs := oCn:RowSet( cSql ) DEFINE DIALOG oDlg @ 1, 1 GET oRs:CustName OF oDlg @ 3, 1 GET oRs:St OF oDlg ACTIVATE DIALOG oDlg CENTERED oCn:Close() endif return nil
]]>Antonio Linares wrote: Mon Apr 21, 2025 8:21 am Dear Dutch,
This example is working fine here with Harbour and xHarbour, when pasting on the first GET:
modified maria02.prgCode: Select all | Expand
#include "fivewin.ch" static aStr := { "localhost,fwh,fivetec1_antonio,1234" } static oCn //----------------------------------------------------------------------------// function Main() local oRs, cSql, oDlg FWSetLanguage( 1 ) FW_SetUnicode( .t. ) if ( oCn := maria_Connect( aStr[ 1 ], .t. ) ) != nil TEXT INTO cSql SELECT C.ID AS CustID, C.FIRST AS CustName, C.AGE AS AG, C.STATE AS ST, S.NAME AS StateName FROM customer C LEFT OUTER JOIN states S ON C.STATE = S.CODE ORDER BY CUSTID ENDTEXT oRs := oCn:RowSet( cSql ) DEFINE DIALOG oDlg @ 1, 1 GET oRs:CustName OF oDlg @ 3, 1 GET oRs:St OF oDlg ACTIVATE DIALOG oDlg CENTERED oCn:Close() endif return nil
]]>Antonio Linares wrote: Fri Apr 25, 2025 3:14 am Dear Dutch,
Already sent by email a working 2304 version
Waiting for your feedback
]]>Antonio Linares wrote: Fri Apr 25, 2025 3:14 am Dear Dutch,
Already sent by email a working 2304 version
Waiting for your feedback
Code: Select all | Expand
#ifdef REMOVED
/*
hb_arraySetND( aRow, i + 1, ( mrow[ i ] == NULL ? 0.0 : hb_strVal( mrow[ i ], aLen[ i ] ) ) );
break; // loss of accuracy in case of bigint large numbers
*/
/*
// nor working in case of double datatpe with large numbers
if( ! hb_valStrnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue, &iDec, &iWidth ) )
{
hb_arraySetNL( aRow, i + 1, ( long ) lValue );
}
else
{
hb_itemPutNDLen( itemTmp, dValue, iWidth, iDec );
hb_arraySetForward( aRow, i + 1, itemTmp );
}
break;
*/
#endif
Code: Select all | Expand
case 'N':
if ( ( nAt = ( int ) hb_strAtI( "e", 1, mrow[ i ], aLen[ i ] ) ) > 0 )
{
dValue = hb_strVal( mrow[ i ], aLen[ i ] );
x = ( int ) hb_strVal( mrow[ i ] + nAt, aLen[ i ] - nAt );
dValue *= pow( ( double ) 10.0, ( double ) x );
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
if ( hb_strnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue ) )
{
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
hb_arraySetNLL( aRow, i + 1, lValue );
}
}
break;
Code: Select all | Expand
#ifdef REMOVED
/*
hb_arraySetND( aRow, i + 1, ( mrow[ i ] == NULL ? 0.0 : hb_strVal( mrow[ i ], aLen[ i ] ) ) );
break; // loss of accuracy in case of bigint large numbers
*/
/*
// nor working in case of double datatpe with large numbers
if( ! hb_valStrnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue, &iDec, &iWidth ) )
{
hb_arraySetNL( aRow, i + 1, ( long ) lValue );
}
else
{
hb_itemPutNDLen( itemTmp, dValue, iWidth, iDec );
hb_arraySetForward( aRow, i + 1, itemTmp );
}
break;
*/
#endif
Code: Select all | Expand
case 'N':
if ( ( nAt = ( int ) hb_strAtI( "e", 1, mrow[ i ], aLen[ i ] ) ) > 0 )
{
dValue = hb_strVal( mrow[ i ], aLen[ i ] );
x = ( int ) hb_strVal( mrow[ i ] + nAt, aLen[ i ] - nAt );
dValue *= pow( ( double ) 10.0, ( double ) x );
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
if ( hb_strnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue ) )
{
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
hb_arraySetNLL( aRow, i + 1, lValue );
}
}
break;
Code: Select all | Expand
#ifdef REMOVED
/*
hb_arraySetND( aRow, i + 1, ( mrow[ i ] == NULL ? 0.0 : hb_strVal( mrow[ i ], aLen[ i ] ) ) );
break; // loss of accuracy in case of bigint large numbers
*/
/*
// nor working in case of double datatpe with large numbers
if( ! hb_valStrnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue, &iDec, &iWidth ) )
{
hb_arraySetNL( aRow, i + 1, ( long ) lValue );
}
else
{
hb_itemPutNDLen( itemTmp, dValue, iWidth, iDec );
hb_arraySetForward( aRow, i + 1, itemTmp );
}
break;
*/
#endif
Code: Select all | Expand
case 'N':
if ( ( nAt = ( int ) hb_strAtI( "e", 1, mrow[ i ], aLen[ i ] ) ) > 0 )
{
dValue = hb_strVal( mrow[ i ], aLen[ i ] );
x = ( int ) hb_strVal( mrow[ i ] + nAt, aLen[ i ] - nAt );
dValue *= pow( ( double ) 10.0, ( double ) x );
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
if ( hb_strnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue ) )
{
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
hb_arraySetNLL( aRow, i + 1, lValue );
}
}
break;
Code: Select all | Expand
#ifdef REMOVED
/*
hb_arraySetND( aRow, i + 1, ( mrow[ i ] == NULL ? 0.0 : hb_strVal( mrow[ i ], aLen[ i ] ) ) );
break; // loss of accuracy in case of bigint large numbers
*/
/*
// nor working in case of double datatpe with large numbers
if( ! hb_valStrnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue, &iDec, &iWidth ) )
{
hb_arraySetNL( aRow, i + 1, ( long ) lValue );
}
else
{
hb_itemPutNDLen( itemTmp, dValue, iWidth, iDec );
hb_arraySetForward( aRow, i + 1, itemTmp );
}
break;
*/
#endif
Code: Select all | Expand
case 'N':
if ( ( nAt = ( int ) hb_strAtI( "e", 1, mrow[ i ], aLen[ i ] ) ) > 0 )
{
dValue = hb_strVal( mrow[ i ], aLen[ i ] );
x = ( int ) hb_strVal( mrow[ i ] + nAt, aLen[ i ] - nAt );
dValue *= pow( ( double ) 10.0, ( double ) x );
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
if ( hb_strnToNum( mrow[ i ], aLen[ i ], &lValue, &dValue ) )
{
hb_arraySetND( aRow, i + 1, dValue );
}
else
{
hb_arraySetNLL( aRow, i + 1, lValue );
}
}
break;
Code: Select all | Expand
local oCl
private oWnd
oCl:=TGet():New(100, 100, " ", oWnd:aControls[1], 500, 20, replicate("X", 35),, ;
CLR_BLACK, RGB(245, 245, 245),,,, .T.,,,, .T.)
oBt:=TButton():New(0, oCl:nWidth-22,"...", oCl,, 20, oCl:nHeight-2,,,, .T.)
oBt:bAction:={||Mnu_Tls()}
Code: Select all | Expand
procedure Mnu_Tls
local st, dim:=getcursorpos(), mas:={"One","Two","Three"}
local oMen, oCl
MENU oMen POPUP 2007
for st=1 to len(mas)
if st>1
SEPARATOR
endif
MENUITEM oCl PROMPT mas[st]
oCl:bAction:=&('{||oWnd:aControls[1]:aControls[1]:cText(" '+ mas[st]+' '")}')
next
ENDMENU
ACTIVATE POPUP oMen OF oWnd AT dim[1], dim[2]
return
Code: Select all | Expand
oCl:bAction:=&('{||oWnd:aControls[1]:aControls[1]:cText(" '+ mas[st]+' '"), msginfo(123)}')
Code: Select all | Expand
local oCl
private oWnd
oCl:=TGet():New(100, 100, " ", oWnd:aControls[1], 500, 20, replicate("X", 35),, ;
CLR_BLACK, RGB(245, 245, 245),,,, .T.,,,, .T.)
oBt:=TButton():New(0, oCl:nWidth-22,"...", oCl,, 20, oCl:nHeight-2,,,, .T.)
oBt:bAction:={||Mnu_Tls()}
Code: Select all | Expand
procedure Mnu_Tls
local st, dim:=getcursorpos(), mas:={"One","Two","Three"}
local oMen, oCl
MENU oMen POPUP 2007
for st=1 to len(mas)
if st>1
SEPARATOR
endif
MENUITEM oCl PROMPT mas[st]
oCl:bAction:=&('{||oWnd:aControls[1]:aControls[1]:cText(" '+ mas[st]+' '")}')
next
ENDMENU
ACTIVATE POPUP oMen OF oWnd AT dim[1], dim[2]
return
Code: Select all | Expand
oCl:bAction:=&('{||oWnd:aControls[1]:aControls[1]:cText(" '+ mas[st]+' '"), msginfo(123)}')
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
private oA
DEFINE DIALOG oA FROM 2, 2 TO 30, 60 TITLE "First dialog"
oA:bRClicked = { | nRow, nCol, nFlags | New_Dlg() }
ACTIVATE DIALOG oA CENTERED
return nil
function New_Dlg
local oB
DEFINE DIALOG oB OF oA FROM 2, 2 TO 20, 50 TITLE "Second dialog"
ACTIVATE DIALOG oB CENTERED
return nil
]]>Code: Select all | Expand
#include "FiveWin.ch"
function Main()
private oA
DEFINE DIALOG oA FROM 2, 2 TO 30, 60 TITLE "First dialog"
oA:bRClicked = { | nRow, nCol, nFlags | New_Dlg() }
ACTIVATE DIALOG oA CENTERED
return nil
function New_Dlg
local oB
DEFINE DIALOG oB OF oA FROM 2, 2 TO 20, 50 TITLE "Second dialog"
ACTIVATE DIALOG oB CENTERED
return nil
]]>Code: Select all | Expand
#include "FiveWin.ch"
// STATIC oDlg, oDlg2 // .or.
MEMVAR oDlg, oDlg2
FUNCTION Main()
LOCAL oGet, oGet2, oBtn, Capt := Space( 10 ), Capt2 := " "
DEFINE DIALOG oDlg FROM 2, 2 TO 30, 60 TITLE "First dialog"
oDlg:lHelpIcon := .F.
oDlg:bRClicked = {| nRow, nCol, nFlags | New_Dlg() }
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
FUNCTION New_Dlg()
DEFINE DIALOG oDlg2 OF oDlg FROM 2, 2 TO 20, 50 TITLE "Second dialog"
oDlg2:lHelpIcon := .F.
ACTIVATE DIALOG oDlg2 CENTERED
RETURN NIL
// FIN / END
Regards, saludos.]]>Code: Select all | Expand
#include "FiveWin.ch"
// STATIC oDlg, oDlg2 // .or.
MEMVAR oDlg, oDlg2
FUNCTION Main()
LOCAL oGet, oGet2, oBtn, Capt := Space( 10 ), Capt2 := " "
DEFINE DIALOG oDlg FROM 2, 2 TO 30, 60 TITLE "First dialog"
oDlg:lHelpIcon := .F.
oDlg:bRClicked = {| nRow, nCol, nFlags | New_Dlg() }
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
FUNCTION New_Dlg()
DEFINE DIALOG oDlg2 OF oDlg FROM 2, 2 TO 20, 50 TITLE "Second dialog"
oDlg2:lHelpIcon := .F.
ACTIVATE DIALOG oDlg2 CENTERED
RETURN NIL
// FIN / END
Regards, saludos.]]>Code: Select all | Expand
@ 10, 10 SCROLLIMG oScroll ;
PATH cImagePath ;
BANNERS aBanners ;
SPEED 2 ;
MODE 1 ;
SIZE 300, 30 ;
BORDER ;
COLORBORDER nRGB(150,150,150) ;
OF oDlg
Code: Select all | Expand
@ 10, 10 SCROLLIMG oScroll ;
PATH cImagePath ;
BANNERS aBanners ;
SPEED 2 ;
MODE 1 ;
SIZE 300, 30 ;
BORDER ;
COLORBORDER nRGB(150,150,150) ;
OF oDlg
Code: Select all | Expand
@ 10, 10 SCROLLIMG oScroll ;
PATH cImagePath ;
BANNERS aBanners ;
SPEED 2 ;
MODE 1 ;
SIZE 300, 30 ;
BORDER ;
COLORBORDER nRGB(150,150,150) ;
OF oDlg
Code: Select all | Expand
ReDefine CROLLIMG oScroll ID 300 OF oDlg
.....
Code: Select all | Expand
@ 10, 10 SCROLLIMG oScroll ;
PATH cImagePath ;
BANNERS aBanners ;
SPEED 2 ;
MODE 1 ;
SIZE 300, 30 ;
BORDER ;
COLORBORDER nRGB(150,150,150) ;
OF oDlg
Code: Select all | Expand
ReDefine CROLLIMG oScroll ID 300 OF oDlg
.....
Code: Select all | Expand
#include "FiveWin.ch"
#include "scrollimg.ch"
function Main()
local oDlg, oScroll
local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\"
local aBanners := { ;
{ "Bosch.png", "www.bosch.it" },;
{ "Brother.png", "www.brother.it" },;
{ "Canon.png", "www.canon.it" },;
{ "De-Longhi.png", "www.delonghi.com" },;
{ "ELECTROLUX-REX.png", "www.electrolux.it" },;
{ "HOTPOINT.png", "www.hotpoint.it" },;
{ "INDESIT.png", "www.indesit.it" },;
{ "KENSINGTON.png", "www.kensington.com" },;
{ "LEXMARK.png", "www.lexmark.com" },;
{ "LOGITECH.png", "www.logitech.com" },;
{ "MSI.png", "www.msi.com" },;
{ "OKI.png", "www.oki.com" },;
{ "PURO.png", "www.puro.it" },;
{ "RICOH.png", "www.ricoh.it" }}
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE SCROLLIMG oScroll ;
ID 300 ;
OF oDlg ;
PATH cImagePath ;
BANNERS aBanners ;
BORDER ;
COLORBORDER CLR_YELLOW
ACTIVATE DIALOG oDlg
return nil
Code: Select all | Expand
#include "FiveWin.ch"
#include "scrollimg.ch"
function Main()
local oDlg, oScroll
local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\"
local aBanners := { ;
{ "Bosch.png", "www.bosch.it" },;
{ "Brother.png", "www.brother.it" },;
{ "Canon.png", "www.canon.it" },;
{ "De-Longhi.png", "www.delonghi.com" },;
{ "ELECTROLUX-REX.png", "www.electrolux.it" },;
{ "HOTPOINT.png", "www.hotpoint.it" },;
{ "INDESIT.png", "www.indesit.it" },;
{ "KENSINGTON.png", "www.kensington.com" },;
{ "LEXMARK.png", "www.lexmark.com" },;
{ "LOGITECH.png", "www.logitech.com" },;
{ "MSI.png", "www.msi.com" },;
{ "OKI.png", "www.oki.com" },;
{ "PURO.png", "www.puro.it" },;
{ "RICOH.png", "www.ricoh.it" }}
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE SCROLLIMG oScroll ;
ID 300 ;
OF oDlg ;
PATH cImagePath ;
BANNERS aBanners ;
BORDER ;
COLORBORDER CLR_YELLOW
ACTIVATE DIALOG oDlg
return nil
Code: Select all | Expand
#include "FiveWin.ch"
#include "scrollimg.ch"
function Main()
local oDlg, oScroll
local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\"
local aBanners := { ;
{ "Bosch.png", "www.bosch.it" },;
{ "Brother.png", "www.brother.it" },;
{ "Canon.png", "www.canon.it" },;
{ "De-Longhi.png", "www.delonghi.com" },;
{ "ELECTROLUX-REX.png", "www.electrolux.it" },;
{ "HOTPOINT.png", "www.hotpoint.it" },;
{ "INDESIT.png", "www.indesit.it" },;
{ "KENSINGTON.png", "www.kensington.com" },;
{ "LEXMARK.png", "www.lexmark.com" },;
{ "LOGITECH.png", "www.logitech.com" },;
{ "MSI.png", "www.msi.com" },;
{ "OKI.png", "www.oki.com" },;
{ "PURO.png", "www.puro.it" },;
{ "RICOH.png", "www.ricoh.it" }}
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE SCROLLIMG oScroll ;
ID 300 ;
OF oDlg ;
PATH cImagePath ;
BANNERS aBanners ;
BORDER ;
COLORBORDER CLR_YELLOW
ACTIVATE DIALOG oDlg
return nil
Code: Select all | Expand
#include "FiveWin.ch"
#include "scrollimg.ch"
function Main()
local oDlg, oScroll
local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\"
local aBanners := { ;
{ "Bosch.png", "www.bosch.it" },;
{ "Brother.png", "www.brother.it" },;
{ "Canon.png", "www.canon.it" },;
{ "De-Longhi.png", "www.delonghi.com" },;
{ "ELECTROLUX-REX.png", "www.electrolux.it" },;
{ "HOTPOINT.png", "www.hotpoint.it" },;
{ "INDESIT.png", "www.indesit.it" },;
{ "KENSINGTON.png", "www.kensington.com" },;
{ "LEXMARK.png", "www.lexmark.com" },;
{ "LOGITECH.png", "www.logitech.com" },;
{ "MSI.png", "www.msi.com" },;
{ "OKI.png", "www.oki.com" },;
{ "PURO.png", "www.puro.it" },;
{ "RICOH.png", "www.ricoh.it" }}
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE SCROLLIMG oScroll ;
ID 300 ;
OF oDlg ;
PATH cImagePath ;
BANNERS aBanners ;
BORDER ;
COLORBORDER CLR_YELLOW
ACTIVATE DIALOG oDlg
return nil
Dear Silvio,Silvio.Falconi wrote: Sun Apr 27, 2025 6:39 pm No Problems.
sample:
Code: Select all | Expand
#include "FiveWin.ch" #include "scrollimg.ch" function Main() local oDlg, oScroll local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\" local aBanners := { ; { "Bosch.png", "www.bosch.it" },; { "Brother.png", "www.brother.it" },; { "Canon.png", "www.canon.it" },; { "De-Longhi.png", "www.delonghi.com" },; { "ELECTROLUX-REX.png", "www.electrolux.it" },; { "HOTPOINT.png", "www.hotpoint.it" },; { "INDESIT.png", "www.indesit.it" },; { "KENSINGTON.png", "www.kensington.com" },; { "LEXMARK.png", "www.lexmark.com" },; { "LOGITECH.png", "www.logitech.com" },; { "MSI.png", "www.msi.com" },; { "OKI.png", "www.oki.com" },; { "PURO.png", "www.puro.it" },; { "RICOH.png", "www.ricoh.it" }} DEFINE DIALOG oDlg RESOURCE "Test" REDEFINE SCROLLIMG oScroll ; ID 300 ; OF oDlg ; PATH cImagePath ; BANNERS aBanners ; BORDER ; COLORBORDER CLR_YELLOW ACTIVATE DIALOG oDlg return nil
Dear Silvio,Silvio.Falconi wrote: Sun Apr 27, 2025 6:39 pm No Problems.
sample:
Code: Select all | Expand
#include "FiveWin.ch" #include "scrollimg.ch" function Main() local oDlg, oScroll local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\" local aBanners := { ; { "Bosch.png", "www.bosch.it" },; { "Brother.png", "www.brother.it" },; { "Canon.png", "www.canon.it" },; { "De-Longhi.png", "www.delonghi.com" },; { "ELECTROLUX-REX.png", "www.electrolux.it" },; { "HOTPOINT.png", "www.hotpoint.it" },; { "INDESIT.png", "www.indesit.it" },; { "KENSINGTON.png", "www.kensington.com" },; { "LEXMARK.png", "www.lexmark.com" },; { "LOGITECH.png", "www.logitech.com" },; { "MSI.png", "www.msi.com" },; { "OKI.png", "www.oki.com" },; { "PURO.png", "www.puro.it" },; { "RICOH.png", "www.ricoh.it" }} DEFINE DIALOG oDlg RESOURCE "Test" REDEFINE SCROLLIMG oScroll ; ID 300 ; OF oDlg ; PATH cImagePath ; BANNERS aBanners ; BORDER ; COLORBORDER CLR_YELLOW ACTIVATE DIALOG oDlg return nil
I'm really confused, I don't understand your question...richard-service wrote: Mon Apr 28, 2025 1:27 amDear Silvio,Silvio.Falconi wrote: Sun Apr 27, 2025 6:39 pm No Problems.
sample:
Code: Select all | Expand
#include "FiveWin.ch" #include "scrollimg.ch" function Main() local oDlg, oScroll local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\" local aBanners := { ; { "Bosch.png", "www.bosch.it" },; { "Brother.png", "www.brother.it" },; { "Canon.png", "www.canon.it" },; { "De-Longhi.png", "www.delonghi.com" },; { "ELECTROLUX-REX.png", "www.electrolux.it" },; { "HOTPOINT.png", "www.hotpoint.it" },; { "INDESIT.png", "www.indesit.it" },; { "KENSINGTON.png", "www.kensington.com" },; { "LEXMARK.png", "www.lexmark.com" },; { "LOGITECH.png", "www.logitech.com" },; { "MSI.png", "www.msi.com" },; { "OKI.png", "www.oki.com" },; { "PURO.png", "www.puro.it" },; { "RICOH.png", "www.ricoh.it" }} DEFINE DIALOG oDlg RESOURCE "Test" REDEFINE SCROLLIMG oScroll ; ID 300 ; OF oDlg ; PATH cImagePath ; BANNERS aBanners ; BORDER ; COLORBORDER CLR_YELLOW ACTIVATE DIALOG oDlg return nil
Good job.
May I set Frame function disable? Show or Hide ...
I'm really confused, I don't understand your question...richard-service wrote: Mon Apr 28, 2025 1:27 amDear Silvio,Silvio.Falconi wrote: Sun Apr 27, 2025 6:39 pm No Problems.
sample:
Code: Select all | Expand
#include "FiveWin.ch" #include "scrollimg.ch" function Main() local oDlg, oScroll local cImagePath := cFilePath( GetModuleFileName( GetInstance() ) ) + "Bitmaps\" local aBanners := { ; { "Bosch.png", "www.bosch.it" },; { "Brother.png", "www.brother.it" },; { "Canon.png", "www.canon.it" },; { "De-Longhi.png", "www.delonghi.com" },; { "ELECTROLUX-REX.png", "www.electrolux.it" },; { "HOTPOINT.png", "www.hotpoint.it" },; { "INDESIT.png", "www.indesit.it" },; { "KENSINGTON.png", "www.kensington.com" },; { "LEXMARK.png", "www.lexmark.com" },; { "LOGITECH.png", "www.logitech.com" },; { "MSI.png", "www.msi.com" },; { "OKI.png", "www.oki.com" },; { "PURO.png", "www.puro.it" },; { "RICOH.png", "www.ricoh.it" }} DEFINE DIALOG oDlg RESOURCE "Test" REDEFINE SCROLLIMG oScroll ; ID 300 ; OF oDlg ; PATH cImagePath ; BANNERS aBanners ; BORDER ; COLORBORDER CLR_YELLOW ACTIVATE DIALOG oDlg return nil
Good job.
May I set Frame function disable? Show or Hide ...
Thank your very much for providing the text prompt and ToolTip. Its a nicefirst release add also the tooltip
The length of the text must be equal to the width of the image
Thank your very much for providing the text prompt and ToolTip. Its a nicefirst release add also the tooltip
The length of the text must be equal to the width of the image
Thank your very much for providing the text prompt and ToolTip. Its a nicefirst release add also the tooltip
The length of the text must be equal to the width of the image
Thank your very much for providing the text prompt and ToolTip. Its a nicefirst release add also the tooltip
The length of the text must be equal to the width of the image
Code: Select all | Expand
[ScrollImg]
LeftImage01= 582.00
TopImage01= 31.00
LeftImage02= 732.00
TopImage02= 31.00
LeftImage03= 882.00
TopImage03= 31.00
LeftImage04= 1032.00
TopImage04= 31.00
LeftImage05= 1182.00
TopImage05= 31.00
LeftImage06= 1332.00
TopImage06= 31.00
LeftImage07= 1482.00
TopImage07= 31.00
LeftImage08= 1632.00
TopImage08= 31.00
LeftImage09= 1782.00
TopImage09= 31.00
LeftImage10= 1932.00
TopImage10= 31.00
LeftImage11= 2082.00
TopImage11= 31.00
LeftImage12= 2232.00
TopImage12= 31.00
LeftImage13= 2382.00
TopImage13= 31.00
LeftImage14= 2532.00
TopImage14= 31.00
Speed= 5.00
Paused=0
Running=1
CycleCounter= 0
Code: Select all | Expand
[ScrollImg]
LeftImage01= 582.00
TopImage01= 31.00
LeftImage02= 732.00
TopImage02= 31.00
LeftImage03= 882.00
TopImage03= 31.00
LeftImage04= 1032.00
TopImage04= 31.00
LeftImage05= 1182.00
TopImage05= 31.00
LeftImage06= 1332.00
TopImage06= 31.00
LeftImage07= 1482.00
TopImage07= 31.00
LeftImage08= 1632.00
TopImage08= 31.00
LeftImage09= 1782.00
TopImage09= 31.00
LeftImage10= 1932.00
TopImage10= 31.00
LeftImage11= 2082.00
TopImage11= 31.00
LeftImage12= 2232.00
TopImage12= 31.00
LeftImage13= 2382.00
TopImage13= 31.00
LeftImage14= 2532.00
TopImage14= 31.00
Speed= 5.00
Paused=0
Running=1
CycleCounter= 0
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
ON CHANGE ( oThis:ChangeSizeBrw( nIndex ) )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
Code: Select all | Expand
If nIndex==5
EXIT
Endif
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
ON CHANGE ( oThis:ChangeSizeBrw( nIndex ) )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
Code: Select all | Expand
If nIndex==5
EXIT
Endif
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
::aControls[ nIndex ]:bChanged = GenChangeBlock( ::aControls[ nIndex ], nIndex )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
function GenChangeBlock( oCbx, nIndex )
return { || oCbx:ChageSizeBrw( nIndex ) }
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
::aControls[ nIndex ]:bChanged = GenChangeBlock( ::aControls[ nIndex ], nIndex )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
function GenChangeBlock( oCbx, nIndex )
return { || oCbx:ChageSizeBrw( nIndex ) }
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
::aControls[ nIndex ]:bChanged = GenChangeBlock( ::aControls[ nIndex ], nIndex )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
function GenChangeBlock( oCbx, nIndex )
return { || oCbx:ChageSizeBrw( nIndex ) }
Code: Select all | Expand
Error occurred at: 05/09/25, 14:19:59
Error description: Error BASE/1004 Message not found: TCHECKBOX:CHAGESIZEBRW
Args:
[ 1] = O TCHECKBOX
Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:CHAGESIZEBRW( 0 )
Called from: Tfiltro.prg => (b)GENCHANGEBLOCK( 104 )
Called from: .\source\classes\checkbox.prg => TCHECKBOX:CLICK( 153 )
Called from: .\source\classes\control.prg => TCHECKBOX:HANDLEEVENT( 18
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
::aControls[ nIndex ]:bChanged = GenChangeBlock( ::aControls[ nIndex ], nIndex )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
function GenChangeBlock( oCbx, nIndex )
return { || oCbx:ChageSizeBrw( nIndex ) }
Code: Select all | Expand
Error occurred at: 05/09/25, 14:19:59
Error description: Error BASE/1004 Message not found: TCHECKBOX:CHAGESIZEBRW
Args:
[ 1] = O TCHECKBOX
Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:CHAGESIZEBRW( 0 )
Called from: Tfiltro.prg => (b)GENCHANGEBLOCK( 104 )
Called from: .\source\classes\checkbox.prg => TCHECKBOX:CLICK( 153 )
Called from: .\source\classes\control.prg => TCHECKBOX:HANDLEEVENT( 18
]]>En Google Cloud Console, el ID de clave y la clave secreta (o clave API) se utilizan para autenticar las solicitudes a las API de Google. El ID de clave es un identificador único de la clave, mientras que la clave secreta es el secreto que se utiliza para generar tokens de autorización.
Cómo encontrar o crear claves de API (ID y clave secreta):
En la Consola de Google Cloud: Ve a la sección "APIs & Services" y luego a "Credentials".
Crea una clave API: Selecciona "Create Credentials" y luego "API Key".
Acepta la clave API: La clave API recién creada se mostrará en la consola.
ID de cliente de OAuth 2.0: Si necesitas un ID de cliente y un secreto de cliente para OAuth, selecciona "OAuth client ID" en lugar de "API Key".
Cuentas de servicio: Para cuentas de servicio, puedes generar una clave en formato JSON que contiene el ID de cliente y la clave secreta.
Dónde encontrar la clave secreta:
Después de crear una clave API: La clave API se mostrará en el diálogo de creación.
Para claves de cuentas de servicio: Se te proporcionará la clave secreta en el archivo JSON de la clave.
Para OAuth 2.0: El ID de cliente y el secreto de cliente se mostrarán en la consola después de la creación.
]]>En Google Cloud Console, el ID de clave y la clave secreta (o clave API) se utilizan para autenticar las solicitudes a las API de Google. El ID de clave es un identificador único de la clave, mientras que la clave secreta es el secreto que se utiliza para generar tokens de autorización.
Cómo encontrar o crear claves de API (ID y clave secreta):
En la Consola de Google Cloud: Ve a la sección "APIs & Services" y luego a "Credentials".
Crea una clave API: Selecciona "Create Credentials" y luego "API Key".
Acepta la clave API: La clave API recién creada se mostrará en la consola.
ID de cliente de OAuth 2.0: Si necesitas un ID de cliente y un secreto de cliente para OAuth, selecciona "OAuth client ID" en lugar de "API Key".
Cuentas de servicio: Para cuentas de servicio, puedes generar una clave en formato JSON que contiene el ID de cliente y la clave secreta.
Dónde encontrar la clave secreta:
Después de crear una clave API: La clave API se mostrará en el diálogo de creación.
Para claves de cuentas de servicio: Se te proporcionará la clave secreta en el archivo JSON de la clave.
Para OAuth 2.0: El ID de cliente y el secreto de cliente se mostrarán en la consola después de la creación.
Code: Select all | Expand
xxxx-ncpllhkbr7hu8e78fn6lcctvsepsi142.apps.googleusercontent.com
Code: Select all | Expand
xxxx-JEhuFwW6AnGHjfShV-buEkYrirvD
Code: Select all | Expand
oGmail:setConfig( {;
"client_id" => "xxxx-ncpllhkbr7hu8e78fn6lcctvsepsi142.apps.googleusercontent.com",;
"client_secret" => "xxxx-JEhuFwW6AnGHjfShV-buEkYrirvD",;
"redirect_uri" => "http://localhost:2025/";
} )
Code: Select all | Expand
openid
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/gmail.send
Code: Select all | Expand
freeimage64.dll
libcurl.dll
libssl-3-x64.dll
zlib1.dll
Code: Select all | Expand
xxxx-ncpllhkbr7hu8e78fn6lcctvsepsi142.apps.googleusercontent.com
Code: Select all | Expand
xxxx-JEhuFwW6AnGHjfShV-buEkYrirvD
Code: Select all | Expand
oGmail:setConfig( {;
"client_id" => "xxxx-ncpllhkbr7hu8e78fn6lcctvsepsi142.apps.googleusercontent.com",;
"client_secret" => "xxxx-JEhuFwW6AnGHjfShV-buEkYrirvD",;
"redirect_uri" => "http://localhost:2025/";
} )
Code: Select all | Expand
openid
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/gmail.send
Code: Select all | Expand
freeimage64.dll
libcurl.dll
libssl-3-x64.dll
zlib1.dll
Code: Select all | Expand
# =============================================
# PowerShell All-in-One: Gmail API E-Mailversand
# =============================================
# === Konfiguration: Zugangsdaten deiner Google API ===
$client_id = "DEINE_CLIENT_ID"
$client_secret = "DEIN_CLIENT_SECRET"
$redirect_uri = "http://localhost" # Muss mit deiner OAuth2-App übereinstimmen
$tokenFile = "token.json"
# === Deine E-Mail-Daten ===
$to = "empfaenger@example.com"
$subject = "Testmail über Gmail API"
$body = "Hallo! Diese Nachricht wurde mit PowerShell und der Gmail API gesendet."
# === Hilfsfunktionen ===
function Load-Token {
if (Test-Path $tokenFile) {
return Get-Content $tokenFile | ConvertFrom-Json
}
return $null
}
function Save-Token($data) {
$data | ConvertTo-Json | Set-Content -Encoding UTF8 $tokenFile
}
function Get-AccessToken {
$tokenData = Load-Token
if (-not $tokenData -or -not $tokenData.refresh_token) {
Write-Host "🔐 Kein Token gefunden. Starte erstmalige Autorisierung..."
$scope = "https://www.googleapis.com/auth/gmail.send"
$auth_url = "https://accounts.google.com/o/oauth2/v2/auth?" +
"client_id=$client_id&redirect_uri=$redirect_uri&response_type=code" +
"&scope=$scope&access_type=offline&prompt=consent"
Start-Process $auth_url
$code = Read-Host "`n❓ Bitte den Autorisierungscode von Google eingeben"
$response = Invoke-RestMethod `
-Uri "https://oauth2.googleapis.com/token" `
-Method POST `
-Body @{
code = $code
client_id = $client_id
client_secret = $client_secret
redirect_uri = $redirect_uri
grant_type = "authorization_code"
} `
-ContentType "application/x-www-form-urlencoded"
if ($response.access_token) {
$tokenData = @{
access_token = $response.access_token
refresh_token = $response.refresh_token
expires_in = $response.expires_in
obtained_at = (Get-Date).ToString("s")
}
Save-Token $tokenData
Write-Host "✅ Erstes Login erfolgreich. Token gespeichert."
} else {
Write-Host "⛔ Fehler beim Abrufen des Tokens."
exit
}
}
$refresh_token = $tokenData.refresh_token
$response = Invoke-RestMethod `
-Uri "https://oauth2.googleapis.com/token" `
-Method POST `
-Body @{
client_id = $client_id
client_secret = $client_secret
refresh_token = $refresh_token
grant_type = "refresh_token"
} `
-ContentType "application/x-www-form-urlencoded"
if ($response.access_token) {
$tokenData.access_token = $response.access_token
$tokenData.obtained_at = (Get-Date).ToString("s")
Save-Token $tokenData
return $response.access_token
} else {
Write-Host "⛔ Fehler beim Token-Refresh."
exit
}
}
function Send-GmailMail($access_token, $to, $subject, $body) {
$msg = "From: me`r`nTo: $to`r`nSubject: $subject`r`nContent-Type: text/plain; charset=UTF-8`r`n`r`n$body"
$bytes = [System.Text.Encoding]::UTF8.GetBytes($msg)
$base64 = [System.Convert]::ToBase64String($bytes) `
-replace '\+', '-' `
-replace '/', '_' `
-replace '='
$json = @{ raw = $base64 } | ConvertTo-Json -Compress
$response = Invoke-RestMethod `
-Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages/send" `
-Method POST `
-Headers @{ Authorization = "Bearer $access_token" } `
-ContentType "application/json" `
-Body $json
Write-Host "📤 E-Mail wurde gesendet!"
}
# === Hauptablauf ===
$access_token = Get-AccessToken
Send-GmailMail -access_token $access_token -to $to -subject $subject -body $body
Code: Select all | Expand
# =============================================
# PowerShell All-in-One: Gmail API E-Mailversand
# =============================================
# === Konfiguration: Zugangsdaten deiner Google API ===
$client_id = "DEINE_CLIENT_ID"
$client_secret = "DEIN_CLIENT_SECRET"
$redirect_uri = "http://localhost" # Muss mit deiner OAuth2-App übereinstimmen
$tokenFile = "token.json"
# === Deine E-Mail-Daten ===
$to = "empfaenger@example.com"
$subject = "Testmail über Gmail API"
$body = "Hallo! Diese Nachricht wurde mit PowerShell und der Gmail API gesendet."
# === Hilfsfunktionen ===
function Load-Token {
if (Test-Path $tokenFile) {
return Get-Content $tokenFile | ConvertFrom-Json
}
return $null
}
function Save-Token($data) {
$data | ConvertTo-Json | Set-Content -Encoding UTF8 $tokenFile
}
function Get-AccessToken {
$tokenData = Load-Token
if (-not $tokenData -or -not $tokenData.refresh_token) {
Write-Host "🔐 Kein Token gefunden. Starte erstmalige Autorisierung..."
$scope = "https://www.googleapis.com/auth/gmail.send"
$auth_url = "https://accounts.google.com/o/oauth2/v2/auth?" +
"client_id=$client_id&redirect_uri=$redirect_uri&response_type=code" +
"&scope=$scope&access_type=offline&prompt=consent"
Start-Process $auth_url
$code = Read-Host "`n❓ Bitte den Autorisierungscode von Google eingeben"
$response = Invoke-RestMethod `
-Uri "https://oauth2.googleapis.com/token" `
-Method POST `
-Body @{
code = $code
client_id = $client_id
client_secret = $client_secret
redirect_uri = $redirect_uri
grant_type = "authorization_code"
} `
-ContentType "application/x-www-form-urlencoded"
if ($response.access_token) {
$tokenData = @{
access_token = $response.access_token
refresh_token = $response.refresh_token
expires_in = $response.expires_in
obtained_at = (Get-Date).ToString("s")
}
Save-Token $tokenData
Write-Host "✅ Erstes Login erfolgreich. Token gespeichert."
} else {
Write-Host "⛔ Fehler beim Abrufen des Tokens."
exit
}
}
$refresh_token = $tokenData.refresh_token
$response = Invoke-RestMethod `
-Uri "https://oauth2.googleapis.com/token" `
-Method POST `
-Body @{
client_id = $client_id
client_secret = $client_secret
refresh_token = $refresh_token
grant_type = "refresh_token"
} `
-ContentType "application/x-www-form-urlencoded"
if ($response.access_token) {
$tokenData.access_token = $response.access_token
$tokenData.obtained_at = (Get-Date).ToString("s")
Save-Token $tokenData
return $response.access_token
} else {
Write-Host "⛔ Fehler beim Token-Refresh."
exit
}
}
function Send-GmailMail($access_token, $to, $subject, $body) {
$msg = "From: me`r`nTo: $to`r`nSubject: $subject`r`nContent-Type: text/plain; charset=UTF-8`r`n`r`n$body"
$bytes = [System.Text.Encoding]::UTF8.GetBytes($msg)
$base64 = [System.Convert]::ToBase64String($bytes) `
-replace '\+', '-' `
-replace '/', '_' `
-replace '='
$json = @{ raw = $base64 } | ConvertTo-Json -Compress
$response = Invoke-RestMethod `
-Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages/send" `
-Method POST `
-Headers @{ Authorization = "Bearer $access_token" } `
-ContentType "application/json" `
-Body $json
Write-Host "📤 E-Mail wurde gesendet!"
}
# === Hauptablauf ===
$access_token = Get-AccessToken
Send-GmailMail -access_token $access_token -to $to -subject $subject -body $body
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView():New()
oWebView:SetHTML(memoread("tb.html"))
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
oWebView:SetSize( 1200, 800 )
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" )
sleep( 300 )
oWebView:Run()
oWebView:Destroy()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWebView := TWebView():New()
oWebView:SetHTML(memoread("tb.html"))
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
oWebView:SetSize( 1200, 800 )
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" )
sleep( 300 )
oWebView:Run()
oWebView:Destroy()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
Function test()
local oDLg
local ctest := " SILVIO "
local oFont
*oFont := TFont():New( "Verdana", 0, -14, , .T.) //90,180,270,900,2700
DEFINE FONT oFont NAME "Arial" SIZE 0, -25 NESCAPEMENT 900
DEFINE DIALOG oDlg TITLE "Test font" SIZE 400,400 PIXEL TRUEPIXEL
@ 10,10 say ctest SIZE 40,200 of oDlg PIXEL FONT oFont BORDER
ACTIVATE DIALOG oDlg
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
Function test()
local oDLg
local ctest := " SILVIO "
local oFont
*oFont := TFont():New( "Verdana", 0, -14, , .T.) //90,180,270,900,2700
DEFINE FONT oFont NAME "Arial" SIZE 0, -25 NESCAPEMENT 900
DEFINE DIALOG oDlg TITLE "Test font" SIZE 400,400 PIXEL TRUEPIXEL
@ 10,10 say ctest SIZE 40,200 of oDlg PIXEL FONT oFont BORDER
ACTIVATE DIALOG oDlg
RETURN NIL
Code: Select all | Expand
? oRtf:WinStyle( WS_VSCROLL )
? oRtf:WinStyle( WS_HSCROLL )
]]>Code: Select all | Expand
? oRtf:WinStyle( WS_VSCROLL )
? oRtf:WinStyle( WS_HSCROLL )
]]>]]>Antonio Linares wrote: Tue May 06, 2025 5:53 am Mr. Rao's wife bank account:
K. Girija kumari. A/C no16281570001297. Customer id21083781
]]>Antonio Linares wrote: Tue May 06, 2025 5:53 am Mr. Rao's wife bank account:
K. Girija kumari. A/C no16281570001297. Customer id21083781
Antonio Linares wrote: Tue May 06, 2025 5:53 am Mr. Rao's wife bank account:
K. Girija kumari. A/C no16281570001297. Customer id21083781
Antonio Linares wrote: Tue May 06, 2025 5:53 am Mr. Rao's wife bank account:
K. Girija kumari. A/C no16281570001297. Customer id21083781
Code: Select all | Expand
incpaths=include
libpaths=lib
{mingw}libs=fivehg
{mingw}libs=fivehgc
{mingw}libs=user32 winspool kernel32 comctl32 comdlg32 gdi32 gdiplus ole32
{mingw}libs=oleaut32 psapi oledlg mfcuia32 msimg32 win32k stdc++ version
{mingw}libs=uuid winmm vfw32 wsock32
{mingw}libs=uxtheme
libs=hbwin.hbc
libs=xhb.hbc
libs=hbct.hbc
libs=hbmzip.hbc
libs=hbziparc.hbc
After that, goto samples folder:
Code: Select all | Expand
hbmk2 samplename.prg ..\fivewin.hbc
Code: Select all | Expand
incpaths=include
libpaths=lib
{mingw}libs=fivehg
{mingw}libs=fivehgc
{mingw}libs=user32 winspool kernel32 comctl32 comdlg32 gdi32 gdiplus ole32
{mingw}libs=oleaut32 psapi oledlg mfcuia32 msimg32 win32k stdc++ version
{mingw}libs=uuid winmm vfw32 wsock32
{mingw}libs=uxtheme
libs=hbwin.hbc
libs=xhb.hbc
libs=hbct.hbc
libs=hbmzip.hbc
libs=hbziparc.hbc
After that, goto samples folder:
Code: Select all | Expand
hbmk2 samplename.prg ..\fivewin.hbc
Code: Select all | Expand
"E1345";"DI";"DIGACQA";"DI";"I_E1345"
"F1305";"GO";"DEVCTLA";"DI";"I_F1305GO
"F1305";"GT";"DEVCTLA";"DI";"I_F1305GT"
Code: Select all | Expand
"E1345";"DI";"DIGACQA";"DI";"I_E1345"
"F1305";"GO";"DEVCTLA";"DI";"I_F1305GO
"F1305";"GT";"DEVCTLA";"DI";"I_F1305GT"
Code: Select all | Expand
{ { ' "E1345" ' , ' "DI" ' , ' "DIGACQA" ' , ' "DI" ' ,' "I_E1345" ' } , {' "F1305" ' , ' "GO" ' ,' "DEVCTLA" ' ,' "DI" ' ,' "I_F1305GO" '} , {' "F1305" ' ,' "GT" ' ,' "DEVCTLA" ' ,' "DI" ' ,' "I_F1305GT" '} }
Code: Select all | Expand
{ { ' "E1345" ' , ' "DI" ' , ' "DIGACQA" ' , ' "DI" ' ,' "I_E1345" ' } , {' "F1305" ' , ' "GO" ' ,' "DEVCTLA" ' ,' "DI" ' ,' "I_F1305GO" '} , {' "F1305" ' ,' "GT" ' ,' "DEVCTLA" ' ,' "DI" ' ,' "I_F1305GT" '} }
Code: Select all | Expand
AEval( aLines, { | aLine, n | AEval( aLine, { | cElement, m | cElement := mcsvremove(cElement) } ) } )
func mcsvremove(vveld)
vveld = alltrim(vveld)
msginfo(vveld) //field with "
if substr(vveld,1,1) = '"'
vveld = substr(vveld,2,len(vveld)-2)
endif
msginfo(vveld) //field without "
return vveld
Code: Select all | Expand
AEval( aLines, { | aLine, n | AEval( aLine, { | cElement, m | cElement := mcsvremove(cElement) } ) } )
func mcsvremove(vveld)
vveld = alltrim(vveld)
msginfo(vveld) //field with "
if substr(vveld,1,1) = '"'
vveld = substr(vveld,2,len(vveld)-2)
endif
msginfo(vveld) //field without "
return vveld
Code: Select all | Expand
AEval( aLines, { | aLine, n | AEval( aLine, { | cElement, m | aLines[ n ][ m ] := mcsvremove(cElement) } ) } )
func mcsvremove(vveld)
vveld = alltrim(vveld)
msginfo(vveld) //field with "
if substr(vveld,1,1) = '"'
vveld = substr(vveld,2,len(vveld)-2)
endif
msginfo(vveld) //field without "
return vveld
Code: Select all | Expand
AEval( aLines, { | aLine, n | AEval( aLine, { | cElement, m | aLines[ n ][ m ] := mcsvremove(cElement) } ) } )
func mcsvremove(vveld)
vveld = alltrim(vveld)
msginfo(vveld) //field with "
if substr(vveld,1,1) = '"'
vveld = substr(vveld,2,len(vveld)-2)
endif
msginfo(vveld) //field without "
return vveld
Code: Select all | Expand
Error E0005 Outer codeblock variable is out of reach: 'N'
Code: Select all | Expand
Error E0005 Outer codeblock variable is out of reach: 'N'
Code: Select all | Expand
FOR EACH aList2 IN aList
FOR EACH xItem IN aList2
callfunction( @xItem )
NEXT
NEXT
Code: Select all | Expand
FOR EACH aList2 IN aList
FOR EACH xItem IN aList2
callfunction( @xItem )
NEXT
NEXT
Code: Select all | Expand
LOCAL aNoTestList := { ;
{ "no check", "demoall.prg", "testsamples.prg" }, ;
{ "MDI", "a.prg", "testmdi.prg", "testrtf.prg", "demomdi.prg" }, ;
{ "utility?", "buildpelles.prg", "dbview.prg" }, ;
{ "multithead", "demomenumt.prg" }, ;
{ "window", "demoonother.prg" }, ;
{ "postgress", "grid_2.prg", "grid_3.prg" }, ;
{ "console", "helloworld.prg" }, ;
{ "undefined", "propsh.prg", "tststconsapp.prg", "helpstatic.prg", ;
"tstprdos.prg", "winprn.prg", "testalert.prg", "pseudocm.prg", ;
"bincnts.prg", "bindbf.prg", "hexbincnt.prg" }, ;
{ "bug", "tstscrlbar.prg", "helpdemo.prg" } }
aList := Directory( "*.prg" )
FOR EACH aFile IN aList
IF hb_AScan( aNoTestList, { |a| hb_AScan( a, { |b| ;
b == Lower( aFile[1] ) } ) != 0 } ) != 0
LOOP
ENDIF
...
NEXT
Code: Select all | Expand
LOCAL aNoTestList := { ;
{ "no check", "demoall.prg", "testsamples.prg" }, ;
{ "MDI", "a.prg", "testmdi.prg", "testrtf.prg", "demomdi.prg" }, ;
{ "utility?", "buildpelles.prg", "dbview.prg" }, ;
{ "multithead", "demomenumt.prg" }, ;
{ "window", "demoonother.prg" }, ;
{ "postgress", "grid_2.prg", "grid_3.prg" }, ;
{ "console", "helloworld.prg" }, ;
{ "undefined", "propsh.prg", "tststconsapp.prg", "helpstatic.prg", ;
"tstprdos.prg", "winprn.prg", "testalert.prg", "pseudocm.prg", ;
"bincnts.prg", "bindbf.prg", "hexbincnt.prg" }, ;
{ "bug", "tstscrlbar.prg", "helpdemo.prg" } }
aList := Directory( "*.prg" )
FOR EACH aFile IN aList
IF hb_AScan( aNoTestList, { |a| hb_AScan( a, { |b| ;
b == Lower( aFile[1] ) } ) != 0 } ) != 0
LOOP
ENDIF
...
NEXT
Code: Select all | Expand
/*
demofolderex.prg
*/
#include "fivewin.ch"
FUNCTION DemoFolderEx( lWithDialog, oDlg )
LOCAL oTab
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "demofolderex" ;
SIZE 1024, 768
ENDIF
@ 50, 50 FOLDEREX oTab ;
PROMPTS "demofolderex" OF oDlg ;
TAB HEIGHT 22 ;
SIZE 800, 600 ;
PIXEL
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oTab) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demobutton.prg
*/
#include "fivewin.ch"
FUNCTION DemoButton( lWithDialog, oDlg )
LOCAL oButton
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "demobutton" ;
SIZE 1024, 768
ENDIF
@ 100, 100 BUTTONBMP oButton ;
PROMPT "test" ;
OF oDlg ;
SIZE 200, 25 ;
PIXEL ;
; // RESOURCE cResName TOP ;
ACTION MsgStop( "ok" )
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oButton) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
democheckbox.prg
*/
#include "fivewin.ch"
FUNCTION DemoCheckbox( lWithDialog, oDlg )
LOCAL oCheck, lValue := .T.
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "democheckbox" ;
SIZE 1024, 768
ENDIF
@ 100, 100 CHECKBOX oCheck VAR lValue PROMPT "The Option" PIXEL ;
SIZE 200, 25 OF oDlg
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oCheck) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demoall.prg
*/
#include "fivewin.ch"
FUNCTION DemoAll()
LOCAL oDlg, oTab, oPage
FW_SetTruePixel(.T.)
DEFINE DIALOG oDlg ;
TITLE "demoall" ;
SIZE 1024, 768
@ 50, 50 FOLDEREX oTab ;
PROMPTS "X","X","X","X","X" OF oDlg ;
TAB HEIGHT 22 ;
SIZE 900, 700 ;
PIXEL
oTab:aPrompts[ 1 ] := "folderex"
oPage := oTab:aDialogs[ 1 ]
DemoFolderEx( .F., oPage )
oTab:Refresh()
oTab:aPrompts[ 2 ] := "button"
oPage := oTab:aDialogs[ 2 ]
DemoButton( .F., oPage )
oTab:Refresh()
oTab:aPrompts[ 3 ] := "checkbox"
oPage := oTab:aDialogs[3]
DemoCheckbox( .F., oPage )
oTab:Refresh()
aSize( oTab:aPrompts, 3 )
ACTIVATE DIALOG oDlg CENTER
(oTab) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demofolderex.prg
*/
#include "fivewin.ch"
FUNCTION DemoFolderEx( lWithDialog, oDlg )
LOCAL oTab
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "demofolderex" ;
SIZE 1024, 768
ENDIF
@ 50, 50 FOLDEREX oTab ;
PROMPTS "demofolderex" OF oDlg ;
TAB HEIGHT 22 ;
SIZE 800, 600 ;
PIXEL
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oTab) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demobutton.prg
*/
#include "fivewin.ch"
FUNCTION DemoButton( lWithDialog, oDlg )
LOCAL oButton
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "demobutton" ;
SIZE 1024, 768
ENDIF
@ 100, 100 BUTTONBMP oButton ;
PROMPT "test" ;
OF oDlg ;
SIZE 200, 25 ;
PIXEL ;
; // RESOURCE cResName TOP ;
ACTION MsgStop( "ok" )
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oButton) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
democheckbox.prg
*/
#include "fivewin.ch"
FUNCTION DemoCheckbox( lWithDialog, oDlg )
LOCAL oCheck, lValue := .T.
hb_Default( @lWithDialog, .T. )
FW_SetTruePixel(.T.)
IF lWIthDialog
DEFINE DIALOG oDlg ;
TITLE "democheckbox" ;
SIZE 1024, 768
ENDIF
@ 100, 100 CHECKBOX oCheck VAR lValue PROMPT "The Option" PIXEL ;
SIZE 200, 25 OF oDlg
IF lWithDialog
ACTIVATE DIALOG oDlg CENTER
ENDIF
(oCheck) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demoall.prg
*/
#include "fivewin.ch"
FUNCTION DemoAll()
LOCAL oDlg, oTab, oPage
FW_SetTruePixel(.T.)
DEFINE DIALOG oDlg ;
TITLE "demoall" ;
SIZE 1024, 768
@ 50, 50 FOLDEREX oTab ;
PROMPTS "X","X","X","X","X" OF oDlg ;
TAB HEIGHT 22 ;
SIZE 900, 700 ;
PIXEL
oTab:aPrompts[ 1 ] := "folderex"
oPage := oTab:aDialogs[ 1 ]
DemoFolderEx( .F., oPage )
oTab:Refresh()
oTab:aPrompts[ 2 ] := "button"
oPage := oTab:aDialogs[ 2 ]
DemoButton( .F., oPage )
oTab:Refresh()
oTab:aPrompts[ 3 ] := "checkbox"
oPage := oTab:aDialogs[3]
DemoCheckbox( .F., oPage )
oTab:Refresh()
aSize( oTab:aPrompts, 3 )
ACTIVATE DIALOG oDlg CENTER
(oTab) // warning -w3 -es2
RETURN Nil
Code: Select all | Expand
/*
demoall.prg
*/
#include "fivewin.ch"
STATIC aMenuOptions := {}, nMenuLevel := 0
FUNCTION DemoAll()
LOCAL oDlg, aInitList := {}
LOCAL oTabLevel1, nIndexLevel1, aOption1
LOCAL oTabLevel2 := Array(100), nIndexLevel2, aOption2, nTab2Index := 0
LOCAL oButton := Array(100), nButtonIndex := 0
FW_SetTruePixel(.T.)
DEFINE DIALOG oDlg ;
TITLE "demoall" ;
SIZE 1024, 768
MenuOption( "browse" )
MenuDrop()
MenuOption( "demoxbsubtot", { |o| DemoxbSubTot( .F., o ) } )
MenuOption( "zodiac", { |o| DemoZodiac( .F., o ) } )
MenuOption( "xbrwpages", "xbwrwpages", { || Demoxbrwpages() } )
MenuUnDrop()
MenuOption( "button", { |o| DemoButton( .F., o ) } )
MenuOption( "checkbox", { |o| DemoCheckbox( .F., o ) } )
MenuOption( "folderex", { |o| DemoFolderEx( .F., o ) } )
MenuOption( "zorder", { |o| DemoZorder( .F., o ) } )
@ 50, 50 FOLDEREX oTabLevel1 ;
PROMPTS ListOfTabPages() ;
OF oDlg ;
TAB HEIGHT 22 ;
SIZE 900, 700 ;
PIXEL
nIndexLevel1 := 0
FOR EACH aOption1 IN aMenuOptions
oTabLevel1:aPrompts[ ++nIndexLevel1 ] := aOption1[ 1 ]
IF Empty( aOption1[ 2 ] )
Eval( aOption1[ 3 ], oTabLevel1:aDialogs[ nIndexLevel1 ] )
ELSE
@ 50, 50 FOLDEREX oTabLevel2[ ++nTab2Index ] ;
PROMPTS ListOfTabPages() ;
OF oTabLevel1:aDialogs[ nIndexLevel1 ] ;
TAB HEIGHT 22 ;
SIZE 800, 600 ;
PIXEL
nIndexLevel2 := 0
FOR EACH aOption2 IN aOption1[ 2 ]
oTabLevel2[ nTab2Index ]:aPrompts[ ++nIndexLevel2 ] := aOption2[ 1 ]
IF ValType( aOption2[3] ) == "C"
@ 100, 100 BUTTONBMP oButton[ ++nButtonIndex ] ;
PROMPT aOption2[1] ;
OF oTabLevel2[ nTab2Index ]:aDialogs[ nIndexLevel2 ] ;
SIZE 200, 25 ;
PIXEL ;
; // RESOURCE cResName TOP ;
ACTION Eval( aOption2[4] )
ELSE
Eval( aOption2[ 3 ], oTabLevel2[ nTab2Index ]:aDialogs[ nIndexLevel2 ] )
ENDIF
NEXT
aSize( oTabLevel2[ nTab2Index ]:aPrompts, nIndexLevel2 )
ENDIF
NEXT
aSize( oTabLevel1:aPrompts, nIndexLevel1 )
ACTIVATE DIALOG oDlg CENTER ;
ON INIT ( Self, ExecuteInit( aInitList ) )
RETURN Nil
STATIC FUNCTION ListOfTabPages()
LOCAL aList := Array(100)
AFill( aList, "" )
RETURN aList
STATIC FUNCTION MenuOption( cCaption, bCodeOrString, bCode )
LOCAL nCont, aLastMenu
aLastMenu := aMenuOptions
FOR nCont = 1 TO nMenuLevel
aLastMenu := aLastMenu[ Len( aLastMenu ) ]
aLastMenu := aLastMenu[ 2 ]
NEXT
AAdd( aLastMenu, { ccaption, {}, bCodeOrString, bCode } )
RETURN Nil
STATIC FUNCTION MenuDrop()
nMenuLevel++
RETURN Nil
STATIC FUNCTION MenuUndrop()
nMenuLevel --
RETURN Nil
STATIC FUNCTION ExecuteInit( aInitList )
LOCAL bCode
IF .F.
FOR EACH bCode In aInitList
Eval( bCode )
NEXT
ENDIF
RETURN Nil
Code: Select all | Expand
/*
demoall.prg
*/
#include "fivewin.ch"
STATIC aMenuOptions := {}, nMenuLevel := 0
FUNCTION DemoAll()
LOCAL oDlg, aInitList := {}
LOCAL oTabLevel1, nIndexLevel1, aOption1
LOCAL oTabLevel2 := Array(100), nIndexLevel2, aOption2, nTab2Index := 0
LOCAL oButton := Array(100), nButtonIndex := 0
FW_SetTruePixel(.T.)
DEFINE DIALOG oDlg ;
TITLE "demoall" ;
SIZE 1024, 768
MenuOption( "browse" )
MenuDrop()
MenuOption( "demoxbsubtot", { |o| DemoxbSubTot( .F., o ) } )
MenuOption( "zodiac", { |o| DemoZodiac( .F., o ) } )
MenuOption( "xbrwpages", "xbwrwpages", { || Demoxbrwpages() } )
MenuUnDrop()
MenuOption( "button", { |o| DemoButton( .F., o ) } )
MenuOption( "checkbox", { |o| DemoCheckbox( .F., o ) } )
MenuOption( "folderex", { |o| DemoFolderEx( .F., o ) } )
MenuOption( "zorder", { |o| DemoZorder( .F., o ) } )
@ 50, 50 FOLDEREX oTabLevel1 ;
PROMPTS ListOfTabPages() ;
OF oDlg ;
TAB HEIGHT 22 ;
SIZE 900, 700 ;
PIXEL
nIndexLevel1 := 0
FOR EACH aOption1 IN aMenuOptions
oTabLevel1:aPrompts[ ++nIndexLevel1 ] := aOption1[ 1 ]
IF Empty( aOption1[ 2 ] )
Eval( aOption1[ 3 ], oTabLevel1:aDialogs[ nIndexLevel1 ] )
ELSE
@ 50, 50 FOLDEREX oTabLevel2[ ++nTab2Index ] ;
PROMPTS ListOfTabPages() ;
OF oTabLevel1:aDialogs[ nIndexLevel1 ] ;
TAB HEIGHT 22 ;
SIZE 800, 600 ;
PIXEL
nIndexLevel2 := 0
FOR EACH aOption2 IN aOption1[ 2 ]
oTabLevel2[ nTab2Index ]:aPrompts[ ++nIndexLevel2 ] := aOption2[ 1 ]
IF ValType( aOption2[3] ) == "C"
@ 100, 100 BUTTONBMP oButton[ ++nButtonIndex ] ;
PROMPT aOption2[1] ;
OF oTabLevel2[ nTab2Index ]:aDialogs[ nIndexLevel2 ] ;
SIZE 200, 25 ;
PIXEL ;
; // RESOURCE cResName TOP ;
ACTION Eval( aOption2[4] )
ELSE
Eval( aOption2[ 3 ], oTabLevel2[ nTab2Index ]:aDialogs[ nIndexLevel2 ] )
ENDIF
NEXT
aSize( oTabLevel2[ nTab2Index ]:aPrompts, nIndexLevel2 )
ENDIF
NEXT
aSize( oTabLevel1:aPrompts, nIndexLevel1 )
ACTIVATE DIALOG oDlg CENTER ;
ON INIT ( Self, ExecuteInit( aInitList ) )
RETURN Nil
STATIC FUNCTION ListOfTabPages()
LOCAL aList := Array(100)
AFill( aList, "" )
RETURN aList
STATIC FUNCTION MenuOption( cCaption, bCodeOrString, bCode )
LOCAL nCont, aLastMenu
aLastMenu := aMenuOptions
FOR nCont = 1 TO nMenuLevel
aLastMenu := aLastMenu[ Len( aLastMenu ) ]
aLastMenu := aLastMenu[ 2 ]
NEXT
AAdd( aLastMenu, { ccaption, {}, bCodeOrString, bCode } )
RETURN Nil
STATIC FUNCTION MenuDrop()
nMenuLevel++
RETURN Nil
STATIC FUNCTION MenuUndrop()
nMenuLevel --
RETURN Nil
STATIC FUNCTION ExecuteInit( aInitList )
LOCAL bCode
IF .F.
FOR EACH bCode In aInitList
Eval( bCode )
NEXT
ENDIF
RETURN Nil
Code: Select all | Expand
Pasta de d:\github\fivewin\samples
14/05/2025 10:49 6.327.296 demoall.exe
13/05/2025 16:36 6.681.088 demobutton.exe
13/05/2025 16:57 6.681.088 democheckbox.exe
13/05/2025 15:12 6.724.096 demofolderex.exe
14/05/2025 10:32 6.271.488 demoxbrwpages.exe
14/05/2025 00:53 6.682.112 demozorder.exe
I do not understand this:Code: Select all | Expand
Pasta de d:\github\fivewin\samples
14/05/2025 10:49 6.327.296 demoall.exe
13/05/2025 16:36 6.681.088 demobutton.exe
13/05/2025 16:57 6.681.088 democheckbox.exe
13/05/2025 15:12 6.724.096 demofolderex.exe
14/05/2025 10:32 6.271.488 demoxbrwpages.exe
14/05/2025 00:53 6.682.112 demozorder.exe
I do not understand this:We want to remind you that we have an alternative working forums at:To check if any infected content is present in the cPanel account, I have initiated a courtesy malware scan. The scan has detected 1 infected file
/home1/fivetec1/public_html/500.php: SL-PHP-EVAL_REQUEST-axog.UNOFFICIAL FOUND
----------- SCAN SUMMARY -----------
Known viruses: 2299997
Engine version: devel-clamav-0.99-beta1-632-g8a582c7
Scanned directories: 2286
Scanned files: 38847
Infected files: 1
Data scanned: 379.62 MB
Data read: 6107.80 MB (ratio 0.06:1)
Time: 1564.957 sec (26 m 4 s)
It is advisable to clean this infected file.
We want to remind you that we have an alternative working forums at:To check if any infected content is present in the cPanel account, I have initiated a courtesy malware scan. The scan has detected 1 infected file
/home1/fivetec1/public_html/500.php: SL-PHP-EVAL_REQUEST-axog.UNOFFICIAL FOUND
----------- SCAN SUMMARY -----------
Known viruses: 2299997
Engine version: devel-clamav-0.99-beta1-632-g8a582c7
Scanned directories: 2286
Scanned files: 38847
Infected files: 1
Data scanned: 379.62 MB
Data read: 6107.80 MB (ratio 0.06:1)
Time: 1564.957 sec (26 m 4 s)
It is advisable to clean this infected file.
Code: Select all | Expand
riched20.dll, 1 103 280
msftedit.dll, 2 680 320
riched32.dll, 32 768
Code: Select all | Expand
riched20.dll, 1 103 280
msftedit.dll, 2 680 320
riched32.dll, 32 768
Code: Select all | Expand
riched20.dll, v 3.1
msftedit.dll, 2 680 320, v 10.0.10586.494
riched32.dll, 32 768,v 10.0.26100.1
That's what it says in the properties of these files.]]>Code: Select all | Expand
riched20.dll, v 3.1
msftedit.dll, 2 680 320, v 10.0.10586.494
riched32.dll, 32 768,v 10.0.26100.1
That's what it says in the properties of these files.]]>Code: Select all | Expand
C:\Windows\System32
riched20.dll
riched32.dll
Regards, saludso.]]>Code: Select all | Expand
C:\Windows\System32
riched20.dll
riched32.dll
Regards, saludso.]]>]]>The inconsistent display of colors in an RTF document when using the RichEdit component (riched20.dll or msftedit.dll) could stem from several factors related to differences in system configurations, RichEdit versions, or rendering behavior. Here are the likely reasons and steps to diagnose or resolve the issue:
RichEdit Version Differences:
Different versions of the RichEdit control (e.g., RichEdit 2.0, 3.0, 4.1, or later) are installed on different computers, depending on the operating system or installed software (e.g., Microsoft Office). Older versions, like riched20.dll, may not fully support advanced RTF features, including certain color table implementations.
Solution: Check which DLL is loaded (riched20.dll or msftedit.dll) using a tool like Process Explorer or Dependency Walker. Ensure the application explicitly loads msftedit.dll (RichEdit 4.1 or later) for better RTF support by linking to it or using LoadLibrary. You can also verify the RichEdit version programmatically via the EM_GETEDITSTYLE message or by checking the DLL's version info.
Color Table Limitations:
The RTF color table (\colortbl) defines colors used in the document. Some RichEdit implementations may have limits on the number of colors they can render (e.g., older versions might cap at 16 or 256 colors). If the RTF document uses more colors than supported, some may be ignored or mapped incorrectly.
Solution: Inspect the RTF document’s color table using a text editor. Simplify the color table to use fewer colors (e.g., under 16) and test if the issue persists. Alternatively, ensure all systems use a newer RichEdit version (msftedit.dll) that supports larger color tables.
System Color Depth and Display Settings:
The display color depth (e.g., 16-bit vs. 32-bit) on some computers may affect color rendering. In lower color depth modes (e.g., 256 colors or 16-bit), the RichEdit control may approximate or skip colors that don’t map well to the system’s color palette.
Solution: Check the display settings on affected computers (Control Panel > Display > Advanced Settings). Ensure they are set to 32-bit True Color. Update graphics drivers if colors are still limited.
RTF Document Compatibility:
The RTF document may contain formatting or color definitions that are not fully compatible with all RichEdit versions. For example, complex color specifications or non-standard RTF tags might be ignored by older RichEdit controls.
Solution: Open the RTF in a text editor to check for unusual color definitions or proprietary tags. Test the document in a newer application (e.g., WordPad or Microsoft Word) to confirm the issue is with RichEdit and not the document. If needed, re-save the RTF in a simpler format using WordPad to ensure compatibility.
Font and Character Set Issues:
Colors in RTF documents are often tied to font or text properties. If the specified font or character set is missing on some systems, RichEdit may fall back to a default font that doesn’t render colors correctly.
Solution: Ensure the fonts referenced in the RTF document (check \fonttbl) are installed on all systems. Use common fonts like Arial or Times New Roman to minimize issues. Also, verify that the character set (\fcharset) is supported.
Graphics and GDI Limitations:
The RichEdit control relies on the Windows Graphics Device Interface (GDI) for rendering. Differences in GDI implementations or graphics hardware acceleration on some systems may cause color rendering issues, especially if the system uses outdated or incompatible graphics drivers.
Solution: Update graphics drivers on affected systems. Test disabling hardware acceleration (via Display Settings or application configuration) to see if it resolves the issue.
Application-Specific Configuration:
Your application may override RichEdit’s default behavior, such as setting a custom color palette or limiting color rendering via messages like EM_SETCHARFORMAT or EM_SETBKGND. These settings might behave differently across systems.
Solution: Review your code for any custom RichEdit configurations. Ensure consistent use of SCF_ALL or SCF_SELECTION when applying character formats and avoid hardcoding color indices that may not exist in the RTF color table.
Diagnostic Steps
Identify the RichEdit DLL: Use a debugger or Process Explorer to confirm whether riched20.dll or msftedit.dll is loaded. Check the file version (e.g., msftedit.dll version 8.5 or higher is preferable).
Test with a Minimal RTF: Create a simple RTF document with a small color table (e.g., 3–5 colors) and test it on affected systems to isolate the issue.
Compare System Configurations: Note the OS version (e.g., Windows 10 vs. Windows 11), display settings, and installed software (e.g., Microsoft Office) on computers where colors display correctly vs. incorrectly.
Log RichEdit Messages: Use EM_GETCHARFORMAT to log the color attributes applied to text and verify if the expected colors from the RTF color table are being used.
Recommended Fix
To maximize compatibility:
Explicitly load msftedit.dll in your application to ensure a modern RichEdit version (RichEdit 4.1 or later).
Simplify the RTF document’s color table to use fewer, standard colors.
Ensure all systems use 32-bit color depth and have updated graphics drivers.
Test the RTF document in WordPad to confirm expected color rendering and re-save if necessary.
If the issue persists, provide details about the OS versions, RichEdit DLL versions, and a sample RTF document to narrow down the cause further.
]]>The inconsistent display of colors in an RTF document when using the RichEdit component (riched20.dll or msftedit.dll) could stem from several factors related to differences in system configurations, RichEdit versions, or rendering behavior. Here are the likely reasons and steps to diagnose or resolve the issue:
RichEdit Version Differences:
Different versions of the RichEdit control (e.g., RichEdit 2.0, 3.0, 4.1, or later) are installed on different computers, depending on the operating system or installed software (e.g., Microsoft Office). Older versions, like riched20.dll, may not fully support advanced RTF features, including certain color table implementations.
Solution: Check which DLL is loaded (riched20.dll or msftedit.dll) using a tool like Process Explorer or Dependency Walker. Ensure the application explicitly loads msftedit.dll (RichEdit 4.1 or later) for better RTF support by linking to it or using LoadLibrary. You can also verify the RichEdit version programmatically via the EM_GETEDITSTYLE message or by checking the DLL's version info.
Color Table Limitations:
The RTF color table (\colortbl) defines colors used in the document. Some RichEdit implementations may have limits on the number of colors they can render (e.g., older versions might cap at 16 or 256 colors). If the RTF document uses more colors than supported, some may be ignored or mapped incorrectly.
Solution: Inspect the RTF document’s color table using a text editor. Simplify the color table to use fewer colors (e.g., under 16) and test if the issue persists. Alternatively, ensure all systems use a newer RichEdit version (msftedit.dll) that supports larger color tables.
System Color Depth and Display Settings:
The display color depth (e.g., 16-bit vs. 32-bit) on some computers may affect color rendering. In lower color depth modes (e.g., 256 colors or 16-bit), the RichEdit control may approximate or skip colors that don’t map well to the system’s color palette.
Solution: Check the display settings on affected computers (Control Panel > Display > Advanced Settings). Ensure they are set to 32-bit True Color. Update graphics drivers if colors are still limited.
RTF Document Compatibility:
The RTF document may contain formatting or color definitions that are not fully compatible with all RichEdit versions. For example, complex color specifications or non-standard RTF tags might be ignored by older RichEdit controls.
Solution: Open the RTF in a text editor to check for unusual color definitions or proprietary tags. Test the document in a newer application (e.g., WordPad or Microsoft Word) to confirm the issue is with RichEdit and not the document. If needed, re-save the RTF in a simpler format using WordPad to ensure compatibility.
Font and Character Set Issues:
Colors in RTF documents are often tied to font or text properties. If the specified font or character set is missing on some systems, RichEdit may fall back to a default font that doesn’t render colors correctly.
Solution: Ensure the fonts referenced in the RTF document (check \fonttbl) are installed on all systems. Use common fonts like Arial or Times New Roman to minimize issues. Also, verify that the character set (\fcharset) is supported.
Graphics and GDI Limitations:
The RichEdit control relies on the Windows Graphics Device Interface (GDI) for rendering. Differences in GDI implementations or graphics hardware acceleration on some systems may cause color rendering issues, especially if the system uses outdated or incompatible graphics drivers.
Solution: Update graphics drivers on affected systems. Test disabling hardware acceleration (via Display Settings or application configuration) to see if it resolves the issue.
Application-Specific Configuration:
Your application may override RichEdit’s default behavior, such as setting a custom color palette or limiting color rendering via messages like EM_SETCHARFORMAT or EM_SETBKGND. These settings might behave differently across systems.
Solution: Review your code for any custom RichEdit configurations. Ensure consistent use of SCF_ALL or SCF_SELECTION when applying character formats and avoid hardcoding color indices that may not exist in the RTF color table.
Diagnostic Steps
Identify the RichEdit DLL: Use a debugger or Process Explorer to confirm whether riched20.dll or msftedit.dll is loaded. Check the file version (e.g., msftedit.dll version 8.5 or higher is preferable).
Test with a Minimal RTF: Create a simple RTF document with a small color table (e.g., 3–5 colors) and test it on affected systems to isolate the issue.
Compare System Configurations: Note the OS version (e.g., Windows 10 vs. Windows 11), display settings, and installed software (e.g., Microsoft Office) on computers where colors display correctly vs. incorrectly.
Log RichEdit Messages: Use EM_GETCHARFORMAT to log the color attributes applied to text and verify if the expected colors from the RTF color table are being used.
Recommended Fix
To maximize compatibility:
Explicitly load msftedit.dll in your application to ensure a modern RichEdit version (RichEdit 4.1 or later).
Simplify the RTF document’s color table to use fewer, standard colors.
Ensure all systems use 32-bit color depth and have updated graphics drivers.
Test the RTF document in WordPad to confirm expected color rendering and re-save if necessary.
If the issue persists, provide details about the OS versions, RichEdit DLL versions, and a sample RTF document to narrow down the cause further.
Code: Select all | Expand
riched20.dll, v 3.1
msftedit.dll, 2 680 320, v 10.0.10586.494
riched32.dll, 32 768,v 10.0.26100.1
Code: Select all | Expand
riched20.dll, v 3.1
msftedit.dll, 2 680 320, v 10.0.10586.494
riched32.dll, 32 768,v 10.0.26100.1
If you're already working with FWH and can use HTML via mod\_harbour or embedded browser components, I believe this would be the more sustainable approach.
**Why HTML for reporting?**
**Advantages:**
Platform-independent – works on any device with a browser (PC, tablet, mobile)
Easy integration into web applications (e.g. PHP, mod\_Harbour, Node.js)
Modern display options (charts, interactive tables, responsive layout)
No deployment needed – reports can simply be accessed via a link
Direct printing via browser or exportable as PDF
Flexibly extendable (e.g. via JavaScript, CSS, or external libraries like Chart.js)
**Comparison Table**
| Feature | QtRPT / FastReport | HTML Reporting (e.g. domPDF, jsPDF, Live HTML) |
| ----------------------- | ------------------ | ---------------------------------------------- |
| Platform dependency | Windows-centric | Fully platform-independent |
| Web integration | Limited | Seamless (e.g. with PHP, Harbour, Node) |
| Interactivity | Low | High (filtering, sorting, live updates) |
| Print/PDF | Good | Good (via browser or HTML2PDF tools) |
| Learning curve / future | Partly legacy | Future-proof & widely adopted |
| Open Source | Yes | Many strong open-source solutions |
If you're already working with FWH and can use HTML via mod\_harbour or embedded browser components, I believe this would be the more sustainable approach.
**Why HTML for reporting?**
**Advantages:**
Platform-independent – works on any device with a browser (PC, tablet, mobile)
Easy integration into web applications (e.g. PHP, mod\_Harbour, Node.js)
Modern display options (charts, interactive tables, responsive layout)
No deployment needed – reports can simply be accessed via a link
Direct printing via browser or exportable as PDF
Flexibly extendable (e.g. via JavaScript, CSS, or external libraries like Chart.js)
**Comparison Table**
| Feature | QtRPT / FastReport | HTML Reporting (e.g. domPDF, jsPDF, Live HTML) |
| ----------------------- | ------------------ | ---------------------------------------------- |
| Platform dependency | Windows-centric | Fully platform-independent |
| Web integration | Limited | Seamless (e.g. with PHP, Harbour, Node) |
| Interactivity | Low | High (filtering, sorting, live updates) |
| Print/PDF | Good | Good (via browser or HTML2PDF tools) |
| Learning curve / future | Partly legacy | Future-proof & widely adopted |
| Open Source | Yes | Many strong open-source solutions |
Code: Select all | Expand
FUNCTION GDIP_DRAWARROW()
RETURN NIL
FUNCTION GDIP_DELETEIMAGE()
RETURN NIL
FUNCTION GDIP_DELETEBRUSH()
RETURN NIL
FUNCTION GDIP_COLORBRUSH()
RETURN NIL
FUNCTION GDIP_IMAGEBRUSH()
RETURN NIL
FUNCTION GDIP_DRAWTEXT()
RETURN NIL
FUNCTION GDIP_HOLLOWTEXT()
RETURN NIL
FUNCTION GDIP_SAYIMAGE()
RETURN NIL
FUNCTION GDIP_RINGGRAD()
RETURN NIL
FUNCTION GDIP_CLONEIMAGE()
RETURN NIL
FUNCTION GDIP_GETHBITMAP()
RETURN NIL
FUNCTION GDIP_FROMHBITMAP()
RETURN NIL
FUNCTION GDIP_FROMRESOURCE()
RETURN NIL
FUNCTION GDIP_IMAGEFROMFILE()
RETURN NIL
FUNCTION GDIP_IMAGEFROMSTR()
RETURN NIL
FUNCTION GDIP_IMAGEINFO()
RETURN NIL
FUNCTION GDIP_ZOOM()
RETURN NIL
FUNCTION GDIP_NEWALPHABMP()
RETURN NIL
FUNCTION GDIP_SAVEIMAGE()
RETURN NIL
FUNCTION GDIP_IMG2BLOB()
RETURN NIL
FUNCTION GDIP_CROP()
RETURN NIL
FUNCTION GDIP_ROTATE()
RETURN NIL
FUNCTION GDIP_DRAWSHAPES()
RETURN NIL
FUNCTION GDIP_FILLRECT()
RETURN NIL
FUNCTION GDIP_GRAD()
RETURN NIL
FUNCTION GDIP_PIE()
RETURN NIL
FUNCTION GDIP_RATIO()
RETURN NIL
FUNCTION GDIP_DRAWIMAGE()
RETURN NIL
FUNCTION GDIP_FONTSTYLE()
RETURN NIL
FUNCTION GDIPMESURETXT()
RETURN NIL
FUNCTION GDIPLUSCAPTURERECTWND()
RETURN NIL
FUNCTION GDIPLUSIMGTOIMG24()
RETURN NIL
FUNCTION GDIPLUSIMAGECREATETHUMB()
RETURN NIL
FUNCTION GDIPLUSIMAGETOCLIPBOARD()
RETURN NIL
FUNCTION GDIPLUSHBITMAPTOCLIPBOARD()
RETURN NIL
FUNCTION GDIPLUSHIGHQUALITY()
RETURN NIL
FUNCTION GDIPLUSNORMALQUALITY()
RETURN NIL
FUNCTION GDIPLUSDRAWLINE()
RETURN NIL
FUNCTION GDIPLUSDRAWRECT()
RETURN NIL
FUNCTION GDIPLUSDRAWELLIPSE()
RETURN NIL
FUNCTION GDIPLUSDRAWARC()
RETURN NIL
FUNCTION GDIPLUSDRAWPATH()
RETURN NIL
FUNCTION GDIPLUSFILLPATH()
RETURN NIL
FUNCTION GDIPLUSCLEARCOLOR()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXT()
RETURN NIL
FUNCTION GDIPLUSSETSMOOTHINGGRAPHICS()
RETURN NIL
FUNCTION GDIPLUSGRAPHTRASLATETRANSFORM()
RETURN NIL
FUNCTION GDIPLUSGRAPHROTATETRANSFORM()
RETURN NIL
FUNCTION GDIPLUSGRAPHSCALE()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICS()
RETURN NIL
FUNCTION SETPAGEUNIT2PIXEL()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICSWND()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICSIMG()
RETURN NIL
FUNCTION GDIPLUSGRAPHICSFROMIMG()
RETURN NIL
FUNCTION GDIPLUSDELETEGRAPHICS()
RETURN NIL
FUNCTION GDIPLUSDRAWIMAGE()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXTFONT()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXTLF()
RETURN NIL
FUNCTION GDIPLUSISINREGION()
RETURN NIL
FUNCTION GDIPLUSCREATEREGIONFROMGPATH()
RETURN NIL
FUNCTION GDIPLUSDELETEPEN()
RETURN NIL
FUNCTION GDIPLUSPENSETCLR()
RETURN NIL
FUNCTION GDIPLUSALIGN()
RETURN NIL
FUNCTION GDIPLUSPENSETLINEJOIN()
RETURN NIL
FUNCTION GDIPLUSNOALIGN()
RETURN NIL
FUNCTION GDIPLUSPENSIZE()
RETURN NIL
FUNCTION GDIPLUSNEWPEN()
RETURN NIL
FUNCTION GDIPLUSPENSTYLE()
RETURN NIL
FUNCTION GDIPLUSNEWSOLIDBRUSH()
RETURN NIL
FUNCTION GDIPLUSDELETEBRUSH()
RETURN NIL
FUNCTION GDIPLUSNEWGRADIENTBRUSH()
RETURN NIL
FUNCTION GDIPLUSANGLEGRADIENTBRUSH()
RETURN NIL
FUNCTION GDIPLUSSTARTUP()
RETURN NIL
FUNCTION GDIPLUSSHUTDOWN()
RETURN NIL
FUNCTION GDIPLUSPATHADDARC()
RETURN NIL
FUNCTION GDIPLUSPATHADDELLIPSE()
RETURN NIL
FUNCTION GDIPLUSPATHADDLINE()
RETURN NIL
FUNCTION GDIPLUSPATHADDRECTANGLE()
RETURN NIL
FUNCTION GDIPLUSPATHCLOSEFIGURE()
RETURN NIL
FUNCTION GDIPLUSPATHSTARTFIGURE()
RETURN NIL
FUNCTION GDIPLUSROTATEPATH()
RETURN NIL
FUNCTION GDIPLUSROTATECENTERPATH()
RETURN NIL
FUNCTION GDIPLUSSCALEPATH()
RETURN NIL
FUNCTION GDIPLUSTRANSLATEPATH()
RETURN NIL
FUNCTION GDIPLUSCREATEPATH()
RETURN NIL
FUNCTION GDIPLUSPATHADDSTRING()
RETURN NIL
FUNCTION GDIPLUSDELETEPATH()
RETURN NIL
FUNCTION GDIPLUSCREATEIMAGEFROMRES()
RETURN NIL
FUNCTION GDIPLUSIMAGEMATRIXTOGRAY()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETALPHA()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETBLUE()
RETURN NIL
FUNCTION GDIPLUSIMAGEGETPIXCOLOR()
RETURN NIL
FUNCTION GDIPLUSPIXISCOLOR()
RETURN NIL
FUNCTION GDIPLUSCREATEHBITMAPIMAGE()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETGREEN()
RETURN NIL
FUNCTION GDIPLUSGETHEIGHTBITMAP()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETRED()
RETURN NIL
FUNCTION GDIPLUSGETWIDTHBITMAP()
RETURN NIL
FUNCTION GDIPLUSIMAGEIS32BITS()
RETURN NIL
FUNCTION GDIPLUSIMAGEROTATEANGLE()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADPNGFROMSTR()
RETURN NIL
FUNCTION GDIPLUSIMAGEROTATEFLIP()
RETURN NIL
FUNCTION GDIPLUSIMAGESET32BITS()
RETURN NIL
FUNCTION GDIPLUSIMAGESETPIXCOLOR()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXTOGRAYCOLOR()
RETURN NIL
FUNCTION GDIPLUSIMAGEMATRIXCUSTOM()
RETURN NIL
FUNCTION GDIPLUSIMAGESETPIXHCOLOR()
RETURN NIL
FUNCTION GDIPLUSPIXELCOLORTOALPHA()
RETURN NIL
FUNCTION GDIPLUSIMAGESCALE()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADPNGFROMRESOURCES()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADCACHEDFILE()
RETURN NIL
FUNCTION GDIPLUSIMAGESAVEQUALITY()
RETURN NIL
FUNCTION GDIPLUSIMAGESAVE()
RETURN NIL
FUNCTION GDIPLUSIMAGEDISPOSE()
RETURN NIL
FUNCTION GDIPLUSIMAGERESIZE()
RETURN NIL
FUNCTION GDIPLUSEMFTOJPG()
RETURN NIL
FUNCTION GDIPLUSIMAGECROP()
RETURN NIL
FUNCTION GDIPLUSEMFTOBMP()
RETURN NIL
FUNCTION GDIPLUSLOADDIRECTIMAGE()
RETURN NIL
FUNCTION GDIPLUSIMGGETFRAMECOUNT()
RETURN NIL
FUNCTION GDIPLUSIMGGETFRAME()
RETURN NIL
FUNCTION GDIPLUSBMPEMPTY()
RETURN NIL
Code: Select all | Expand
FUNCTION GDIP_DRAWARROW()
RETURN NIL
FUNCTION GDIP_DELETEIMAGE()
RETURN NIL
FUNCTION GDIP_DELETEBRUSH()
RETURN NIL
FUNCTION GDIP_COLORBRUSH()
RETURN NIL
FUNCTION GDIP_IMAGEBRUSH()
RETURN NIL
FUNCTION GDIP_DRAWTEXT()
RETURN NIL
FUNCTION GDIP_HOLLOWTEXT()
RETURN NIL
FUNCTION GDIP_SAYIMAGE()
RETURN NIL
FUNCTION GDIP_RINGGRAD()
RETURN NIL
FUNCTION GDIP_CLONEIMAGE()
RETURN NIL
FUNCTION GDIP_GETHBITMAP()
RETURN NIL
FUNCTION GDIP_FROMHBITMAP()
RETURN NIL
FUNCTION GDIP_FROMRESOURCE()
RETURN NIL
FUNCTION GDIP_IMAGEFROMFILE()
RETURN NIL
FUNCTION GDIP_IMAGEFROMSTR()
RETURN NIL
FUNCTION GDIP_IMAGEINFO()
RETURN NIL
FUNCTION GDIP_ZOOM()
RETURN NIL
FUNCTION GDIP_NEWALPHABMP()
RETURN NIL
FUNCTION GDIP_SAVEIMAGE()
RETURN NIL
FUNCTION GDIP_IMG2BLOB()
RETURN NIL
FUNCTION GDIP_CROP()
RETURN NIL
FUNCTION GDIP_ROTATE()
RETURN NIL
FUNCTION GDIP_DRAWSHAPES()
RETURN NIL
FUNCTION GDIP_FILLRECT()
RETURN NIL
FUNCTION GDIP_GRAD()
RETURN NIL
FUNCTION GDIP_PIE()
RETURN NIL
FUNCTION GDIP_RATIO()
RETURN NIL
FUNCTION GDIP_DRAWIMAGE()
RETURN NIL
FUNCTION GDIP_FONTSTYLE()
RETURN NIL
FUNCTION GDIPMESURETXT()
RETURN NIL
FUNCTION GDIPLUSCAPTURERECTWND()
RETURN NIL
FUNCTION GDIPLUSIMGTOIMG24()
RETURN NIL
FUNCTION GDIPLUSIMAGECREATETHUMB()
RETURN NIL
FUNCTION GDIPLUSIMAGETOCLIPBOARD()
RETURN NIL
FUNCTION GDIPLUSHBITMAPTOCLIPBOARD()
RETURN NIL
FUNCTION GDIPLUSHIGHQUALITY()
RETURN NIL
FUNCTION GDIPLUSNORMALQUALITY()
RETURN NIL
FUNCTION GDIPLUSDRAWLINE()
RETURN NIL
FUNCTION GDIPLUSDRAWRECT()
RETURN NIL
FUNCTION GDIPLUSDRAWELLIPSE()
RETURN NIL
FUNCTION GDIPLUSDRAWARC()
RETURN NIL
FUNCTION GDIPLUSDRAWPATH()
RETURN NIL
FUNCTION GDIPLUSFILLPATH()
RETURN NIL
FUNCTION GDIPLUSCLEARCOLOR()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXT()
RETURN NIL
FUNCTION GDIPLUSSETSMOOTHINGGRAPHICS()
RETURN NIL
FUNCTION GDIPLUSGRAPHTRASLATETRANSFORM()
RETURN NIL
FUNCTION GDIPLUSGRAPHROTATETRANSFORM()
RETURN NIL
FUNCTION GDIPLUSGRAPHSCALE()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICS()
RETURN NIL
FUNCTION SETPAGEUNIT2PIXEL()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICSWND()
RETURN NIL
FUNCTION GDIPLUSNEWGRAPHICSIMG()
RETURN NIL
FUNCTION GDIPLUSGRAPHICSFROMIMG()
RETURN NIL
FUNCTION GDIPLUSDELETEGRAPHICS()
RETURN NIL
FUNCTION GDIPLUSDRAWIMAGE()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXTFONT()
RETURN NIL
FUNCTION GDIPLUSDRAWTEXTLF()
RETURN NIL
FUNCTION GDIPLUSISINREGION()
RETURN NIL
FUNCTION GDIPLUSCREATEREGIONFROMGPATH()
RETURN NIL
FUNCTION GDIPLUSDELETEPEN()
RETURN NIL
FUNCTION GDIPLUSPENSETCLR()
RETURN NIL
FUNCTION GDIPLUSALIGN()
RETURN NIL
FUNCTION GDIPLUSPENSETLINEJOIN()
RETURN NIL
FUNCTION GDIPLUSNOALIGN()
RETURN NIL
FUNCTION GDIPLUSPENSIZE()
RETURN NIL
FUNCTION GDIPLUSNEWPEN()
RETURN NIL
FUNCTION GDIPLUSPENSTYLE()
RETURN NIL
FUNCTION GDIPLUSNEWSOLIDBRUSH()
RETURN NIL
FUNCTION GDIPLUSDELETEBRUSH()
RETURN NIL
FUNCTION GDIPLUSNEWGRADIENTBRUSH()
RETURN NIL
FUNCTION GDIPLUSANGLEGRADIENTBRUSH()
RETURN NIL
FUNCTION GDIPLUSSTARTUP()
RETURN NIL
FUNCTION GDIPLUSSHUTDOWN()
RETURN NIL
FUNCTION GDIPLUSPATHADDARC()
RETURN NIL
FUNCTION GDIPLUSPATHADDELLIPSE()
RETURN NIL
FUNCTION GDIPLUSPATHADDLINE()
RETURN NIL
FUNCTION GDIPLUSPATHADDRECTANGLE()
RETURN NIL
FUNCTION GDIPLUSPATHCLOSEFIGURE()
RETURN NIL
FUNCTION GDIPLUSPATHSTARTFIGURE()
RETURN NIL
FUNCTION GDIPLUSROTATEPATH()
RETURN NIL
FUNCTION GDIPLUSROTATECENTERPATH()
RETURN NIL
FUNCTION GDIPLUSSCALEPATH()
RETURN NIL
FUNCTION GDIPLUSTRANSLATEPATH()
RETURN NIL
FUNCTION GDIPLUSCREATEPATH()
RETURN NIL
FUNCTION GDIPLUSPATHADDSTRING()
RETURN NIL
FUNCTION GDIPLUSDELETEPATH()
RETURN NIL
FUNCTION GDIPLUSCREATEIMAGEFROMRES()
RETURN NIL
FUNCTION GDIPLUSIMAGEMATRIXTOGRAY()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETALPHA()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETBLUE()
RETURN NIL
FUNCTION GDIPLUSIMAGEGETPIXCOLOR()
RETURN NIL
FUNCTION GDIPLUSPIXISCOLOR()
RETURN NIL
FUNCTION GDIPLUSCREATEHBITMAPIMAGE()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETGREEN()
RETURN NIL
FUNCTION GDIPLUSGETHEIGHTBITMAP()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXGETRED()
RETURN NIL
FUNCTION GDIPLUSGETWIDTHBITMAP()
RETURN NIL
FUNCTION GDIPLUSIMAGEIS32BITS()
RETURN NIL
FUNCTION GDIPLUSIMAGEROTATEANGLE()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADPNGFROMSTR()
RETURN NIL
FUNCTION GDIPLUSIMAGEROTATEFLIP()
RETURN NIL
FUNCTION GDIPLUSIMAGESET32BITS()
RETURN NIL
FUNCTION GDIPLUSIMAGESETPIXCOLOR()
RETURN NIL
FUNCTION GDIPLUSIMAGEPIXTOGRAYCOLOR()
RETURN NIL
FUNCTION GDIPLUSIMAGEMATRIXCUSTOM()
RETURN NIL
FUNCTION GDIPLUSIMAGESETPIXHCOLOR()
RETURN NIL
FUNCTION GDIPLUSPIXELCOLORTOALPHA()
RETURN NIL
FUNCTION GDIPLUSIMAGESCALE()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADPNGFROMRESOURCES()
RETURN NIL
FUNCTION GDIPLUSIMAGELOADCACHEDFILE()
RETURN NIL
FUNCTION GDIPLUSIMAGESAVEQUALITY()
RETURN NIL
FUNCTION GDIPLUSIMAGESAVE()
RETURN NIL
FUNCTION GDIPLUSIMAGEDISPOSE()
RETURN NIL
FUNCTION GDIPLUSIMAGERESIZE()
RETURN NIL
FUNCTION GDIPLUSEMFTOJPG()
RETURN NIL
FUNCTION GDIPLUSIMAGECROP()
RETURN NIL
FUNCTION GDIPLUSEMFTOBMP()
RETURN NIL
FUNCTION GDIPLUSLOADDIRECTIMAGE()
RETURN NIL
FUNCTION GDIPLUSIMGGETFRAMECOUNT()
RETURN NIL
FUNCTION GDIPLUSIMGGETFRAME()
RETURN NIL
FUNCTION GDIPLUSBMPEMPTY()
RETURN NIL
Code: Select all | Expand
#pragma BEGINDUMP
#include <Windows.h>
#undef SetWindowLongPtr
long int SetWindowLongPtr( HWND hWnd, int nIndex, long int dwNewLong )
{
return SetWindowLong( hWnd, nIndex, ( LONG_PTR ) dwNewLong );
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#pragma BEGINDUMP
#include <Windows.h>
#undef SetWindowLongPtr
long int SetWindowLongPtr( HWND hWnd, int nIndex, long int dwNewLong )
{
return SetWindowLong( hWnd, nIndex, ( LONG_PTR ) dwNewLong );
}
#pragma ENDDUMP
]]>Code: Select all | Expand
function GPF()
hb_memoWrit( "gpf.log", cCallStack( CRLF, 1 ) )
return nil
Code: Select all | Expand
#pragma BEGINDUMP
#include <Windows.h>
#include <hbapi.h>
#include <hbvm.h>
#undef SetWindowLongPtr
LONG WINAPI GPFHandler( PEXCEPTION_POINTERS exceptionInfo )
{
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "GPF" ) ) );
hb_vmPushNil();
hb_vmDo( 0 );
return EXCEPTION_EXECUTE_HANDLER; // Maneja la excepción y termina
}
unsigned int SetWindowLongPtr( HWND hWnd, int nIndex, long int dwNewLong )
{
SetUnhandledExceptionFilter( GPFHandler );
return SetWindowLong( hWnd, nIndex, ( LONG_PTR ) dwNewLong );
}
#pragma ENDDUMP
Code: Select all | Expand
function GPF()
hb_memoWrit( "gpf.log", cCallStack( CRLF, 1 ) )
return nil
Code: Select all | Expand
#pragma BEGINDUMP
#include <Windows.h>
#include <hbapi.h>
#include <hbvm.h>
#undef SetWindowLongPtr
LONG WINAPI GPFHandler( PEXCEPTION_POINTERS exceptionInfo )
{
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "GPF" ) ) );
hb_vmPushNil();
hb_vmDo( 0 );
return EXCEPTION_EXECUTE_HANDLER; // Maneja la excepción y termina
}
unsigned int SetWindowLongPtr( HWND hWnd, int nIndex, long int dwNewLong )
{
SetUnhandledExceptionFilter( GPFHandler );
return SetWindowLong( hWnd, nIndex, ( LONG_PTR ) dwNewLong );
}
#pragma ENDDUMP
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oBar
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "MDIChilds from resources" MDI
oWnd:Maximize()
oWnd:Show()
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar // ACTION child() //( Child(), MsgInfo( oWnd:oWndClient:aWnd[ 1 ]:cCaption ) )
ACTIVATE WINDOW oWnd maximized ;
ON INIT ( MSGINFO("On Init") ) // Added
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oBar
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "MDIChilds from resources" MDI
oWnd:Maximize()
oWnd:Show()
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar // ACTION child() //( Child(), MsgInfo( oWnd:oWndClient:aWnd[ 1 ]:cCaption ) )
ACTIVATE WINDOW oWnd maximized ;
ON INIT ( MSGINFO("On Init") ) // Added
return nil
Code: Select all | Expand
// C:\FWH\SAMPLES\MDISHOW.PRG
#include "FiveWin.ch"
STATIC oWnd, oWndChild
FUNCTION Main()
LOCAL oBar, oChild, oSalida
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "MDIChilds from resources" MDI
DEFINE BUTTONBAR oBar BUTTONSIZE 50, 50 _3DLOOK TOP OF oWnd 2015
DEFINE BUTTON oChild OF OBAR PROMPT "Child()" ;
MESSAGE "Child" ;
ACTION( Child() ) ;
TOOLTIP "Child()" ;
NOBORDER GROUP
DEFINE BUTTON oSalida OF OBAR PROMPT "Exit" ;
MESSAGE "Salida" ;
ACTION( oWnd:End() ) ;
TOOLTIP "Salida" ;
NOBORDER GROUP
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT( oWnd:oMenu:End(), MsgInfo( "On Init" ) )
RETURN NIL
STATIC FUNCTION Child()
LOCAL cTitle
cTitle := ( oWnd:cCaption )
DEFINE WINDOW oWndChild MDICHILD FROM 0, 0 TO 32, 100 OF oWnd TITLE cTitle
ACTIVATE WINDOW oWndChild
RETURN NIL
// FIN / END
Regards, saludos.]]>Code: Select all | Expand
// C:\FWH\SAMPLES\MDISHOW.PRG
#include "FiveWin.ch"
STATIC oWnd, oWndChild
FUNCTION Main()
LOCAL oBar, oChild, oSalida
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "MDIChilds from resources" MDI
DEFINE BUTTONBAR oBar BUTTONSIZE 50, 50 _3DLOOK TOP OF oWnd 2015
DEFINE BUTTON oChild OF OBAR PROMPT "Child()" ;
MESSAGE "Child" ;
ACTION( Child() ) ;
TOOLTIP "Child()" ;
NOBORDER GROUP
DEFINE BUTTON oSalida OF OBAR PROMPT "Exit" ;
MESSAGE "Salida" ;
ACTION( oWnd:End() ) ;
TOOLTIP "Salida" ;
NOBORDER GROUP
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT( oWnd:oMenu:End(), MsgInfo( "On Init" ) )
RETURN NIL
STATIC FUNCTION Child()
LOCAL cTitle
cTitle := ( oWnd:cCaption )
DEFINE WINDOW oWndChild MDICHILD FROM 0, 0 TO 32, 100 OF oWnd TITLE cTitle
ACTIVATE WINDOW oWndChild
RETURN NIL
// FIN / END
Regards, saludos.]]>Code: Select all | Expand
hbcurl.lib
libcurl.lib
Code: Select all | Expand
hbcurl.lib
libcurl.lib
Code: Select all | Expand
ALTER TABLE `mibase`.`mitabla` AUTO_INCREMENT=500;
Code: Select all | Expand
UPDATE mitabla SET id = id +60 ORDER BY id DESC
Code: Select all | Expand
ALTER TABLE `mibase`.`mitabla` AUTO_INCREMENT=500;
Code: Select all | Expand
UPDATE mitabla SET id = id +60 ORDER BY id DESC
Code: Select all | Expand
cCOD:="123"
oSql:=oCn:RowSet( "SELECT * FROM DATOS WHERE CODIGO = ? ORDER BY CODIGO",{cCOD})
oSql:GoTop()
Do While !oSql:Eof()
oSql:Delete()
oSql:Skip()
Enddo
Code: Select all | Expand
cCOD:="123"
oSql:=oCn:RowSet( "SELECT * FROM DATOS WHERE CODIGO = ? ORDER BY CODIGO",{cCOD})
oSql:GoTop()
Do While !oSql:Eof()
oSql:Delete()
oSql:Skip()
Enddo
Code: Select all | Expand
DELETE FROM DATOS WHERE CODIGO = '123'
]]>Code: Select all | Expand
DELETE FROM DATOS WHERE CODIGO = '123'
]]>Code: Select all | Expand
"DELETE FROM DATOS WHERE CODIGO = '" + cCod + "'"
Code: Select all | Expand
"DELETE FROM DATOS WHERE CODIGO = '" + cCod + "'"
Code: Select all | Expand
FUNCTION testDelete()
LOCAL cTabla := "datos" //%1
LOCAL cCod := "123" //%2
LOCAL cQry := ""
TEXT INTO cQry
DELETE FROM %1
WHERE codigo=%2
ENDTEXT
cQry := StrFormat( cQry, cTabla, ClipValue2SQL(cCod) )
oCon:Execute( cQry )
RETURN (NIL)
]]>Code: Select all | Expand
FUNCTION testDelete()
LOCAL cTabla := "datos" //%1
LOCAL cCod := "123" //%2
LOCAL cQry := ""
TEXT INTO cQry
DELETE FROM %1
WHERE codigo=%2
ENDTEXT
cQry := StrFormat( cQry, cTabla, ClipValue2SQL(cCod) )
oCon:Execute( cQry )
RETURN (NIL)
]]>Gracias amados maestro.cnavarro wrote: Mon Apr 07, 2025 12:23 pm Estimado Joao
En los says, msginfo, etc. si es posible, pero en los gets, como bien sabes, todas las aplicaciones para incluirlo en un campo de tipo input ( get en harbour/fw ) usan un boton para que el usuario seleccione el emoji que desea, imagino que será para evitar tener que validar/analizar lo que se ha introducido y buscar las cadenas unicode que dan lugar al emoji
Tengo que hacer alguna prueba y te comento
Gracias amados maestro.cnavarro wrote: Mon Apr 07, 2025 12:23 pm Estimado Joao
En los says, msginfo, etc. si es posible, pero en los gets, como bien sabes, todas las aplicaciones para incluirlo en un campo de tipo input ( get en harbour/fw ) usan un boton para que el usuario seleccione el emoji que desea, imagino que será para evitar tener que validar/analizar lo que se ha introducido y buscar las cadenas unicode que dan lugar al emoji
Tengo que hacer alguna prueba y te comento
Code: Select all | Expand
// C:\FWH\SAMPLES\EMOJI.PRG
#include "FiveWin.Ch"
FUNCTION Main()
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, nVar2 := 0, nVar3 := 0, ;
dVar4 := Date(), oFont, oSay
LOCAL cEmoj := Space( 100 )
FW_SetUnicode( .T. )
cEmoj := "Emoji: 8-) - }:-) :angry: @};- "
// DEFINE FONT oFont NAME "Segoe UI Emoji" SIZE 0, -14 // No funciona
// Link: https://www.fontyukle.net/downloadfont/Emoticons
DEFINE FONT oFont NAME "Emoticons" SIZE 0, -14 BOLD // Funciona
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 400 PIXEL
@ 15, 15 GET oGet1 VAR cEmoj SIZE 200, 16 OF oDlg PIXEL FONT oFont
@ 40, 15 GET oGet2 VAR nVar2 PICTURE "99999" SIZE 50, 12 OF oDlg PIXEL
@ 65, 15 GET oGet3 VAR nVar3 PICTURE "99999.99" SIZE 50, 12 OF oDlg PIXEL right
@ 90, 15 GET oSay VAR cEmoj SIZE 150, 15 OF oDlg PIXEL FONT oFont NOBORDER
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// FIN / END
Code: Select all | Expand
// C:\FWH\SAMPLES\EMOJI.PRG
#include "FiveWin.Ch"
FUNCTION Main()
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, nVar2 := 0, nVar3 := 0, ;
dVar4 := Date(), oFont, oSay
LOCAL cEmoj := Space( 100 )
FW_SetUnicode( .T. )
cEmoj := "Emoji: 8-) - }:-) :angry: @};- "
// DEFINE FONT oFont NAME "Segoe UI Emoji" SIZE 0, -14 // No funciona
// Link: https://www.fontyukle.net/downloadfont/Emoticons
DEFINE FONT oFont NAME "Emoticons" SIZE 0, -14 BOLD // Funciona
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 400 PIXEL
@ 15, 15 GET oGet1 VAR cEmoj SIZE 200, 16 OF oDlg PIXEL FONT oFont
@ 40, 15 GET oGet2 VAR nVar2 PICTURE "99999" SIZE 50, 12 OF oDlg PIXEL
@ 65, 15 GET oGet3 VAR nVar3 PICTURE "99999.99" SIZE 50, 12 OF oDlg PIXEL right
@ 90, 15 GET oSay VAR cEmoj SIZE 150, 15 OF oDlg PIXEL FONT oFont NOBORDER
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// FIN / END
Code: Select all | Expand
// No funciona
DEFINE FONT oFont NAME "Segoe UI Emoji Normal" SIZE 0, -14
Code: Select all | Expand
// No funciona
DEFINE FONT oFont NAME "Segoe UI Emoji Normal" SIZE 0, -14
Code: Select all | Expand
// C:\FWH\SAMPLES\EMOJI.PRG
#include "FiveWin.Ch"
FUNCTION Main()
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, nVar2 := 0, nVar3 := 0, ;
dVar4 := Date(), oFont, oSay
LOCAL cEmoj := Space( 100 )
FW_SetUnicode( .T. )
cEmoj := "Emoji: 8-) - }:-) :angry: @};- "
// https://github.com/thedemons/merge_color_emoji_font/blob/main/seguiemj.ttf
DEFINE FONT oFont NAME "Segoe UI Emoji Normal" SIZE 0, -14 // No funciona
// Link: https://www.fontyukle.net/downloadfont/Emoticons
// DEFINE FONT oFont NAME "Emoticons" SIZE 0, -14 BOLD // Funciona
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 400 PIXEL
@ 15, 15 GET oGet1 VAR cEmoj SIZE 200, 16 OF oDlg PIXEL FONT oFont
@ 40, 15 GET oGet2 VAR nVar2 PICTURE "99999" SIZE 50, 12 OF oDlg PIXEL
@ 65, 15 GET oGet3 VAR nVar3 PICTURE "99999.99" SIZE 50, 12 OF oDlg PIXEL right
@ 90, 15 GET oSay VAR cEmoj SIZE 150, 15 OF oDlg PIXEL FONT oFont NOBORDER
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
// FIN / END
Code: Select all | Expand
// C:\FWH\SAMPLES\EMOJI.PRG
#include "FiveWin.Ch"
FUNCTION Main()
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, nVar2 := 0, nVar3 := 0, ;
dVar4 := Date(), oFont, oSay
LOCAL cEmoj := Space( 100 )
FW_SetUnicode( .T. )
cEmoj := "Emoji: 8-) - }:-) :angry: @};- "
// https://github.com/thedemons/merge_color_emoji_font/blob/main/seguiemj.ttf
DEFINE FONT oFont NAME "Segoe UI Emoji Normal" SIZE 0, -14 // No funciona
// Link: https://www.fontyukle.net/downloadfont/Emoticons
// DEFINE FONT oFont NAME "Emoticons" SIZE 0, -14 BOLD // Funciona
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 400 PIXEL
@ 15, 15 GET oGet1 VAR cEmoj SIZE 200, 16 OF oDlg PIXEL FONT oFont
@ 40, 15 GET oGet2 VAR nVar2 PICTURE "99999" SIZE 50, 12 OF oDlg PIXEL
@ 65, 15 GET oGet3 VAR nVar3 PICTURE "99999.99" SIZE 50, 12 OF oDlg PIXEL right
@ 90, 15 GET oSay VAR cEmoj SIZE 150, 15 OF oDlg PIXEL FONT oFont NOBORDER
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
// FIN / END
A riesgo de estar equivocado, no lo veo yo así. La anulación como operacion existe y es perfectamente válida, no ahora, sino desde siempre. Incluso se puede borrar en la base de datos quedando el hueco de la factura.Si por anular te refieres a borrar (delete) un registro como se borra de una base de datos no se puede. Debes de generar una factura nueva que rectifique la erronea. El término rectificar no se refiere al significado intuitivo que tenemos de modificar. No es modificar. Es generar un nuevo registro enlazado con el original erroneo que en el conjunto de operaciones lo que hace es "rectificar" la factura original erronea. La aeat no quiere que borres nada, todo se queda grabado, permitiendo en una revisión poder ir hacia atrás per secula seculorum.
A riesgo de estar equivocado, no lo veo yo así. La anulación como operacion existe y es perfectamente válida, no ahora, sino desde siempre. Incluso se puede borrar en la base de datos quedando el hueco de la factura.Si por anular te refieres a borrar (delete) un registro como se borra de una base de datos no se puede. Debes de generar una factura nueva que rectifique la erronea. El término rectificar no se refiere al significado intuitivo que tenemos de modificar. No es modificar. Es generar un nuevo registro enlazado con el original erroneo que en el conjunto de operaciones lo que hace es "rectificar" la factura original erronea. La aeat no quiere que borres nada, todo se queda grabado, permitiendo en una revisión poder ir hacia atrás per secula seculorum.
RespuestaRevisando las FAQ del SII que indican e intentando aplicar a la lógica VeriFactu
Ejemplo 1: Disminución de la base imponible, Opcion 2 :
La modificación por sustitución supondría emitir una factura con base imponible de -1000 € y una factura rectificativa en la que se indicará que la base imponible es de 800 €.
* 1a. Factura, TipoFactura = F1
Desglose IVA: se indicará el importe que se rectifica con signo contrario (base imponible: (-1.000), cuota repercutida (-210)
* 2a. Factura, TipoFactura = Rx
TipoRectificativa = S
Desglose IVA: se indicará que la base imponible es de 800, cuota repercutida 168
Pueden indicar la diferencia entre aplicar lo anterior y lo siguiente :
* 1a. Anulacion de factura. Se emite factura por parte del SIF en negativo, pero se informa a VeriFactu como registro de anulación, no de alta (F1)
* 2a. Se emite una nueva factura, como alta inicial (F1) con los datos correctos
Creo que hay 2 temas a considerarEl procedimiento sería el mismo que el realizado en el SII. A pesar de que comúnmente se hable de anular una factura cuando estamos emitiendo una factura de abono o negativa para contrarrestar una anterior emitida con errores, lo que realmente se está realizando es emitir una nueva factura de tipo F1 con importes negativos.
Por lo cual, en VERIFACTU se realizaría el mismo proceso que en el SII:
1. Emisión de factura con importes negativos. Su registro de facturación será una alta inicial de tipo F1 con los importes negativos que correspondan.
2. Emisión de factura rectificativa. Su registro de facturación será una alta inicial de tipo RX con los importes que correspondan.
La generación de un RF de anulación está pensado como una forma ágil de dejar constancia que una factura expedida por error (siempre y cuando el ROF no obligue a actuar de otra forma, mediante facturas rectificativas) no debería haberse expedido y, por tanto, que dicha factura no tiene validez y no ha de tenerse en cuenta. Esta forma de actuar (cuando sea posible) no implica la expedición de nuevas facturas que "contrarresten o compensen" la factura expedida por error. No obstante, siempre prima el procedimiento establecido por el reglamento de obligaciones de facturación (un posible factor a tener en cuenta también es si la factura que se plantea anular se ha entregado o no al cliente). Por lo tanto, las anulaciones deberían ser casos excepcionales.
RespuestaRevisando las FAQ del SII que indican e intentando aplicar a la lógica VeriFactu
Ejemplo 1: Disminución de la base imponible, Opcion 2 :
La modificación por sustitución supondría emitir una factura con base imponible de -1000 € y una factura rectificativa en la que se indicará que la base imponible es de 800 €.
* 1a. Factura, TipoFactura = F1
Desglose IVA: se indicará el importe que se rectifica con signo contrario (base imponible: (-1.000), cuota repercutida (-210)
* 2a. Factura, TipoFactura = Rx
TipoRectificativa = S
Desglose IVA: se indicará que la base imponible es de 800, cuota repercutida 168
Pueden indicar la diferencia entre aplicar lo anterior y lo siguiente :
* 1a. Anulacion de factura. Se emite factura por parte del SIF en negativo, pero se informa a VeriFactu como registro de anulación, no de alta (F1)
* 2a. Se emite una nueva factura, como alta inicial (F1) con los datos correctos
Creo que hay 2 temas a considerarEl procedimiento sería el mismo que el realizado en el SII. A pesar de que comúnmente se hable de anular una factura cuando estamos emitiendo una factura de abono o negativa para contrarrestar una anterior emitida con errores, lo que realmente se está realizando es emitir una nueva factura de tipo F1 con importes negativos.
Por lo cual, en VERIFACTU se realizaría el mismo proceso que en el SII:
1. Emisión de factura con importes negativos. Su registro de facturación será una alta inicial de tipo F1 con los importes negativos que correspondan.
2. Emisión de factura rectificativa. Su registro de facturación será una alta inicial de tipo RX con los importes que correspondan.
La generación de un RF de anulación está pensado como una forma ágil de dejar constancia que una factura expedida por error (siempre y cuando el ROF no obligue a actuar de otra forma, mediante facturas rectificativas) no debería haberse expedido y, por tanto, que dicha factura no tiene validez y no ha de tenerse en cuenta. Esta forma de actuar (cuando sea posible) no implica la expedición de nuevas facturas que "contrarresten o compensen" la factura expedida por error. No obstante, siempre prima el procedimiento establecido por el reglamento de obligaciones de facturación (un posible factor a tener en cuenta también es si la factura que se plantea anular se ha entregado o no al cliente). Por lo tanto, las anulaciones deberían ser casos excepcionales.
Code: Select all | Expand
cMsg := "SELECT mesv,t AS Aux,vou,cuenta,SUM(debes) AS debe,SUM(habers) AS haber "
cMsg += "FROM voucher_mov "
cMsg += "WHERE empresa=? AND periodo=? AND mesv=? AND ((debes != TRUNCATE(debes, 2)) OR (habers != TRUNCATE(habers, 2))) "
cMsg += "GROUP BY mesv,t,vou,cuenta "
cMsg += "ORDER BY mesv,t,vou"
cQry := aServer:RowSet( cMsg ,{op:empresa,op:ano,op:mes} )
WaitOff( @oWait )
If cQry:lastrec()>0
XBrowse( cQry,"ANALISIS DE ASIENTOS CON DECIMALES > 2 DIGITOS" )
Else
MsgStop( "NO EXISTE OPERACIONES A REVISAR","STOP")
EndIf
cQry:End()
Code: Select all | Expand
cMsg := "SELECT mesv,t AS Aux,vou,cuenta,SUM(debes) AS debe,SUM(habers) AS haber "
cMsg += "FROM voucher_mov "
cMsg += "WHERE empresa=? AND periodo=? AND mesv=? AND ((debes != TRUNCATE(debes, 2)) OR (habers != TRUNCATE(habers, 2))) "
cMsg += "GROUP BY mesv,t,vou,cuenta "
cMsg += "ORDER BY mesv,t,vou"
cQry := aServer:RowSet( cMsg ,{op:empresa,op:ano,op:mes} )
WaitOff( @oWait )
If cQry:lastrec()>0
XBrowse( cQry,"ANALISIS DE ASIENTOS CON DECIMALES > 2 DIGITOS" )
Else
MsgStop( "NO EXISTE OPERACIONES A REVISAR","STOP")
EndIf
cQry:End()
Code: Select all | Expand
cMsg := "SELECT mesv,t AS Aux,vou,cuenta,SUM(debes) AS debe,SUM(habers) AS haber "
cMsg += "FROM voucher_mov "
cMsg += "WHERE empresa=? AND periodo=? AND mesv=? AND ((debes != TRUNCATE(debes, 2)) OR (habers != TRUNCATE(habers, 2))) "
cMsg += "GROUP BY mesv,t,vou,cuenta "
cMsg += "ORDER BY mesv,t,vou"
cQry := aServer:RowSet( cMsg ,{op:empresa,op:ano,op:mes} )
WaitOff( @oWait )
If cQry:lastrec()>0
XBrowse( cQry,"ANALISIS DE ASIENTOS CON DECIMALES > 2 DIGITOS" )
Else
MsgStop( "NO EXISTE OPERACIONES A REVISAR","STOP")
EndIf
cQry:End()
Code: Select all | Expand
cMsg := "SELECT mesv,t AS Aux,vou,cuenta,SUM(debes) AS debe,SUM(habers) AS haber "
cMsg += "FROM voucher_mov "
cMsg += "WHERE empresa=? AND periodo=? AND mesv=? AND ((debes != TRUNCATE(debes, 2)) OR (habers != TRUNCATE(habers, 2))) "
cMsg += "GROUP BY mesv,t,vou,cuenta "
cMsg += "ORDER BY mesv,t,vou"
cQry := aServer:RowSet( cMsg ,{op:empresa,op:ano,op:mes} )
WaitOff( @oWait )
If cQry:lastrec()>0
XBrowse( cQry,"ANALISIS DE ASIENTOS CON DECIMALES > 2 DIGITOS" )
Else
MsgStop( "NO EXISTE OPERACIONES A REVISAR","STOP")
EndIf
cQry:End()
Estas usando SET DECIMALS TO 4 ?CARLOS ATUNCAR wrote: Tue Apr 22, 2025 9:25 pm tengo una pantalla en XBROWSE() donde hay dos columnas numericas con 4 posiciones en los decimales y al enviarlo al excel lo envia con 4 posiciones en los decimales pero redondeados a 2
ejemplo
443.4784 en excel sale 443.4800
alguna solución hay que configurar algo
Estas usando SET DECIMALS TO 4 ?CARLOS ATUNCAR wrote: Tue Apr 22, 2025 9:25 pm tengo una pantalla en XBROWSE() donde hay dos columnas numericas con 4 posiciones en los decimales y al enviarlo al excel lo envia con 4 posiciones en los decimales pero redondeados a 2
ejemplo
443.4784 en excel sale 443.4800
alguna solución hay que configurar algo
Code: Select all | Expand
FUNCTION Main()
LOCAL aFiles:={}, cusuario:="user@dominio.com", cpassword:="pass", cftpsite:="ftp://dominio.com", oUrl
oUrl := tUrl():New( cftpsite )
oUrl:cUserid := cusuario
oUrl:cPassword := cpassword
oFTP := tIPClientFtp():New( oUrl, .t. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .t.
oFtp:bTrace := {|| nil}
oFTP:Open()
IF oFtp <> NIL
aFiles:=oFtp:ListFiles("data\*.*")
xbrowse(aFiles)
ENDIF
RETURN nil
]]>Code: Select all | Expand
FUNCTION Main()
LOCAL aFiles:={}, cusuario:="user@dominio.com", cpassword:="pass", cftpsite:="ftp://dominio.com", oUrl
oUrl := tUrl():New( cftpsite )
oUrl:cUserid := cusuario
oUrl:cPassword := cpassword
oFTP := tIPClientFtp():New( oUrl, .t. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .t.
oFtp:bTrace := {|| nil}
oFTP:Open()
IF oFtp <> NIL
aFiles:=oFtp:ListFiles("data\*.*")
xbrowse(aFiles)
ENDIF
RETURN nil
]]>Code: Select all | Expand
FUNCTION Main()
LOCAL aFiles:={}, cusuario:="user@dominio.com", cpassword:="pass", cftpsite:="ftp://dominio.com", oUrl, oCredentials
oUrl := tUrl():New( cftpsite )
oCredentials := tIPCredentials():New()
oCredentials:cUserid := cusuario
oCredentials:cPassword := cpassword
oFTP := tIPClientFtp():New( oUrl, .t., oCredentials )
oFTP:nConnTimeout := 20000
oFTP:Open()
IF oFtp <> NIL
aFiles:=oFtp:ListFiles("data\*.*")
xbrowse(aFiles)
ENDIF
RETURN nil
Code: Select all | Expand
FUNCTION Main()
LOCAL aFiles:={}, cusuario:="user@dominio.com", cpassword:="pass", cftpsite:="ftp://dominio.com", oUrl, oCredentials
oUrl := tUrl():New( cftpsite )
oCredentials := tIPCredentials():New()
oCredentials:cUserid := cusuario
oCredentials:cPassword := cpassword
oFTP := tIPClientFtp():New( oUrl, .t., oCredentials )
oFTP:nConnTimeout := 20000
oFTP:Open()
IF oFtp <> NIL
aFiles:=oFtp:ListFiles("data\*.*")
xbrowse(aFiles)
ENDIF
RETURN nil
Code: Select all | Expand
#include "FiveWin.ch"
REQUEST HB_CODEPAGE_ESWIN
function Main()
local oWnd, oWebView
local oGemini := TGemini():New()
fw_SetUnicode( .F. )
hb_SetCodePage( "ESWIN" )
DEFINE WINDOW oWnd TITLE "Chat AI" SIZE 650, 800
oWebView = TWebView2():New( oWnd )
oWebView:SetHtml( hb_memoRead( "chat.html" ) )
oWebView:bOnBind = { | aInfo, cAnswer | oGemini:Send( aInfo[ 1 ] ),;
cAnswer := "sendResponse('" + hb_Utf8ToStr( oGemini:getValue() ) + "')",;
cAnswer := StrTran( cAnswer, Chr( 10 ), "" ),;
oWebView:Eval( cAnswer ) }
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE oWebView:SetSize( nWidth, nHeight )
oGemini:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
REQUEST HB_CODEPAGE_ESWIN
function Main()
local oWnd, oWebView
local oGemini := TGemini():New()
fw_SetUnicode( .F. )
hb_SetCodePage( "ESWIN" )
DEFINE WINDOW oWnd TITLE "Chat AI" SIZE 650, 800
oWebView = TWebView2():New( oWnd )
oWebView:SetHtml( hb_memoRead( "chat.html" ) )
oWebView:bOnBind = { | aInfo, cAnswer | oGemini:Send( aInfo[ 1 ] ),;
cAnswer := "sendResponse('" + hb_Utf8ToStr( oGemini:getValue() ) + "')",;
cAnswer := StrTran( cAnswer, Chr( 10 ), "" ),;
oWebView:Eval( cAnswer ) }
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE oWebView:SetSize( nWidth, nHeight )
oGemini:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := "Item 1"
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ;
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display()
local Self := QSelf()
FillRect( ::GetDC(), { 0, 0, 23, 23 }, TBrush():New( , CLR_RED ):hBrush )
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := "Item 1"
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ;
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display()
local Self := QSelf()
FillRect( ::GetDC(), { 0, 0, 23, 23 }, TBrush():New( , CLR_RED ):hBrush )
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { " ", "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local Self := QSelf()
local hDC := ::GetDC()
local aRect := GetClientRect( ::hWnd )
if Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_GREEN, 4 )
endif
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { " ", "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local Self := QSelf()
local hDC := ::GetDC()
local aRect := GetClientRect( ::hWnd )
if Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_GREEN, 4 )
endif
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { " ", "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local Self := QSelf()
local hDC := ::GetDC()
local aRect := GetClientRect( ::hWnd )
if Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_GREEN, 4 )
endif
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 2, 3 COMBOBOX oCmb VAR cSelected SIZE 100, 60 ;
ITEMS { " ", "Item 1", "Item 2", "Item 3" }
__clsAddMsg( oCmb:ClassH, "Display", @Display(), HB_OO_MSG_METHOD,, 1 )
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local Self := QSelf()
local hDC := ::GetDC()
local aRect := GetClientRect( ::hWnd )
if Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
CLR_GREEN, 4 )
endif
::ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 20, 20 GET oCmb VAR cSelected SIZE 110, 16 PIXEL
oCmb:bPainted := { || Display( oCmb ) }
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
if Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
endif
o:oWnd:ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "ComboBox Example" SIZE 300, 200 PIXEL
@ 20, 20 GET oCmb VAR cSelected SIZE 110, 16 PIXEL
oCmb:bPainted := { || Display( oCmb ) }
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
if Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
endif
o:oWnd:ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "TGet Example" SIZE 300, 200 PIXEL
@ 20, 20 GET oCmb VAR cSelected SIZE 110, 16 PIXEL
oCmb:bPainted := { || Display( oCmb ) }
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
if( Empty( o:Varget() ), CLR_RED, o:oWnd:nClrPane ), ;
if( Empty( o:Varget() ), 4, 4 ) ) // Esto ultimo es por si queremos poner otro color y cambiar el grueso de la linea
o:oWnd:ReleaseDC()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCmb, cSelected := " "
DEFINE DIALOG oDlg TITLE "TGet Example" SIZE 300, 200 PIXEL
@ 20, 20 GET oCmb VAR cSelected SIZE 110, 16 PIXEL
oCmb:bPainted := { || Display( oCmb ) }
@ 3, 8 BUTTON "OK" SIZE 50, 20 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
static function Display( o )
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
if( Empty( o:Varget() ), CLR_RED, o:oWnd:nClrPane ), ;
if( Empty( o:Varget() ), 4, 4 ) ) // Esto ultimo es por si queremos poner otro color y cambiar el grueso de la linea
o:oWnd:ReleaseDC()
return nil
Code: Select all | Expand
// C:\GETBORDE\TESTGET3.PRG - 26/04/2025 - By Kapiaba the best.
// MODIFICADO EM: 27/04/2025 - Por: Joao Santos - Sao Paulo/Brazil.
#include "fivewin.ch"
FUNCTION Main()
LOCAL oWnd, oMenu, oFont, oSkinB
SetBalloon( .T. ) // Balloon shape required for tooltips
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 0, 73, 138 ) } }
SkinButtons( oSkinB )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
MENU oMenu 2007
MenuItem "From Resource" ACTION FromrES( oWnd )
MENUITEM "&Salida" ACTION( oWnd:End() )
ENDMENU
DEFINE WINDOW oWnd TITLE "Test Button Get Transparent" MENU oMenu PIXEL
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd MAXIMIZED
oFont:End()
RETURN NIL
FUNCTION FromRes( oWnd )
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, cVar1, cVar2, cVar3, cVar4, oFont
LOCAL oBtnDisp, lActive := .F., cLinares, oGet, oFont2, oBtnVisu, oSay
LOCAL oSaida, oFnt, oCbx, cItem := "", aGrad
cVar1 := 0
cVar2 := 0
cVar3 := 0
cVar4 := 0
cLinares := SPACE(50)
cLinares := oEmToAnsi( "USER: ANTONIO LI¥ARES CA¥AS" )
aGrad := { { .50, nRGB( 210, 235, 216 ), nRGB( 255, 255, 255 ) } }
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFont2 NAME "Ms Sans Serif" SIZE 00, -18 BOLD
DEFINE DIALOG oDlg RESOURCE "fromres" OF oWnd GRADIENT aGrad FONT oFont
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
REDEFINE SAY ID 401 OF oDlg COLORS METRO_AMBER, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 402 OF oDlg COLORS METRO_PINK, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 403 OF oDlg COLORS METRO_COBALT, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 430 OF oDlg COLORS CLR_BLACK, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE GET oGet1 VAR cVar1 id 100 bitmap "on" UPDATE ;
ACTION( msginfo( "With Transparent" ) ) of oDlg
oGet1:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet2 VAR cVar2 id 101 bitmap "on"UPDATE ;
ACTION( msginfo( "Without Transparent" ) ) of oDlg
oGet2:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet3 VAR cVar3 id 102 bitmap "chkyes" UPDATE ;
ACTION( msginfo( "With Adjust-Transparent" ) ) ;
COLOR CLR_BLACK, CLR_CYAN of oDlg
oGet3:disable()
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
oGet3:lDisColors := .F. // Deactive disable color
oGet3:nClrTextDis := CLR_WHITE // Color text disable status
oGet3:nClrPaneDis := CLR_BLUE // Color Pane disable status
REDEFINE GET oGet4 VAR cVar4 id 103 bitmap "chkyes" UPDATE ;
ACTION( if( lActive, oGet3:disable(), oGet3:enable() ), ;
lActive := !lActive, oDlg:Update() ) of oDlg
oGet4:lAdjustBtn := .T.
REDEFINE GET oGet VAR cLinares ID 4001 OF oDlg PICTURE "@!" UPDATE ;
COLORS METRO_ORANGE, CLR_WHITE FONT oFont2
REDEFINE BITMAP oBtnVisu ID 122 RESOURCE "FIVEWIN" TRANSPARENT OF oDlg
REDEFINE BUTTONBMP oSaida ID 301 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( oDlg:End() ) CANCEL
oSaida:cTooltip := { "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_CYAN }
oGet:bPainted := { || Display( oGet ) }
REDEFINE BITMAP oBtnDisp ID 121 RESOURCE "HOME" TRANSPARENT OF oDlg
REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ;
HEIGHTGET 24 ID 210 OF oDlg COLOR "W*/R+" ;
VALID ( MsgBeep(), .t. )
oCbx:bPainted := { || Display2( oCbx ) }
ACTIVATE DIALOG oDlg CENTERED
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
oFont:End()
oFont2:End()
oFnt:End()
RETURN NIL
STATIC FUNCTION Display( o ) // CON GET FUNCIONA PERFECTO!
LOCAL hDC := o:oWnd:GetDC()
LOCAL aRect := GetClientRect( o:hWnd )
LOCAL oBtn
IF Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 22, o:nTop + aRect[ 1 ] - 4, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
ENDIF
o:oWnd:ReleaseDC()
RETURN NIL
STATIC FUNCTION Display2( o ) // CON COMBOBOX, NO FUNCIONA!
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
if Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 16, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
endif
o:oWnd:ReleaseDC()
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
Code: Select all | Expand
// C:\GETBORDE\TESTGET3.PRG - 26/04/2025 - By Kapiaba the best.
// MODIFICADO EM: 27/04/2025 - Por: Joao Santos - Sao Paulo/Brazil.
#include "fivewin.ch"
FUNCTION Main()
LOCAL oWnd, oMenu, oFont, oSkinB
SetBalloon( .T. ) // Balloon shape required for tooltips
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 0, 73, 138 ) } }
SkinButtons( oSkinB )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
MENU oMenu 2007
MenuItem "From Resource" ACTION FromrES( oWnd )
MENUITEM "&Salida" ACTION( oWnd:End() )
ENDMENU
DEFINE WINDOW oWnd TITLE "Test Button Get Transparent" MENU oMenu PIXEL
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd MAXIMIZED
oFont:End()
RETURN NIL
FUNCTION FromRes( oWnd )
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, cVar1, cVar2, cVar3, cVar4, oFont
LOCAL oBtnDisp, lActive := .F., cLinares, oGet, oFont2, oBtnVisu, oSay
LOCAL oSaida, oFnt, oCbx, cItem := "", aGrad
cVar1 := 0
cVar2 := 0
cVar3 := 0
cVar4 := 0
cLinares := SPACE(50)
cLinares := oEmToAnsi( "USER: ANTONIO LI¥ARES CA¥AS" )
aGrad := { { .50, nRGB( 210, 235, 216 ), nRGB( 255, 255, 255 ) } }
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFont2 NAME "Ms Sans Serif" SIZE 00, -18 BOLD
DEFINE DIALOG oDlg RESOURCE "fromres" OF oWnd GRADIENT aGrad FONT oFont
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
REDEFINE SAY ID 401 OF oDlg COLORS METRO_AMBER, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 402 OF oDlg COLORS METRO_PINK, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 403 OF oDlg COLORS METRO_COBALT, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 430 OF oDlg COLORS CLR_BLACK, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE GET oGet1 VAR cVar1 id 100 bitmap "on" UPDATE ;
ACTION( msginfo( "With Transparent" ) ) of oDlg
oGet1:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet2 VAR cVar2 id 101 bitmap "on"UPDATE ;
ACTION( msginfo( "Without Transparent" ) ) of oDlg
oGet2:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet3 VAR cVar3 id 102 bitmap "chkyes" UPDATE ;
ACTION( msginfo( "With Adjust-Transparent" ) ) ;
COLOR CLR_BLACK, CLR_CYAN of oDlg
oGet3:disable()
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
oGet3:lDisColors := .F. // Deactive disable color
oGet3:nClrTextDis := CLR_WHITE // Color text disable status
oGet3:nClrPaneDis := CLR_BLUE // Color Pane disable status
REDEFINE GET oGet4 VAR cVar4 id 103 bitmap "chkyes" UPDATE ;
ACTION( if( lActive, oGet3:disable(), oGet3:enable() ), ;
lActive := !lActive, oDlg:Update() ) of oDlg
oGet4:lAdjustBtn := .T.
REDEFINE GET oGet VAR cLinares ID 4001 OF oDlg PICTURE "@!" UPDATE ;
COLORS METRO_ORANGE, CLR_WHITE FONT oFont2
REDEFINE BITMAP oBtnVisu ID 122 RESOURCE "FIVEWIN" TRANSPARENT OF oDlg
REDEFINE BUTTONBMP oSaida ID 301 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( oDlg:End() ) CANCEL
oSaida:cTooltip := { "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_CYAN }
oGet:bPainted := { || Display( oGet ) }
REDEFINE BITMAP oBtnDisp ID 121 RESOURCE "HOME" TRANSPARENT OF oDlg
REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ;
HEIGHTGET 24 ID 210 OF oDlg COLOR "W*/R+" ;
VALID ( MsgBeep(), .t. )
oCbx:bPainted := { || Display2( oCbx ) }
ACTIVATE DIALOG oDlg CENTERED
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
oFont:End()
oFont2:End()
oFnt:End()
RETURN NIL
STATIC FUNCTION Display( o ) // CON GET FUNCIONA PERFECTO!
LOCAL hDC := o:oWnd:GetDC()
LOCAL aRect := GetClientRect( o:hWnd )
LOCAL oBtn
IF Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 22, o:nTop + aRect[ 1 ] - 4, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
ENDIF
o:oWnd:ReleaseDC()
RETURN NIL
STATIC FUNCTION Display2( o ) // CON COMBOBOX, NO FUNCIONA!
local hDC := o:oWnd:GetDC()
local aRect := GetClientRect( o:hWnd )
local oBtn
if Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
else
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 16, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 12, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
endif
o:oWnd:ReleaseDC()
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
Code: Select all | Expand
// Ponerlo al principio de tu app
SetGetColorFocus( 16776960 ) // Color: CLR_CYAN, Rgb( 200, 200, 200 ) o el que consideres
Code: Select all | Expand
// Ponerlo al principio de tu app
SetGetColorFocus( 16776960 ) // Color: CLR_CYAN, Rgb( 200, 200, 200 ) o el que consideres
Code: Select all | Expand
// C:\GETBORDE\TESTGET3.PRG - 26/04/2025 - By Kapiaba the best of the World.
// MODIFICADO EM: 28/04/2025 - Por: Joao Santos - Sao Paulo/Brazil.
#Include "FiveWin.ch"
#define METRO_VERDE13 nRGB( 34, 177, 76 )
#define CLR_VSBAR nRGB( 207, 214, 228 )
#define CLR_VSMAR nRGB( 0, 73, 138 )
FUNCTION Main()
LOCAL oWnd, oMenu, oFont, oSkinB, oIco
SetBalloon( .T. ) // Balloon shape required for tooltips
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 0, 73, 138 ) } }
SkinButtons( oSkinB )
DEFINE ICON oIco RESOURCE "ICONE05" // EN: TESTGET3.RES
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
MENU oMenu 2007
MenuItem "From Resource" ACTION FromrES( oWnd )
MENUITEM "&Salida" ACTION( oWnd:End() )
ENDMENU
DEFINE WINDOW oWnd TITLE "Test Button Get Transparent" MENU oMenu PIXEL ;
ICON oIco MDI
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd MAXIMIZED
oFont:End()
RETURN NIL
FUNCTION FromRes( oWnd )
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, cVar1, cVar2, cVar3, cVar4, oFont
LOCAL oBtnDisp, lActive := .F., cLinares, oGet, oFont2, oBtnVisu, oSay
LOCAL oSaida, oFnt, oCbx, cItem := "", aGrad, oBtnFive, oIco
cVar1 := 0
cVar2 := 0
cVar3 := 0
cVar4 := 0
cLinares := SPACE(50)
cLinares := OemToAnsi( "USER: ANTONIO LI¥ARES CA¥AS" )
aGrad := { { .50, nRGB( 210, 235, 216 ), nRGB( 255, 255, 255 ) } }
DEFINE ICON oIco RESOURCE "ICONE05" // EN: TESTGET3.RES
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFont2 NAME "Ms Sans Serif" SIZE 00, -18 BOLD
DEFINE DIALOG oDlg RESOURCE "fromres" OF oWnd GRADIENT aGrad ICON oIco ;
FONT oFont
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
REDEFINE SAY ID 401 OF oDlg COLORS METRO_AMBER, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 402 OF oDlg COLORS METRO_PINK, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE SAY ID 403 OF oDlg COLORS METRO_COBALT, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 404 OF oDlg COLORS METRO_VERDE13, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 430 OF oDlg COLORS CLR_VSMAR, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE GET oGet1 VAR cVar1 id 100 bitmap "on" UPDATE ;
ACTION( MsgInfo( "With Transparent" ) ) of oDlg
oGet1:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet2 VAR cVar2 id 101 bitmap "on"UPDATE ;
ACTION( MsgInfo( "Without Transparent" ) ) of oDlg
oGet2:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet3 VAR cVar3 id 102 bitmap "chkyes" UPDATE ;
ACTION( MsgInfo( "With Adjust-Transparent" ) ) ;
COLOR CLR_BLACK, CLR_CYAN of oDlg
oGet3:disable()
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
oGet3:lDisColors := .F. // Deactive disable color
oGet3:nClrTextDis := CLR_WHITE // Color text disable status
oGet3:nClrPaneDis := CLR_BLUE // Color Pane disable status
REDEFINE GET oGet4 VAR cVar4 id 103 bitmap "chkyes" UPDATE ;
ACTION( if( lActive, oGet3:disable(), oGet3:enable() ), ;
lActive := !lActive, oDlg:Update() ) of oDlg
oGet4:lAdjustBtn := .T.
REDEFINE GET oGet VAR cLinares ID 4001 OF oDlg PICTURE "@!" UPDATE ;
COLORS METRO_ORANGE, CLR_WHITE FONT oFont2
oGet:bPainted := { || Display( oGet ) }
REDEFINE BITMAP oBtnDisp ID 121 RESOURCE "HOME" TRANSPARENT OF oDlg
REDEFINE BITMAP oBtnVisu ID 122 RESOURCE "FIVEWIN" TRANSPARENT OF oDlg
REDEFINE BITMAP oBtnFive ID 123 RESOURCE "FIVETECH" TRANSPARENT OF oDlg
REDEFINE BUTTONBMP oSaida ID 301 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( oDlg:End() ) CANCEL
oSaida:cTooltip := { "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_CYAN }
REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ;
HEIGHTGET 24 ID 210 OF oDlg COLOR "W*/R+" ;
VALID ( MsgBeep(), .t. )
__clsAddMsg( oCbx:ClassH, "Display", @Display2(), HB_OO_MSG_METHOD,, 1 )
ACTIVATE DIALOG oDlg CENTERED
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
oFont:End()
oFont2:End()
oFnt:End()
RETURN NIL
STATIC FUNCTION Display( o ) // CON GET FUNCIONA PERFECTO!
LOCAL hDC := o:oWnd:GetDC()
LOCAL aRect := GetClientRect( o:hWnd )
LOCAL oBtn
IF Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 22, o:nTop + aRect[ 1 ] - 4, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
ENDIF
o:oWnd:ReleaseDC()
RETURN NIL
STATIC FUNCTION Display2( o ) // CON COMBOBOX, FUNCIONA PERFECTO!
LOCAL Self := QSelf()
LOCAL hDC := ::GetDC()
LOCAL aRect := GetClientRect( ::hWnd )
IF Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
METRO_ORANGE, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
METRO_ORANGE, 4 )
ENDIF
::ReleaseDC()
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
Code: Select all | Expand
// C:\GETBORDE\TESTGET3.PRG - 26/04/2025 - By Kapiaba the best of the World.
// MODIFICADO EM: 28/04/2025 - Por: Joao Santos - Sao Paulo/Brazil.
#Include "FiveWin.ch"
#define METRO_VERDE13 nRGB( 34, 177, 76 )
#define CLR_VSBAR nRGB( 207, 214, 228 )
#define CLR_VSMAR nRGB( 0, 73, 138 )
FUNCTION Main()
LOCAL oWnd, oMenu, oFont, oSkinB, oIco
SetBalloon( .T. ) // Balloon shape required for tooltips
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { .50, nRGB( 210, 235, 216 ), nRGB( 0, 73, 138 ) } }
SkinButtons( oSkinB )
DEFINE ICON oIco RESOURCE "ICONE05" // EN: TESTGET3.RES
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
MENU oMenu 2007
MenuItem "From Resource" ACTION FromrES( oWnd )
MENUITEM "&Salida" ACTION( oWnd:End() )
ENDMENU
DEFINE WINDOW oWnd TITLE "Test Button Get Transparent" MENU oMenu PIXEL ;
ICON oIco MDI
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd MAXIMIZED
oFont:End()
RETURN NIL
FUNCTION FromRes( oWnd )
LOCAL oDlg, oGet1, oGet2, oGet3, oGet4, cVar1, cVar2, cVar3, cVar4, oFont
LOCAL oBtnDisp, lActive := .F., cLinares, oGet, oFont2, oBtnVisu, oSay
LOCAL oSaida, oFnt, oCbx, cItem := "", aGrad, oBtnFive, oIco
cVar1 := 0
cVar2 := 0
cVar3 := 0
cVar4 := 0
cLinares := SPACE(50)
cLinares := OemToAnsi( "USER: ANTONIO LI¥ARES CA¥AS" )
aGrad := { { .50, nRGB( 210, 235, 216 ), nRGB( 255, 255, 255 ) } }
DEFINE ICON oIco RESOURCE "ICONE05" // EN: TESTGET3.RES
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFont2 NAME "Ms Sans Serif" SIZE 00, -18 BOLD
DEFINE DIALOG oDlg RESOURCE "fromres" OF oWnd GRADIENT aGrad ICON oIco ;
FONT oFont
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
REDEFINE SAY ID 401 OF oDlg COLORS METRO_AMBER, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 402 OF oDlg COLORS METRO_PINK, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE SAY ID 403 OF oDlg COLORS METRO_COBALT, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 404 OF oDlg COLORS METRO_VERDE13, CLR_WHITE UPDATE FONT oFont TRANSPARENT
REDEFINE SAY ID 430 OF oDlg COLORS CLR_VSMAR, CLR_WHITE UPDATE FONT oFnt TRANSPARENT
REDEFINE GET oGet1 VAR cVar1 id 100 bitmap "on" UPDATE ;
ACTION( MsgInfo( "With Transparent" ) ) of oDlg
oGet1:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet2 VAR cVar2 id 101 bitmap "on"UPDATE ;
ACTION( MsgInfo( "Without Transparent" ) ) of oDlg
oGet2:lBtnTransparent := .T. // transparent button get oGet1
REDEFINE GET oGet3 VAR cVar3 id 102 bitmap "chkyes" UPDATE ;
ACTION( MsgInfo( "With Adjust-Transparent" ) ) ;
COLOR CLR_BLACK, CLR_CYAN of oDlg
oGet3:disable()
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
oGet3:lDisColors := .F. // Deactive disable color
oGet3:nClrTextDis := CLR_WHITE // Color text disable status
oGet3:nClrPaneDis := CLR_BLUE // Color Pane disable status
REDEFINE GET oGet4 VAR cVar4 id 103 bitmap "chkyes" UPDATE ;
ACTION( if( lActive, oGet3:disable(), oGet3:enable() ), ;
lActive := !lActive, oDlg:Update() ) of oDlg
oGet4:lAdjustBtn := .T.
REDEFINE GET oGet VAR cLinares ID 4001 OF oDlg PICTURE "@!" UPDATE ;
COLORS METRO_ORANGE, CLR_WHITE FONT oFont2
oGet:bPainted := { || Display( oGet ) }
REDEFINE BITMAP oBtnDisp ID 121 RESOURCE "HOME" TRANSPARENT OF oDlg
REDEFINE BITMAP oBtnVisu ID 122 RESOURCE "FIVEWIN" TRANSPARENT OF oDlg
REDEFINE BITMAP oBtnFive ID 123 RESOURCE "FIVETECH" TRANSPARENT OF oDlg
REDEFINE BUTTONBMP oSaida ID 301 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( oDlg:End() ) CANCEL
oSaida:cTooltip := { "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_CYAN }
REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ;
HEIGHTGET 24 ID 210 OF oDlg COLOR "W*/R+" ;
VALID ( MsgBeep(), .t. )
__clsAddMsg( oCbx:ClassH, "Display", @Display2(), HB_OO_MSG_METHOD,, 1 )
ACTIVATE DIALOG oDlg CENTERED
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
oFont:End()
oFont2:End()
oFnt:End()
RETURN NIL
STATIC FUNCTION Display( o ) // CON GET FUNCIONA PERFECTO!
LOCAL hDC := o:oWnd:GetDC()
LOCAL aRect := GetClientRect( o:hWnd )
LOCAL oBtn
IF Empty( o:Varget() )
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 6, o:nTop + aRect[ 1 ] - 6, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_RED, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] + o:nLeft - 22, o:nTop + aRect[ 1 ] - 4, o:nLeft + aRect[ 4 ] + 6, o:nTop + aRect[ 3 ] + 12, 0, 0, ;
CLR_GREEN, 4 )
ENDIF
o:oWnd:ReleaseDC()
RETURN NIL
STATIC FUNCTION Display2( o ) // CON COMBOBOX, FUNCIONA PERFECTO!
LOCAL Self := QSelf()
LOCAL hDC := ::GetDC()
LOCAL aRect := GetClientRect( ::hWnd )
IF Empty( ::Varget() )
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
METRO_ORANGE, 4 )
ELSE
RoundBox( hDC, aRect[ 2 ] - 6, aRect[ 1 ] - 6, aRect[ 4 ] + 6, aRect[ 3 ] + 6, 0, 0, ;
METRO_ORANGE, 4 )
ENDIF
::ReleaseDC()
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
Code: Select all | Expand
oGet:lActive
Code: Select all | Expand
oGet:lActive
Code: Select all | Expand
#VisualFW Borland make, (c) FiveTech Software 2005-2025
HBDIR=c:\XHBBCC77
BCDIR=C:\BCC77
FWDIR=C:\FWH
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = ..\acbrreal
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\ACBRREAL.PRG \
.\FUNCOES.PRG \
.\ABERTURA.PRG \
.\OUTL2007.PRG \
.\RMAILAMB.PRG \
.\ENVIADOS.PRG \
.\DSAY.PRG \
.\CONTROL.PRG \
.\ERRSYSW.PRG \
.\MSGRUN.PRG \
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
#PROJECT : TEST.exe
PROJECT : ACBRREAL.exe
#TEST.exe : $(OBJS)
ACBRREAL.exe : $(OBJS)
@echo off
@echo -L$(BCDIR)\lib;$(BCDIR)\lib\psdk + > b32.bc
@echo $(BCDIR)\lib\c0w32.obj + >> b32.bc
@echo $(OBJS), + >> b32.bc
@echo ACBRREAL.exe, + >> b32.bc
@echo TEST.map, + >> b32.bc
# fivewin
@echo $(FWDIR)\lib\Fivehx.lib + >> b32.bc
@echo $(FWDIR)\lib\FiveHC.lib + >> b32.bc
@echo $(FWDIR)\lib\libmysql.lib + >> b32.bc
@echo $(FWDIR)\lib\pgsql.lib + >> b32.bc
@echo $(FWDIR)\lib\libpq.lib + >> b32.bc
# xharbour
@echo $(HBDIR)\lib\hbhpdf.lib + >> b32.bc
@echo $(HBDIR)\lib\libharu.lib + >> b32.bc
@echo $(HBDIR)\lib\png.lib + >> b32.bc
@echo $(HBDIR)\lib\rtl.lib + >> b32.bc
@echo $(HBDIR)\lib\vm.lib + >> b32.bc
@echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
@echo $(HBDIR)\lib\lang.lib + >> b32.bc
@echo $(HBDIR)\lib\macro.lib + >> b32.bc
@echo $(HBDIR)\lib\rdd.lib + >> b32.bc
@echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
@echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
@echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
@echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
@echo $(HBDIR)\lib\debug.lib + >> b32.bc
@echo $(HBDIR)\lib\common.lib + >> b32.bc
@echo $(HBDIR)\lib\codepage.lib + >> b32.bc
@echo $(HBDIR)\lib\pp.lib + >> b32.bc
@echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
@echo $(HBDIR)\lib\ct.lib + >> b32.bc
@echo $(HBDIR)\lib\zlib.lib + >> b32.bc
@echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
@echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
@echo $(HBDIR)\lib\tip.lib + >> b32.bc
@echo $(HBDIR)\lib\hbzebra.lib + >> b32.bc
# BCC77
@echo $(BCDIR)\lib\cw32.lib + >> b32.bc
@echo $(BCDIR)\lib\import32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\uuid.lib + >> b32.bc
@echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\uxtheme.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc
# @echo TEST.RES + >> b32.bc
@echo ACBRREAL.RES + >> b32.bc
@echo IMAGENS.RES + >> b32.bc
@echo IMAGEN2.RES + >> b32.bc
@echo IMAGENS4.RES + >> b32.bc
@echo EMAIL.RES + >> b32.bc
$(BCDIR)\bin\BRC32.EXE -R XPLOOK.RC
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
# del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
@echo -c -tWM -D__HARBOUR__ > tmp
@echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
Code: Select all | Expand
#VisualFW Borland make, (c) FiveTech Software 2005-2025
HBDIR=c:\XHBBCC77
BCDIR=C:\BCC77
FWDIR=C:\FWH
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = ..\acbrreal
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\ACBRREAL.PRG \
.\FUNCOES.PRG \
.\ABERTURA.PRG \
.\OUTL2007.PRG \
.\RMAILAMB.PRG \
.\ENVIADOS.PRG \
.\DSAY.PRG \
.\CONTROL.PRG \
.\ERRSYSW.PRG \
.\MSGRUN.PRG \
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
#PROJECT : TEST.exe
PROJECT : ACBRREAL.exe
#TEST.exe : $(OBJS)
ACBRREAL.exe : $(OBJS)
@echo off
@echo -L$(BCDIR)\lib;$(BCDIR)\lib\psdk + > b32.bc
@echo $(BCDIR)\lib\c0w32.obj + >> b32.bc
@echo $(OBJS), + >> b32.bc
@echo ACBRREAL.exe, + >> b32.bc
@echo TEST.map, + >> b32.bc
# fivewin
@echo $(FWDIR)\lib\Fivehx.lib + >> b32.bc
@echo $(FWDIR)\lib\FiveHC.lib + >> b32.bc
@echo $(FWDIR)\lib\libmysql.lib + >> b32.bc
@echo $(FWDIR)\lib\pgsql.lib + >> b32.bc
@echo $(FWDIR)\lib\libpq.lib + >> b32.bc
# xharbour
@echo $(HBDIR)\lib\hbhpdf.lib + >> b32.bc
@echo $(HBDIR)\lib\libharu.lib + >> b32.bc
@echo $(HBDIR)\lib\png.lib + >> b32.bc
@echo $(HBDIR)\lib\rtl.lib + >> b32.bc
@echo $(HBDIR)\lib\vm.lib + >> b32.bc
@echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
@echo $(HBDIR)\lib\lang.lib + >> b32.bc
@echo $(HBDIR)\lib\macro.lib + >> b32.bc
@echo $(HBDIR)\lib\rdd.lib + >> b32.bc
@echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
@echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
@echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
@echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
@echo $(HBDIR)\lib\debug.lib + >> b32.bc
@echo $(HBDIR)\lib\common.lib + >> b32.bc
@echo $(HBDIR)\lib\codepage.lib + >> b32.bc
@echo $(HBDIR)\lib\pp.lib + >> b32.bc
@echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
@echo $(HBDIR)\lib\ct.lib + >> b32.bc
@echo $(HBDIR)\lib\zlib.lib + >> b32.bc
@echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
@echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
@echo $(HBDIR)\lib\tip.lib + >> b32.bc
@echo $(HBDIR)\lib\hbzebra.lib + >> b32.bc
# BCC77
@echo $(BCDIR)\lib\cw32.lib + >> b32.bc
@echo $(BCDIR)\lib\import32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\uuid.lib + >> b32.bc
@echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\uxtheme.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
@echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc
# @echo TEST.RES + >> b32.bc
@echo ACBRREAL.RES + >> b32.bc
@echo IMAGENS.RES + >> b32.bc
@echo IMAGEN2.RES + >> b32.bc
@echo IMAGENS4.RES + >> b32.bc
@echo EMAIL.RES + >> b32.bc
$(BCDIR)\bin\BRC32.EXE -R XPLOOK.RC
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
# del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
@echo -c -tWM -D__HARBOUR__ > tmp
@echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
Code: Select all | Expand
IF EXIST *.MAP DEL *.MAP
IF EXIST *.TDS DEL *.TDS
IF EXIST *.C DEL *.C
IF EXIST *.EXE DEL *.EXE
@if not exist obj md obj
c:\bcc77\bin\make -ftest.mak
if exist ACBRREAL.exe C:\PECOMPACT\PEC2 /NB /EMP:Y /TM:Y /CR:Y /MC ACBRREAL.EXE
if exist ACBRREAL.exe ACBRREAL
Code: Select all | Expand
IF EXIST *.MAP DEL *.MAP
IF EXIST *.TDS DEL *.TDS
IF EXIST *.C DEL *.C
IF EXIST *.EXE DEL *.EXE
@if not exist obj md obj
c:\bcc77\bin\make -ftest.mak
if exist ACBRREAL.exe C:\PECOMPACT\PEC2 /NB /EMP:Y /TM:Y /CR:Y /MC ACBRREAL.EXE
if exist ACBRREAL.exe ACBRREAL
Code: Select all | Expand
HBDIR=c:\harbour_2025
BCDIR=c:\bcc77
FWDIR=c:\fwh24_10
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\REPDEMO.PRG \
.\REP02.PRG \
.\REP03.PRG \
.\REP12.PRG \
.\REP05.PRG \
.\REP04.PRG \
.\REP09.PRG \
.\REP07.PRG \
.\REP15.PRG \
.\REP08.PRG \
.\REP06.PRG \
.\REP10.PRG \
.\REP13.PRG \
.\REP11.PRG \
.\REP21.PRG \
.\REP20.PRG \
.\REP16.PRG \
.\REP19.PRG \
.\REP17.PRG \
.\REP14.PRG \
.\REP18.PRG \
.\REP01.PRG \
.\REP22.PRG \
.\REP23.PRG
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
PROJECT : REPDEMO.EXE
REPDEMO.EXE : $(OBJS) REPDEMO.RES ..\..\lib\FiveH.lib ..\..\lib\FiveHC.lib
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo $(OBJS), + >> b32.bc
echo repdemo.exe, + >> b32.bc
echo repdemo.map, + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbpcre.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcplr.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\png.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbziparc.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbmzip.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\minizip.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\xhb.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo $(HBDIR)\lib\win\bcc\rddads.lib + >> b32.bc
rem echo $(HBDIR)\lib\win\bcc\Ace32.lib + >> b32.bc
echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc
IF EXIST repdemo.res echo repdemo.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\win\bcc\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
echo -c -tWM -D__HARBOUR__ > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
REPDEMO.RES : REPDEMO.RC
$(BCDIR)\bin\brc32.exe -r -I$(BCDIR)\include repdemo.rc
]]>Code: Select all | Expand
HBDIR=c:\harbour_2025
BCDIR=c:\bcc77
FWDIR=c:\fwh24_10
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\REPDEMO.PRG \
.\REP02.PRG \
.\REP03.PRG \
.\REP12.PRG \
.\REP05.PRG \
.\REP04.PRG \
.\REP09.PRG \
.\REP07.PRG \
.\REP15.PRG \
.\REP08.PRG \
.\REP06.PRG \
.\REP10.PRG \
.\REP13.PRG \
.\REP11.PRG \
.\REP21.PRG \
.\REP20.PRG \
.\REP16.PRG \
.\REP19.PRG \
.\REP17.PRG \
.\REP14.PRG \
.\REP18.PRG \
.\REP01.PRG \
.\REP22.PRG \
.\REP23.PRG
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
PROJECT : REPDEMO.EXE
REPDEMO.EXE : $(OBJS) REPDEMO.RES ..\..\lib\FiveH.lib ..\..\lib\FiveHC.lib
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo $(OBJS), + >> b32.bc
echo repdemo.exe, + >> b32.bc
echo repdemo.map, + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbpcre.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbcplr.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\png.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbziparc.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbmzip.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\minizip.lib + >> b32.bc
echo $(HBDIR)\lib\win\bcc\xhb.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo $(HBDIR)\lib\win\bcc\rddads.lib + >> b32.bc
rem echo $(HBDIR)\lib\win\bcc\Ace32.lib + >> b32.bc
echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc
IF EXIST repdemo.res echo repdemo.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\win\bcc\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
echo -c -tWM -D__HARBOUR__ > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
REPDEMO.RES : REPDEMO.RC
$(BCDIR)\bin\brc32.exe -r -I$(BCDIR)\include repdemo.rc
]]>Code: Select all | Expand
if not exist obj mkdir obj
c:\bcc77\bin\make -f repdem32.mak
IF ERRORLEVEL 0 repdemo.exe
Code: Select all | Expand
if not exist obj mkdir obj
c:\bcc77\bin\make -f repdem32.mak
IF ERRORLEVEL 0 repdemo.exe
Code: Select all | Expand
#VisualFW Borland make, (c) FiveTech Software 2005-2025 - Modificado: Kapiaba.
HBDIR=c:\HBBCC77
BCDIR=c:\BCC77
FWDIR=C:\fwh...
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = ..\repdemo
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\REPDEMO.PRG \
.\REP02.PRG \
.\REP03.PRG \
.\REP12.PRG \
.\REP05.PRG \
.\REP04.PRG \
.\REP09.PRG \
.\REP07.PRG \
.\REP15.PRG \
.\REP08.PRG \
.\REP06.PRG \
.\REP10.PRG \
.\REP13.PRG \
.\REP11.PRG \
.\REP21.PRG \
.\REP20.PRG \
.\REP16.PRG \
.\REP19.PRG \
.\REP17.PRG \
.\REP14.PRG \
.\REP18.PRG \
.\REP01.PRG \
.\REP22.PRG \
.\REP23.PRG
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
PROJECT : REPDEMO.EXE
REPDEMO.EXE : $(OBJS) REPDEMO.RES $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo $(OBJS), + >> b32.bc
echo repdemo.exe, + >> b32.bc
echo repdemo.map, + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc
echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\hbct.lib + >> b32.bc
echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
echo $(HBDIR)\lib\png.lib + >> b32.bc
echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\minizip.lib + >> b32.bc
echo $(HBDIR)\lib\xhb.lib + >> b32.bc
# BCC77
echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\uuid.lib + >> b32.bc
echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\uxtheme.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc
IF EXIST repdemo.res echo repdemo.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
echo -c -tWM -D__HARBOUR__ > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
REPDEMO.RES : REPDEMO.RC
$(BCDIR)\bin\brc32.exe -r -I$(BCDIR)\include repdemo.rc
Code: Select all | Expand
#VisualFW Borland make, (c) FiveTech Software 2005-2025 - Modificado: Kapiaba.
HBDIR=c:\HBBCC77
BCDIR=c:\BCC77
FWDIR=C:\fwh...
#change these paths as needed
.path.OBJ = .\obj
.path.PRG = ..\repdemo
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
#important: Use Uppercase for filenames extensions!
PRGS = \
.\REPDEMO.PRG \
.\REP02.PRG \
.\REP03.PRG \
.\REP12.PRG \
.\REP05.PRG \
.\REP04.PRG \
.\REP09.PRG \
.\REP07.PRG \
.\REP15.PRG \
.\REP08.PRG \
.\REP06.PRG \
.\REP10.PRG \
.\REP13.PRG \
.\REP11.PRG \
.\REP21.PRG \
.\REP20.PRG \
.\REP16.PRG \
.\REP19.PRG \
.\REP17.PRG \
.\REP14.PRG \
.\REP18.PRG \
.\REP01.PRG \
.\REP22.PRG \
.\REP23.PRG
OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)
PROJECT : REPDEMO.EXE
REPDEMO.EXE : $(OBJS) REPDEMO.RES $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo $(OBJS), + >> b32.bc
echo repdemo.exe, + >> b32.bc
echo repdemo.map, + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc
echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\hbct.lib + >> b32.bc
echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
echo $(HBDIR)\lib\png.lib + >> b32.bc
echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\minizip.lib + >> b32.bc
echo $(HBDIR)\lib\xhb.lib + >> b32.bc
# BCC77
echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\uuid.lib + >> b32.bc
echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\uxtheme.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc
IF EXIST repdemo.res echo repdemo.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c
.C.OBJ:
echo -c -tWM -D__HARBOUR__ > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
REPDEMO.RES : REPDEMO.RC
$(BCDIR)\bin\brc32.exe -r -I$(BCDIR)\include repdemo.rc
Code: Select all | Expand
IF EXIST C:\REPDEMO\OBJ\*.OBJ DEL C:\REPDEMO\OBJ\*.OBJ
IF EXIST *.MAP DEL *.MAP
IF EXIST *.TDS DEL *.TDS
IF EXIST *.C DEL *.C
IF EXIST C:\REPDEMO\OBJ\*.C DEL C:\REPDEMO\OBJ\*.C
IF EXIST *.LOG DEL *.LOG
IF EXIST *.EXE DEL *.EXE
if not exist obj mkdir obj
c:\bcc77\bin\make -frepdem32.mak
REM if exist REPDEMO.exe C:\PECOMPACT\PEC2 /NB /EMP:Y /TM:Y /CR:Y /MC REPDEMO.EXE
IF ERRORLEVEL 0 REPDEMO.exe
Code: Select all | Expand
IF EXIST C:\REPDEMO\OBJ\*.OBJ DEL C:\REPDEMO\OBJ\*.OBJ
IF EXIST *.MAP DEL *.MAP
IF EXIST *.TDS DEL *.TDS
IF EXIST *.C DEL *.C
IF EXIST C:\REPDEMO\OBJ\*.C DEL C:\REPDEMO\OBJ\*.C
IF EXIST *.LOG DEL *.LOG
IF EXIST *.EXE DEL *.EXE
if not exist obj mkdir obj
c:\bcc77\bin\make -frepdem32.mak
REM if exist REPDEMO.exe C:\PECOMPACT\PEC2 /NB /EMP:Y /TM:Y /CR:Y /MC REPDEMO.EXE
IF ERRORLEVEL 0 REPDEMO.exe
Code: Select all | Expand
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
XBROWSER memoRead( "test.xml" ) SETUP xsetup( oBrw )
return nil
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
XBROWSER memoRead( "test.xml" ) SETUP xsetup( oBrw )
return nil
function xsetup( oBrw )
oBrw:oWnd:bInit = { || oBrw:oWnd:SetText( "Titulo" ) }
return nil
Code: Select all | Expand
DEFINE CURSOR oHand RESOURCE "Dedo"
REDEFINE RADIO oRadMenu VAR nOpcaoRadio ID 201, 202 OF oDlg ;
COLOR CLR_BROWN, CLR_MARROM ;
ON CHANGE( TROCA_INDICE( nOpcaoRadio, cAlias, oLbx ), ;
oLbx:GoTop(), oLbx:Refresh(), oLbx:SetFocus() )
oRadMenu:aItems[1]:cTooltip := "Por Nome "
oRadMenu:aItems[2]:cTooltip := "Por Código "
oRadMenu:SetFont( oFnt )
oRadMenu:oCursor := oHand // NO FUNCIONA.
Code: Select all | Expand
DEFINE CURSOR oHand RESOURCE "Dedo"
REDEFINE RADIO oRadMenu VAR nOpcaoRadio ID 201, 202 OF oDlg ;
COLOR CLR_BROWN, CLR_MARROM ;
ON CHANGE( TROCA_INDICE( nOpcaoRadio, cAlias, oLbx ), ;
oLbx:GoTop(), oLbx:Refresh(), oLbx:SetFocus() )
oRadMenu:aItems[1]:cTooltip := "Por Nome "
oRadMenu:aItems[2]:cTooltip := "Por Código "
oRadMenu:SetFont( oFnt )
oRadMenu:oCursor := oHand // NO FUNCIONA.
Code: Select all | Expand
database odbf
define window ownd
@ 0,0 xbrowse oBrw of oWnd ;
object odbf ;
FONT oFont //;
// rows { 10, 5, 30, 50, 100 } // Array of record numbers
oBrw:CreateFromCode()
oWnd:oClient := oBrw
]]>
Code: Select all | Expand
database odbf
define window ownd
@ 0,0 xbrowse oBrw of oWnd ;
object odbf ;
FONT oFont //;
// rows { 10, 5, 30, 50, 100 } // Array of record numbers
oBrw:CreateFromCode()
oWnd:oClient := oBrw
]]>
Code: Select all | Expand
In file included from source\c_themeaux.c:50:
source/stdafx.h:49:9: warning: '__STDAFX_H__' is used as a header guard here, followed by #define of a different macro
[-Wheader-guard]
#ifndef __STDAFX_H__
^~~~~~~~~~~~
source/stdafx.h:50:9: note: '__STADFX_H__' is defined here; did you mean '__STDAFX_H__'?
#define __STADFX_H__
^~~~~~~~~~~~
__STDAFX_H__
source\c_themeaux.c:492:7: warning: implicit declaration of function 'ISCHAR' is invalid in C99
[-Wimplicit-function-declaration]
if( ISCHAR(1) )
^
source\c_themeaux.c:498:25: warning: implicit declaration of function 'ISNUM' is invalid in C99
[-Wimplicit-function-declaration]
else if( ISCHAR(2) || ISNUM(2) )
^
source\c_themeaux.c:500:20: warning: cast to 'HINSTANCE' (aka 'struct HINSTANCE__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
hInstance = (HINSTANCE) hb_parnl(1);
^
source\c_themeaux.c:528:20: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
SetScrollRange( ( HWND ) hb_parnl( 1 ),
^
5 warnings generated.
source\c_dibbmp.c:
In file included from source\c_themegdi.c:50:
source/stdafx.h:49:9: warning: '__STDAFX_H__' is used as a header guard here, followed by #define of a different macro
[-Wheader-guard]
#ifndef __STDAFX_H__
^~~~~~~~~~~~
source/stdafx.h:50:9: note: '__STADFX_H__' is defined here; did you mean '__STDAFX_H__'?
#define __STADFX_H__
^~~~~~~~~~~~
__STDAFX_H__
source\c_themegdi.c:172:28: warning: cast to 'HDC' (aka 'struct HDC__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HDC hdc = (HDC) hb_parnl(1);
^
source\c_themegdi.c:173:32: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HBITMAP hBitmap = (HBITMAP) hb_parnl(6);
^
source\c_themegdi.c:210:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) hb_parnl(1);
^
source\c_themegdi.c:269:22: warning: cast to 'PTHEMEINFO' (aka 'THEMEINFO *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
PTHEMEINFO pti = (PTHEMEINFO) hb_parnl(1);
^
source\c_themegdi.c:270:22: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) hb_parnl(2);
Code: Select all | Expand
In file included from source\c_themeaux.c:50:
source/stdafx.h:49:9: warning: '__STDAFX_H__' is used as a header guard here, followed by #define of a different macro
[-Wheader-guard]
#ifndef __STDAFX_H__
^~~~~~~~~~~~
source/stdafx.h:50:9: note: '__STADFX_H__' is defined here; did you mean '__STDAFX_H__'?
#define __STADFX_H__
^~~~~~~~~~~~
__STDAFX_H__
source\c_themeaux.c:492:7: warning: implicit declaration of function 'ISCHAR' is invalid in C99
[-Wimplicit-function-declaration]
if( ISCHAR(1) )
^
source\c_themeaux.c:498:25: warning: implicit declaration of function 'ISNUM' is invalid in C99
[-Wimplicit-function-declaration]
else if( ISCHAR(2) || ISNUM(2) )
^
source\c_themeaux.c:500:20: warning: cast to 'HINSTANCE' (aka 'struct HINSTANCE__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
hInstance = (HINSTANCE) hb_parnl(1);
^
source\c_themeaux.c:528:20: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
SetScrollRange( ( HWND ) hb_parnl( 1 ),
^
5 warnings generated.
source\c_dibbmp.c:
In file included from source\c_themegdi.c:50:
source/stdafx.h:49:9: warning: '__STDAFX_H__' is used as a header guard here, followed by #define of a different macro
[-Wheader-guard]
#ifndef __STDAFX_H__
^~~~~~~~~~~~
source/stdafx.h:50:9: note: '__STADFX_H__' is defined here; did you mean '__STDAFX_H__'?
#define __STADFX_H__
^~~~~~~~~~~~
__STDAFX_H__
source\c_themegdi.c:172:28: warning: cast to 'HDC' (aka 'struct HDC__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HDC hdc = (HDC) hb_parnl(1);
^
source\c_themegdi.c:173:32: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HBITMAP hBitmap = (HBITMAP) hb_parnl(6);
^
source\c_themegdi.c:210:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) hb_parnl(1);
^
source\c_themegdi.c:269:22: warning: cast to 'PTHEMEINFO' (aka 'THEMEINFO *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
PTHEMEINFO pti = (PTHEMEINFO) hb_parnl(1);
^
source\c_themegdi.c:270:22: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) hb_parnl(2);
Code: Select all | Expand
%PDF-1.7
%����
1 0 obj
<<
/Type /Catalog
/Pages 4 0 R
/MarkInfo<</Marked true>>
/Metadata 22 0 R
/OutputIntents 24 0 R
/StructTreeRoot 5 0 R
/PageMode /UseNone
/OCProperties << /OCGs [6 0 R] /D << /ON [6 0 R] /AS [<</Event /Print /OCGs [6 0 R] /Category [/Print]>>] >> >>
>>
endobj
Code: Select all | Expand
%PDF-1.7
%����
1 0 obj
<<
/Type /Catalog
/Pages 4 0 R
/MarkInfo<</Marked true>>
/Metadata 22 0 R
/OutputIntents 24 0 R
/StructTreeRoot 5 0 R
/PageMode /UseNone
/OCProperties << /OCGs [6 0 R] /D << /ON [6 0 R] /AS [<</Event /Print /OCGs [6 0 R] /Category [/Print]>>] >> >>
>>
endobj
Code: Select all | Expand
hb_memoWrit( "file.pdf", cBuffer )
]]>Patricio Avalos Aguirre wrote: Wed Apr 16, 2025 1:37 am hola a tod@s
Estimados estoy obteniendo un pdf via api, pero me responde en un formato text
necesito convertirlo a pdf pero si lo graba directo como pdf me sale error en el archivo
alguna forma de poder grabarlo a pdf
se agradece cualquier ayuda
adjunto parte del archivo que devuelve
algo asiCode: Select all | Expand
%PDF-1.7 %���� 1 0 obj << /Type /Catalog /Pages 4 0 R /MarkInfo<</Marked true>> /Metadata 22 0 R /OutputIntents 24 0 R /StructTreeRoot 5 0 R /PageMode /UseNone /OCProperties << /OCGs [6 0 R] /D << /ON [6 0 R] /AS [<</Event /Print /OCGs [6 0 R] /Category [/Print]>>] >> >> >> endobj
Code: Select all | Expand
hb_memoWrit( "file.pdf", cBuffer )
]]>Patricio Avalos Aguirre wrote: Wed Apr 16, 2025 1:37 am hola a tod@s
Estimados estoy obteniendo un pdf via api, pero me responde en un formato text
necesito convertirlo a pdf pero si lo graba directo como pdf me sale error en el archivo
alguna forma de poder grabarlo a pdf
se agradece cualquier ayuda
adjunto parte del archivo que devuelve
algo asiCode: Select all | Expand
%PDF-1.7 %���� 1 0 obj << /Type /Catalog /Pages 4 0 R /MarkInfo<</Marked true>> /Metadata 22 0 R /OutputIntents 24 0 R /StructTreeRoot 5 0 R /PageMode /UseNone /OCProperties << /OCGs [6 0 R] /D << /ON [6 0 R] /AS [<</Event /Print /OCGs [6 0 R] /Category [/Print]>>] >> >> >> endobj
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", hb_strToUtf8( oHttp:ResponseBody ) )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", hb_strToUtf8( oHttp:ResponseBody ) )
Code: Select all | Expand
hb_memowrit('mipdf.pdf',oHttp:ResponseBody)
shellexecute(0,"open",hb_curdrive()+":\"+CurDir()+"\mipdf.pdf",,,1)
Code: Select all | Expand
hb_memowrit('mipdf.pdf',oHttp:ResponseBody)
shellexecute(0,"open",hb_curdrive()+":\"+CurDir()+"\mipdf.pdf",,,1)
]]>Lailton wrote: Thu Apr 17, 2025 5:56 pm para PDF te recommendo usar asi:
se no funcionar, prueba com asi:Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", hb_strToUtf8( oHttp:ResponseBody ) )
![]()
]]>Lailton wrote: Thu Apr 17, 2025 5:56 pm para PDF te recommendo usar asi:
se no funcionar, prueba com asi:Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", hb_strToUtf8( oHttp:ResponseBody ) )
![]()
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
Code: Select all | Expand
hb_memoWrit( "c:\paso\file.pdf", oHttp:ResponseBody )
]]>FUNCTION RDOCLPT(TS_TOKEN)
LOCAL oHttp,Doc,cxmLbody,oIni,nHandle
LOCAL ts_exit:=.t.,tw_servidor:='',ts_mj1:='',ts_modulo:=.f.
LOCAL ts_servidor:="https://sveqa.zofri.cl/sveProcDocWSN/Emision?WSDL"
if empty(ts_token)
msginfo('Debe Obtener un Token de Inicio para Autentificarse en Web Service','Token de Sesion')
return .f.
endif
cXmlBody:= '' +;
'<?xml version="1.0" encoding="utf-8"?>' + ;
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cl="cl.zofri.sve" xmlns:wsn="http://cl/zofri/sve/prd/wsn">'+;
' <soapenv:Header>'+;
' <cl:token>'+ts_token+'</cl:token>'+;
' </soapenv:Header>'+;
' <soapenv:Body>'+;
' <wsn:emisionDocumento>'+;
' <wsn:codigoAduaneroDoc>101-25-051206</wsn:codigoAduaneroDoc>'+;
' <wsn:tipoEmision>E</wsn:tipoEmision>'+;
' </wsn:emisionDocumento>'+;
' </soapenv:Body>'+;
'</soapenv:Envelope>'
TRY
oHttp := CreateObject( 'MSXML2.XMLHTTP.6.0' )
CATCH
oHttp := CreateObject( 'Microsoft.XMLHTTP' )
END
doc = CreateObject("MSXML2.DOMDocument.6.0")
oHttp:Open( "POST" , ts_servidor, .F. )
ohttp:SetRequestHeader( "Content-Type" , "text/xml; charset=utf-8" )
oHttp:SetRequestHeader( "Connection:", "Keep-Alive" )
doc:LoadXML( cXmlbody )
TRY
ohttp:Send( doc:xml )
CATCH
cErrorMsg:='No Se Pudo Enviar Documento XML...'+CRLF+CRLF+;
'Sin Conexion a Internet o Servidor Con Problemas'
msginfo(cErrorMsg,"Intente Nuevamente")
return .t.
END
// ?ohttp:status
//status 200 = OK
// 500 = ERROR
response = ohttp:responsetext
hb_memoWrit( "fileout.pdf", oHttp:ResponseBody )
//crear un archivo para leer tag
cFilename:="texto.xml"
MEMOWRIT( cfilename, response, .F. )
//leer archivo para extraer el factura pdf
CTXT:=MEMOREAD(CFILENAME)
pdfin:=at("%PDF-1.4",CTXT)
pdfend:=At("%EOF",CTXT)
largo:=pdfend-pdfin
Cresp:=substr(CTXT,pdfin,largo+4)
//SE CREA EL ARCHIVO PDF
CPDF:="TEXTO.PDF"
MEMOWRIT( cPdf, CRESP, .F. )
RETURN .T.
]]>FUNCTION RDOCLPT(TS_TOKEN)
LOCAL oHttp,Doc,cxmLbody,oIni,nHandle
LOCAL ts_exit:=.t.,tw_servidor:='',ts_mj1:='',ts_modulo:=.f.
LOCAL ts_servidor:="https://sveqa.zofri.cl/sveProcDocWSN/Emision?WSDL"
if empty(ts_token)
msginfo('Debe Obtener un Token de Inicio para Autentificarse en Web Service','Token de Sesion')
return .f.
endif
cXmlBody:= '' +;
'<?xml version="1.0" encoding="utf-8"?>' + ;
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cl="cl.zofri.sve" xmlns:wsn="http://cl/zofri/sve/prd/wsn">'+;
' <soapenv:Header>'+;
' <cl:token>'+ts_token+'</cl:token>'+;
' </soapenv:Header>'+;
' <soapenv:Body>'+;
' <wsn:emisionDocumento>'+;
' <wsn:codigoAduaneroDoc>101-25-051206</wsn:codigoAduaneroDoc>'+;
' <wsn:tipoEmision>E</wsn:tipoEmision>'+;
' </wsn:emisionDocumento>'+;
' </soapenv:Body>'+;
'</soapenv:Envelope>'
TRY
oHttp := CreateObject( 'MSXML2.XMLHTTP.6.0' )
CATCH
oHttp := CreateObject( 'Microsoft.XMLHTTP' )
END
doc = CreateObject("MSXML2.DOMDocument.6.0")
oHttp:Open( "POST" , ts_servidor, .F. )
ohttp:SetRequestHeader( "Content-Type" , "text/xml; charset=utf-8" )
oHttp:SetRequestHeader( "Connection:", "Keep-Alive" )
doc:LoadXML( cXmlbody )
TRY
ohttp:Send( doc:xml )
CATCH
cErrorMsg:='No Se Pudo Enviar Documento XML...'+CRLF+CRLF+;
'Sin Conexion a Internet o Servidor Con Problemas'
msginfo(cErrorMsg,"Intente Nuevamente")
return .t.
END
// ?ohttp:status
//status 200 = OK
// 500 = ERROR
response = ohttp:responsetext
hb_memoWrit( "fileout.pdf", oHttp:ResponseBody )
//crear un archivo para leer tag
cFilename:="texto.xml"
MEMOWRIT( cfilename, response, .F. )
//leer archivo para extraer el factura pdf
CTXT:=MEMOREAD(CFILENAME)
pdfin:=at("%PDF-1.4",CTXT)
pdfend:=At("%EOF",CTXT)
largo:=pdfend-pdfin
Cresp:=substr(CTXT,pdfin,largo+4)
//SE CREA EL ARCHIVO PDF
CPDF:="TEXTO.PDF"
MEMOWRIT( cPdf, CRESP, .F. )
RETURN .T.
Code: Select all | Expand
cUrlSkualo := 'https://api.skualo.cl/'+_TOKENEMP_+'/documentos/'+cId+'/pdf' //esta info es entregado por el api
oDoc := CreateObject( "MSXML2.DOMDocument" )
oHttp := CreateObject( "MSXML2.XMLHTTP" )
do case
case cOpc = "A"
ohttp:Open( "POST" ,cUrlSkualo, .F. )
case cOpc = "M"
ohttp:Open( 'PUT' ,cUrlSkualo, .F. )
case cOpc = "L"
ohttp:Open( 'GET' ,cUrlSkualo, .F. )
otherwise
MsgInfo( "Debe enviar Opcion " )
return("")
endcase
if cFuncion $ "DTE;PDF"
oHttp:SetRequestHeader("accept", "application/pdf" )
else
oHttp:SetRequestHeader("accept", "application/json" )
if cOpc <> "L"
oHttp:SetRequestHeader("content-type", "application/json" )
endif
endif
oHttp:SetRequestHeader("Authorization", "Bearer " + _TOKENEMP_ )
TRY
oHttp:Send( jSon )
CATCH
lOk := .f.
END
if lOk .and. oHttp:status = 200
hb_jsonDecode( oHttp:ResponseText,@hReturn )
if cFuncion = "GETPDF"
cFilePdf := DRIVELOCAL+'\TEMPORAL\'+cPdf+'.pdf'
//cPdf = tip_doc + num_doc
hb_memowrit( cFilePdf, oHttp:ResponseBody )
if left( cPdf,3) = "BEL"
cPrinter := ViewUsu():Bel
else
cPrinter := ViewUsu():Fel
endif
if empty( cPrinter )
cCmd := cSumatra + " "+cFilePdf
else
cCmd := cSumatra + ' -Print-to "' + alltrim( StrToken( cPrinter, 1, "," ) ) + '" -exit-on-print ' + cFilePdf
endif
MsgRun( "Imprimiendo archivo "+cFilePdf, "Espere..", { || winexec( cCmd, SW_HIDE ) } )
else
//hb_jsonDecode( oHttp:ResponseText,@hReturn )
hReturn["status"] := 200
hReturn["statusText"] := "ok"
hReturn["title"] := "ok"
hReturn["isError"] := .f.
endif
else
if lOk // hizo la conexion pero skualo rechazo la solicitud
hb_jsonDecode( oHttp:ResponseText,@hReturn )
hReturn["status"] := oHttp:status
hReturn["statusText"] := oHttp:statusText
hReturn["title"] := lower(hReturn["title"])
hReturn["ErrorSkualo"] := {strtran(oHttp:ResponseText, ",", ","+CRLF ) }
hReturn["JsonSkualo"] := { json }
hReturn["isError"] := .t.
else
hReturn["status"] := 400
hReturn["title"] := "error"
hReturn["statusText"] := "Error en la comunicación con Skualo"+CRLF+"hay q volver hacer la operación"
hReturn["ErrorSkualo"] := {""}
hReturn["JsonSkualo"] := { json }
hReturn["isError"] := .t.
endif
endif
return( hReturn )
//-----------------------------------------------------------------------------------------------------
Code: Select all | Expand
cUrlSkualo := 'https://api.skualo.cl/'+_TOKENEMP_+'/documentos/'+cId+'/pdf' //esta info es entregado por el api
oDoc := CreateObject( "MSXML2.DOMDocument" )
oHttp := CreateObject( "MSXML2.XMLHTTP" )
do case
case cOpc = "A"
ohttp:Open( "POST" ,cUrlSkualo, .F. )
case cOpc = "M"
ohttp:Open( 'PUT' ,cUrlSkualo, .F. )
case cOpc = "L"
ohttp:Open( 'GET' ,cUrlSkualo, .F. )
otherwise
MsgInfo( "Debe enviar Opcion " )
return("")
endcase
if cFuncion $ "DTE;PDF"
oHttp:SetRequestHeader("accept", "application/pdf" )
else
oHttp:SetRequestHeader("accept", "application/json" )
if cOpc <> "L"
oHttp:SetRequestHeader("content-type", "application/json" )
endif
endif
oHttp:SetRequestHeader("Authorization", "Bearer " + _TOKENEMP_ )
TRY
oHttp:Send( jSon )
CATCH
lOk := .f.
END
if lOk .and. oHttp:status = 200
hb_jsonDecode( oHttp:ResponseText,@hReturn )
if cFuncion = "GETPDF"
cFilePdf := DRIVELOCAL+'\TEMPORAL\'+cPdf+'.pdf'
//cPdf = tip_doc + num_doc
hb_memowrit( cFilePdf, oHttp:ResponseBody )
if left( cPdf,3) = "BEL"
cPrinter := ViewUsu():Bel
else
cPrinter := ViewUsu():Fel
endif
if empty( cPrinter )
cCmd := cSumatra + " "+cFilePdf
else
cCmd := cSumatra + ' -Print-to "' + alltrim( StrToken( cPrinter, 1, "," ) ) + '" -exit-on-print ' + cFilePdf
endif
MsgRun( "Imprimiendo archivo "+cFilePdf, "Espere..", { || winexec( cCmd, SW_HIDE ) } )
else
//hb_jsonDecode( oHttp:ResponseText,@hReturn )
hReturn["status"] := 200
hReturn["statusText"] := "ok"
hReturn["title"] := "ok"
hReturn["isError"] := .f.
endif
else
if lOk // hizo la conexion pero skualo rechazo la solicitud
hb_jsonDecode( oHttp:ResponseText,@hReturn )
hReturn["status"] := oHttp:status
hReturn["statusText"] := oHttp:statusText
hReturn["title"] := lower(hReturn["title"])
hReturn["ErrorSkualo"] := {strtran(oHttp:ResponseText, ",", ","+CRLF ) }
hReturn["JsonSkualo"] := { json }
hReturn["isError"] := .t.
else
hReturn["status"] := 400
hReturn["title"] := "error"
hReturn["statusText"] := "Error en la comunicación con Skualo"+CRLF+"hay q volver hacer la operación"
hReturn["ErrorSkualo"] := {""}
hReturn["JsonSkualo"] := { json }
hReturn["isError"] := .t.
endif
endif
return( hReturn )
//-----------------------------------------------------------------------------------------------------
]]>cnavarro wrote: Tue Apr 08, 2025 10:30 pm Hola,
A partir de ahora, la descarga se podrá realizar en la siguiente url
https://github.com/cristobalnavarro/Tes ... ivedit.zip
Por favor informen de los problemas que puedan encontrar
Es posible que el explorador les indique "Descarga sospechosa", ignoren dicho mensaje debido a que el .zip contiene ficheros .exe y .dll
Saludos
]]>cnavarro wrote: Tue Apr 08, 2025 10:30 pm Hola,
A partir de ahora, la descarga se podrá realizar en la siguiente url
https://github.com/cristobalnavarro/Tes ... ivedit.zip
Por favor informen de los problemas que puedan encontrar
Es posible que el explorador les indique "Descarga sospechosa", ignoren dicho mensaje debido a que el .zip contiene ficheros .exe y .dll
Saludos
Code: Select all | Expand
Assinatura do problema:
Nome do Evento de Problema: APPCRASH
Nome do Aplicativo: fivedit.exe
Versão do Aplicativo: 1.2.19.1
Carimbo de Data/Hora do Aplicativo: 67685ef7
Nome do Módulo de Falhas: fivedit.exe
Versão do Módulo de Falhas: 1.2.19.1
Carimbo de Data/Hora do Módulo de Falhas: 67685ef7
Código de Exceção: c0000005
Deslocamento de Exceção: 00170939
Versão do sistema operacional: 6.1.7601.2.1.0.256.48
Identificação da Localidade: 1046
Informações Adicionais 1: ae6e
Informações Adicionais 2: ae6eabe6810bdf4b1e76ea7fc685c8b1
Informações Adicionais 3: cc3c
Informações Adicionais 4: cc3ca0fc2d2d04aa014954e6cb57d46b
Leia nossa declaração de privacidade online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0416
Se a declaração de privacidade online não estiver disponível, leia nossa declaração de privacidade offline:
C:\Windows\system32\pt-BR\erofflps.txt
Regards, saludos.]]>Code: Select all | Expand
Assinatura do problema:
Nome do Evento de Problema: APPCRASH
Nome do Aplicativo: fivedit.exe
Versão do Aplicativo: 1.2.19.1
Carimbo de Data/Hora do Aplicativo: 67685ef7
Nome do Módulo de Falhas: fivedit.exe
Versão do Módulo de Falhas: 1.2.19.1
Carimbo de Data/Hora do Módulo de Falhas: 67685ef7
Código de Exceção: c0000005
Deslocamento de Exceção: 00170939
Versão do sistema operacional: 6.1.7601.2.1.0.256.48
Identificação da Localidade: 1046
Informações Adicionais 1: ae6e
Informações Adicionais 2: ae6eabe6810bdf4b1e76ea7fc685c8b1
Informações Adicionais 3: cc3c
Informações Adicionais 4: cc3ca0fc2d2d04aa014954e6cb57d46b
Leia nossa declaração de privacidade online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0416
Se a declaração de privacidade online não estiver disponível, leia nossa declaração de privacidade offline:
C:\Windows\system32\pt-BR\erofflps.txt
Regards, saludos.]]>Code: Select all | Expand
..\source\function\TSBFuncs.c:
In file included from ..\source\function\TSBFuncs.c:14:
c:\fwh64\include\ClipApi.h:520:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern _mdAdd( LONG lClassHandle, PCLIPSYMBOL pMethodName, PCLIPFUNC pMethod );
~~~~~~ ^
..\source\function\TSBFuncs.c:48:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:49:23: warning: cast to 'HDC' (aka 'struct HDC__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HDC hDC = (HDC) _parni( 2 ) ;
^
..\source\function\TSBFuncs.c:58:23: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 10 ) ;
^
..\source\function\TSBFuncs.c:59:23: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBitMap = (HBITMAP) _parni( 11 ) ;
^
..\source\function\TSBFuncs.c:74:23: warning: cast to 'HBRUSH' (aka 'struct HBRUSH__ *') from smaller integer type
'LONG' (aka 'long') [-Wint-to-pointer-cast]
HBRUSH wBrush = (HBRUSH) _parnl( 26 ) ;
^
..\source\function\TSBFuncs.c:381:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:383:23: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 3 ) ;
^
..\source\function\TSBFuncs.c:417:17: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:448:14: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = ( HWND ) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:482:18: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:483:18: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 2 ) ;
^
..\source\function\TSBFuncs.c:522:14: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = ( HWND ) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:547:20: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBmp = (HBITMAP) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:563:20: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBmp = (HBITMAP) _parni( 1 ) ;
Code: Select all | Expand
..\source\function\TSBFuncs.c:
In file included from ..\source\function\TSBFuncs.c:14:
c:\fwh64\include\ClipApi.h:520:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern _mdAdd( LONG lClassHandle, PCLIPSYMBOL pMethodName, PCLIPFUNC pMethod );
~~~~~~ ^
..\source\function\TSBFuncs.c:48:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:49:23: warning: cast to 'HDC' (aka 'struct HDC__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HDC hDC = (HDC) _parni( 2 ) ;
^
..\source\function\TSBFuncs.c:58:23: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 10 ) ;
^
..\source\function\TSBFuncs.c:59:23: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBitMap = (HBITMAP) _parni( 11 ) ;
^
..\source\function\TSBFuncs.c:74:23: warning: cast to 'HBRUSH' (aka 'struct HBRUSH__ *') from smaller integer type
'LONG' (aka 'long') [-Wint-to-pointer-cast]
HBRUSH wBrush = (HBRUSH) _parnl( 26 ) ;
^
..\source\function\TSBFuncs.c:381:23: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:383:23: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 3 ) ;
^
..\source\function\TSBFuncs.c:417:17: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:448:14: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = ( HWND ) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:482:18: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = (HWND) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:483:18: warning: cast to 'HFONT' (aka 'struct HFONT__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HFONT hFont = (HFONT) _parni( 2 ) ;
^
..\source\function\TSBFuncs.c:522:14: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'short'
[-Wint-to-pointer-cast]
HWND hWnd = ( HWND ) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:547:20: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBmp = (HBITMAP) _parni( 1 ) ;
^
..\source\function\TSBFuncs.c:563:20: warning: cast to 'HBITMAP' (aka 'struct HBITMAP__ *') from smaller integer type
'short' [-Wint-to-pointer-cast]
HBITMAP hBmp = (HBITMAP) _parni( 1 ) ;
Code: Select all | Expand
int nVertText = hb_parnll( 23 ) ;
COLORREF clrTo = hb_parnl( 24 ) ;
BOOL bOpaque = hb_parl( 25 ) ;
HBRUSH wBrush = (HBRUSH) hb_parnl( 26 ) ;
BOOL b3DInv = ( HB_ISLOG( 27 ) ? ! hb_parl( 27 ) : FALSE ) ;
BOOL b3D = ( HB_ISLOG( 27 ) ? TRUE : FALSE ) ;
COLORREF nClr3DL = hb_parnl( 28 ) ;
COLORREF nClr3DS = hb_parnl( 29 ) ;
Code: Select all | Expand
int nVertText = hb_parnll( 23 ) ;
COLORREF clrTo = hb_parnl( 24 ) ;
BOOL bOpaque = hb_parl( 25 ) ;
HBRUSH wBrush = (HBRUSH) hb_parnl( 26 ) ;
BOOL b3DInv = ( HB_ISLOG( 27 ) ? ! hb_parl( 27 ) : FALSE ) ;
BOOL b3D = ( HB_ISLOG( 27 ) ? TRUE : FALSE ) ;
COLORREF nClr3DL = hb_parnl( 28 ) ;
COLORREF nClr3DS = hb_parnl( 29 ) ;
dejo el error completo :WINOLE/1007 No se puede obtener la propiedad Paste de la clase Worksheet. (0x800A03EC): Microsoft Excel
Code: Select all | Expand
Application
===========
Path and name: C:\Laboratorio\laboratorio.exe (32 bits)
Size: 7,392,768 bytes
Compiler version: Harbour 3.2.0dev (r2403071241)
FiveWin version: FWH 24.07
C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 6 hours 15 mins 40 secs
Error occurred at: 12/05/2025, 16:44:05
Error description: (DOS Error -2147352567) WINOLE/1007 No se puede obtener la propiedad Paste de la clase Worksheet. (0x800A03EC): Microsoft Excel
Stack Calls
===========
Called from: hbwin\oleauto.prg => TOLEAUTO:PASTE( 0 )
Called from: .\source\classes\xbrowse.prg => TXBROWSE:TOEXCEL( 11113 )
Called from: source\almacen.prg => (b)CREABUTONBAR( 320 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:CLICK( 816 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 1103 )
Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1867 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 2143 )
Called from: .\source\classes\window.prg => _FWH( 3699 )
Called from: .\source\classes\dialog.prg => DIALOGBOX( 0 )
Called from: .\source\classes\dialog.prg => TDIALOG:ACTIVATE( 309 )
Called from: source\almacen.prg => DO_ALMACEN( 151 )
Called from: source\main_laboratorio.prg => (b)POPUPINVENTARIO( 671 )
Called from: .\source\classes\menu.prg => TMENU:ACTIVATE( 1801 )
Called from: source\main_laboratorio.prg => POPUPINVENTARIO( 697 )
Called from: source\main_laboratorio.prg => (b)CREATEBUTTONBAR( 438 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:CLICK( 816 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 1103 )
Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1867 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 2143 )
Called from: .\source\classes\window.prg => _FWH( 3699 )
Called from: .\source\classes\window.prg => WINRUN( 0 )
Called from: .\source\classes\window.prg => TWINDOW:ACTIVATE( 1117 )
Called from: source\main_laboratorio.prg => MAIN( 241 )
System
======
CPU type: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz 2808 Mhz
Hardware memory: 16276 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 1
1 ,
Variables in use
================
Procedure Type Value
==========================
TOLEAUTO:PASTE
Param 1: O Class: ERROR
TXBROWSE:TOEXCEL
Local 1: U
Local 2: U
(b)CREABUTONBAR
Local 1: B {|| ... }
Local 2: U
Local 3: A Len: 13
Local 4: L .T.
Local 5: U
Local 6: U
Local 7: O Class: TXBROWSE
Local 8: O Class: TOLEAUTO
Local 9: O Class: TOLEAUTO
Local 10: U
Local 11: N 13
Local 12: N 14
Local 13: O Class: TXBRWCOLUMN
Local 14: C "C"
Local 15: U
Local 16: N 1
Local 17: N 12394
Local 18: N 13422
Local 19: C "FALSO 004-24 1.49 ROUND TOP W 70/24 MM +0.50/2.25 3 1 171,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-240 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.25 3 1 17,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-241 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.50 3 1 3,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-242 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.75 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-243 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/3.00 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-244 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.00 3 1 18,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-245 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.25 3 1 62,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-246 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.50 3 1 44,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-247 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.75 3 1 37,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-248 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.00 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-249 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.25 3 1 28,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-25 1.49 ROUND TOP W 70/24 MM +0.50/2.50 3 1 149,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-250 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.50 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-251 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.75 3 1 15,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-252 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/3.00 3 1 7,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-253 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.00 3 1 22,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-254 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.25 3 1 66,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-255 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.50 3 1 52,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-256 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.75 3 1 49,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-257 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.00 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-258 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.25 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-259 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.50 3 1 2,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-26 1.49 ROUND TOP W 70/24 MM +0.50/2.75 3 1 157,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-260 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.75 3 1 18,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-261 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/3.00 3 1 10,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-262 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.00 3 1 16,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-263 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.25 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-264 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.50 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-265 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-266 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.00 3 1 3,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-267 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.25 3 1 7,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-268 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.50 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-269 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.75 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-27 1.49 ROUND TOP W 70/24 MM +0.50/3.00 3 1 146,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-270 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-271 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-272 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-273 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-274 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-275 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-276 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-277 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-278 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-279 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-28 1.49 ROUND TOP W 70/24 MM +0.75/1.00 3 1 16,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-280 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-281 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-282 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-283 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-284 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-285 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-286 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-287 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-288 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-289 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-29 1.49 ROUND TOP W 70/24 MM +0.75/1.25 3 1 31,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-290 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-291 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-292 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-293 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-294 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-295 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-296 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-297 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-298 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-299 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-3 1.49 ROUND TOP W 70/24 MM +0.00/1.50 3 1 107,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-30 1.49 ROUND TOP W 70/24 MM +0.75/1.50 3 1 0,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-300 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-301 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-302 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-303 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-304 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-305 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-306 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-307 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-308 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-309 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-31 1.49 ROUND TOP W 70/24 MM +0.75/1.75 3 1 11,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-310 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-311 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-312 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-313 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-314 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.75 3 1 7,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-315 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/3.00 3 1 3,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-316 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.00 3 1 2,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-317 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-318 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-319 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.75 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-32 1.49 ROUND TOP W 70/24 MM +0.75/2.00 3 1 0,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-320 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-321 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.25 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-322 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.50 3 1 5,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-323 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.75 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-324 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/3.00 3 1 44,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-325 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.00 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-326 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.25 3 1 3,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-327 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-328 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-329 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-33 1.49 ROUND TOP W 70/24 MM +0.75/2.25 3 1 169,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-330 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-331 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-332 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.75 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-333 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/3.00 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-334 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.00 3 1 18,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-335 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.25 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-336 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-337 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-338 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-339 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-34 1.49 ROUND TOP W 70/24 MM +0.75/2.50 3 1 150,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-340 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-341 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-342 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/3.00 3 1 12,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-343 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.00 3 1 29,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-344 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.25 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-345 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.50 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-346 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-347 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-348 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-349 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-35 1.49 ROUND TOP W 70/24 MM +0.75/2.75 3 1 161,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-350 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-351 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/3.00 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-352 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.00 3 1 28,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-353 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.25 3 1 13,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-354 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.50 3 1 7,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-355 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-356 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-357 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-358 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-359 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-36 1.49 ROUND TOP W 70/24 MM +0.75/3.00 3 1 23,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-360 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-361 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.00 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-362 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.25 3 1 27,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-363 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.50 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-364 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-365 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-366 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-367 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-368 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-369 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-37 1.49 ROUND TOP W 70/24 MM +1.00/1.00 3 1 40,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-370 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.00 3 1 20,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-371 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.25 3 1 23,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-372 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.50 3 1 16,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-373 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.75 3 1 8,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-374 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.00 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-375 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-376 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-377 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.75 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-378 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-379 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.00 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-38 1.49 ROUND TOP W 70/24 MM +1.00/1.25 3 1 6,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-380 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.25 3 1 16,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-381 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.50 3 1 14,000 ACTIVO 315,00 450,00 0,00 NO "
Local 20: N 12236
Local 21: N 100
Local 22: C "#.##0,00"
Local 23: A Len: 0
Local 24: L .F.
Local 25: A Len: 13
Local 26: L .T.
Local 27: U
Local 28: U
Local 29: U
Local 30: U
Local 31: U
Local 32: U
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 45
Param 2: N 45
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 2949165
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 2949165
DIALOGBOX
Param 1: N 2949165
Param 2: N 514
Param 3: N 0
Param 4: N 2949165
Param 5: N 53
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 10354688
Param 2: C "XBROWSE_ALMACEN"
Param 3: N 525598
Param 4: O Class: TDIALOG
DO_ALMACEN
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: L .F.
Param 13: O Class: TDIALOG
Param 14: U
Local 1: N 525598
Local 2: S @_NRESULT()
Local 3: O Class: TDIALOG
(b)POPUPINVENTARIO
Local 1: O Class: TDOLPHINQRY
Local 2: C " SELECT a.codigo,
a.tipo,
a.componente,
b.nombre,
b.descripcion,
IF(b.activo=1, 'ACTIVO', 'INACTIVO') AS activo,
a.cantidad,
a.costo,
IF(a.preciofijo=0, "NO", "SI") AS preunico,
a.precio1,
a.my_recno,
a.alicuota,
a.fecha,
IF(a.costoadicional=0, "NO", "SI") AS costoadi,
b.marca,
b.medida,
c.descripcion AS namematerial,
(SELECT nombre
FROM refemedida
WHERE medida = id
LIMIT 1) AS namemedida,
(SELECT descripcion
FROM refetipo
WHERE a.tipo = tipo
LIMIT 1) AS nametipo,
(SELECT descripcion
FROM refecomp
WHERE a.componente = componente
LIMIT 1) AS namecompon
FROM almacen_ AS a
LEFT JOIN catalogo AS b ON a.codigo = b.codigo
LEFT JOIN materiales AS c ON b.material = c.codigo
ORDER BY codigo;
"
Local 3: O Class: TDIALOG
Local 4: O Class: TXBROWSE
Local 5: O Class: TFONT
Local 6: U
Local 7: A Len: 12
Local 8: C "@E 999,999"
Local 9: L .F.
TMENU:ACTIVATE
Param 1: O Class: TMENUITEM
POPUPINVENTARIO
Param 1: N 76
Param 2: N 166
Param 3: O Class: TBAR
Param 4: L .T.
Param 5: N 0
Local 1: A Len: 2
(b)CREATEBUTTONBAR
Param 1: O Class: TBTNBMP
Local 1: O Class: TMENU
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 68
Param 2: N 30
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 4456478
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 4456478
WINRUN
Param 1: N 4456478
Param 2: N 514
Param 3: N 0
Param 4: N 4456478
Param 5: N 6
Local 1: O Class: TBTNBMP
TWINDOW:ACTIVATE
Param 1: N 525598
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: B {|| ... }
Param 7: B {|| ... }
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TDOLPHINQRY
5 TWINDOW
6 TCONTROL
7 TXBROWSE
8 TGET
9 TCOMBOBOX
10 TVARIABLE
11 TINI
12 TMYSQLSERVER
13 TBRUSH
14 TFONT
15 TDIALOG
16 TSAY
17 TRECT
18 TDOLPHINSRV
19 TICON
20 TBITMAP
21 GET
22 TCLIPGET
23 TBTNBMP
24 TBUTTON
25 TBUTTONBMP
26 TREG32
27 TMSGBAR
28 TMSGITEM
29 TTIMER
30 TBAR
31 TMENU
32 TMENUITEM
33 TXBRWCOLUMN
34 TSCROLLBAR
35 TCLIPBOARD
36 WIN_OLEAUTO
37 TOLEAUTO
38 TAJUSTE
39 TMULTIGET
40 TPASSWORD
41 TCALC
42 TWBROWSE
43 TXIMAGE
44 FRREPORTMANAGER
45 FRPRINTOPTIONS
46 FRPREVIEWOPTIONS
47 FRENGINEOPTIONS
48 FRREPORTOPTIONS
49 TFACTUVENTA
50 TORDEN
51 TDATEPICK
52 TSTRUCT
Memory Analysis
===============
1085 Static variables
Dynamic memory consume:
Actual Value: 5767168 bytes
Highest Value: 5963776 bytes
dejo el error completo :WINOLE/1007 No se puede obtener la propiedad Paste de la clase Worksheet. (0x800A03EC): Microsoft Excel
Code: Select all | Expand
Application
===========
Path and name: C:\Laboratorio\laboratorio.exe (32 bits)
Size: 7,392,768 bytes
Compiler version: Harbour 3.2.0dev (r2403071241)
FiveWin version: FWH 24.07
C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 6 hours 15 mins 40 secs
Error occurred at: 12/05/2025, 16:44:05
Error description: (DOS Error -2147352567) WINOLE/1007 No se puede obtener la propiedad Paste de la clase Worksheet. (0x800A03EC): Microsoft Excel
Stack Calls
===========
Called from: hbwin\oleauto.prg => TOLEAUTO:PASTE( 0 )
Called from: .\source\classes\xbrowse.prg => TXBROWSE:TOEXCEL( 11113 )
Called from: source\almacen.prg => (b)CREABUTONBAR( 320 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:CLICK( 816 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 1103 )
Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1867 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 2143 )
Called from: .\source\classes\window.prg => _FWH( 3699 )
Called from: .\source\classes\dialog.prg => DIALOGBOX( 0 )
Called from: .\source\classes\dialog.prg => TDIALOG:ACTIVATE( 309 )
Called from: source\almacen.prg => DO_ALMACEN( 151 )
Called from: source\main_laboratorio.prg => (b)POPUPINVENTARIO( 671 )
Called from: .\source\classes\menu.prg => TMENU:ACTIVATE( 1801 )
Called from: source\main_laboratorio.prg => POPUPINVENTARIO( 697 )
Called from: source\main_laboratorio.prg => (b)CREATEBUTTONBAR( 438 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:CLICK( 816 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 1103 )
Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1867 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 2143 )
Called from: .\source\classes\window.prg => _FWH( 3699 )
Called from: .\source\classes\window.prg => WINRUN( 0 )
Called from: .\source\classes\window.prg => TWINDOW:ACTIVATE( 1117 )
Called from: source\main_laboratorio.prg => MAIN( 241 )
System
======
CPU type: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz 2808 Mhz
Hardware memory: 16276 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 1
1 ,
Variables in use
================
Procedure Type Value
==========================
TOLEAUTO:PASTE
Param 1: O Class: ERROR
TXBROWSE:TOEXCEL
Local 1: U
Local 2: U
(b)CREABUTONBAR
Local 1: B {|| ... }
Local 2: U
Local 3: A Len: 13
Local 4: L .T.
Local 5: U
Local 6: U
Local 7: O Class: TXBROWSE
Local 8: O Class: TOLEAUTO
Local 9: O Class: TOLEAUTO
Local 10: U
Local 11: N 13
Local 12: N 14
Local 13: O Class: TXBRWCOLUMN
Local 14: C "C"
Local 15: U
Local 16: N 1
Local 17: N 12394
Local 18: N 13422
Local 19: C "FALSO 004-24 1.49 ROUND TOP W 70/24 MM +0.50/2.25 3 1 171,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-240 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.25 3 1 17,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-241 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.50 3 1 3,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-242 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/2.75 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-243 1.49 PROGRESSIVE W 75/14 MM OVANT +2.25/3.00 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-244 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.00 3 1 18,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-245 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.25 3 1 62,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-246 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.50 3 1 44,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-247 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/1.75 3 1 37,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-248 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.00 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-249 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.25 3 1 28,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-25 1.49 ROUND TOP W 70/24 MM +0.50/2.50 3 1 149,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-250 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.50 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-251 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/2.75 3 1 15,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-252 1.49 PROGRESSIVE W 75/14 MM OVANT +2.50/3.00 3 1 7,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-253 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.00 3 1 22,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-254 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.25 3 1 66,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-255 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.50 3 1 52,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-256 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/1.75 3 1 49,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-257 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.00 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-258 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.25 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-259 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.50 3 1 2,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-26 1.49 ROUND TOP W 70/24 MM +0.50/2.75 3 1 157,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-260 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/2.75 3 1 18,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-261 1.49 PROGRESSIVE W 75/14 MM OVANT +2.75/3.00 3 1 10,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-262 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.00 3 1 16,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-263 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.25 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-264 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.50 3 1 13,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-265 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-266 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.00 3 1 3,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-267 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.25 3 1 7,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-268 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.50 3 1 11,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-269 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/2.75 3 1 14,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-27 1.49 ROUND TOP W 70/24 MM +0.50/3.00 3 1 146,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-270 1.49 PROGRESSIVE W 75/14 MM OVANT +3.00/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-271 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-272 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-273 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-274 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-275 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-276 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-277 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-278 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-279 1.49 PROGRESSIVE W 75/14 MM OVANT +3.25/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-28 1.49 ROUND TOP W 70/24 MM +0.75/1.00 3 1 16,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-280 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-281 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-282 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-283 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-284 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-285 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-286 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-287 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-288 1.49 PROGRESSIVE W 75/14 MM OVANT +3.50/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-289 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-29 1.49 ROUND TOP W 70/24 MM +0.75/1.25 3 1 31,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-290 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-291 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-292 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-293 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-294 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-295 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-296 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-297 1.49 PROGRESSIVE W 75/14 MM OVANT +3.75/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-298 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-299 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-3 1.49 ROUND TOP W 70/24 MM +0.00/1.50 3 1 107,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-30 1.49 ROUND TOP W 70/24 MM +0.75/1.50 3 1 0,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-300 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-301 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/1.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-302 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-303 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.25 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-304 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.50 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-305 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/2.75 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-306 1.49 PROGRESSIVE W 75/14 MM OVANT +4.00/3.00 3 1 0,000 ACTIVO 275,00 350,00 0,00 NO
FALSO 004-307 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-308 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-309 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-31 1.49 ROUND TOP W 70/24 MM +0.75/1.75 3 1 11,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-310 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-311 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-312 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-313 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-314 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/2.75 3 1 7,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-315 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.00/3.00 3 1 3,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-316 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.00 3 1 2,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-317 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-318 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-319 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/1.75 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-32 1.49 ROUND TOP W 70/24 MM +0.75/2.00 3 1 0,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-320 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-321 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.25 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-322 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.50 3 1 5,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-323 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/2.75 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-324 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.25/3.00 3 1 44,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-325 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.00 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-326 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.25 3 1 3,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-327 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-328 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-329 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-33 1.49 ROUND TOP W 70/24 MM +0.75/2.25 3 1 169,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-330 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-331 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-332 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/2.75 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-333 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.50/3.00 3 1 6,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-334 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.00 3 1 18,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-335 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.25 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-336 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-337 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-338 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-339 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-34 1.49 ROUND TOP W 70/24 MM +0.75/2.50 3 1 150,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-340 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-341 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-342 1.56 PROGRESSIVE HCT 75/13+3 AFINI +0.75/3.00 3 1 12,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-343 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.00 3 1 29,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-344 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.25 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-345 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.50 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-346 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-347 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-348 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-349 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-35 1.49 ROUND TOP W 70/24 MM +0.75/2.75 3 1 161,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-350 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-351 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.00/3.00 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-352 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.00 3 1 28,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-353 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.25 3 1 13,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-354 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.50 3 1 7,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-355 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-356 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-357 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-358 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-359 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-36 1.49 ROUND TOP W 70/24 MM +0.75/3.00 3 1 23,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-360 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.25/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-361 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.00 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-362 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.25 3 1 27,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-363 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.50 3 1 11,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-364 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/1.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-365 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-366 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-367 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-368 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/2.75 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-369 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.50/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-37 1.49 ROUND TOP W 70/24 MM +1.00/1.00 3 1 40,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-370 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.00 3 1 20,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-371 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.25 3 1 23,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-372 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.50 3 1 16,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-373 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/1.75 3 1 8,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-374 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.00 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-375 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.25 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-376 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.50 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-377 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/2.75 3 1 1,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-378 1.56 PROGRESSIVE HCT 75/13+3 AFINI +1.75/3.00 3 1 0,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-379 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.00 3 1 21,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-38 1.49 ROUND TOP W 70/24 MM +1.00/1.25 3 1 6,000 ACTIVO 92,00 130,00 0,00 NO
FALSO 004-380 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.25 3 1 16,000 ACTIVO 315,00 450,00 0,00 NO
FALSO 004-381 1.56 PROGRESSIVE HCT 75/13+3 AFINI +2.00/1.50 3 1 14,000 ACTIVO 315,00 450,00 0,00 NO "
Local 20: N 12236
Local 21: N 100
Local 22: C "#.##0,00"
Local 23: A Len: 0
Local 24: L .F.
Local 25: A Len: 13
Local 26: L .T.
Local 27: U
Local 28: U
Local 29: U
Local 30: U
Local 31: U
Local 32: U
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 45
Param 2: N 45
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 2949165
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 2949165
DIALOGBOX
Param 1: N 2949165
Param 2: N 514
Param 3: N 0
Param 4: N 2949165
Param 5: N 53
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 10354688
Param 2: C "XBROWSE_ALMACEN"
Param 3: N 525598
Param 4: O Class: TDIALOG
DO_ALMACEN
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: L .F.
Param 13: O Class: TDIALOG
Param 14: U
Local 1: N 525598
Local 2: S @_NRESULT()
Local 3: O Class: TDIALOG
(b)POPUPINVENTARIO
Local 1: O Class: TDOLPHINQRY
Local 2: C " SELECT a.codigo,
a.tipo,
a.componente,
b.nombre,
b.descripcion,
IF(b.activo=1, 'ACTIVO', 'INACTIVO') AS activo,
a.cantidad,
a.costo,
IF(a.preciofijo=0, "NO", "SI") AS preunico,
a.precio1,
a.my_recno,
a.alicuota,
a.fecha,
IF(a.costoadicional=0, "NO", "SI") AS costoadi,
b.marca,
b.medida,
c.descripcion AS namematerial,
(SELECT nombre
FROM refemedida
WHERE medida = id
LIMIT 1) AS namemedida,
(SELECT descripcion
FROM refetipo
WHERE a.tipo = tipo
LIMIT 1) AS nametipo,
(SELECT descripcion
FROM refecomp
WHERE a.componente = componente
LIMIT 1) AS namecompon
FROM almacen_ AS a
LEFT JOIN catalogo AS b ON a.codigo = b.codigo
LEFT JOIN materiales AS c ON b.material = c.codigo
ORDER BY codigo;
"
Local 3: O Class: TDIALOG
Local 4: O Class: TXBROWSE
Local 5: O Class: TFONT
Local 6: U
Local 7: A Len: 12
Local 8: C "@E 999,999"
Local 9: L .F.
TMENU:ACTIVATE
Param 1: O Class: TMENUITEM
POPUPINVENTARIO
Param 1: N 76
Param 2: N 166
Param 3: O Class: TBAR
Param 4: L .T.
Param 5: N 0
Local 1: A Len: 2
(b)CREATEBUTTONBAR
Param 1: O Class: TBTNBMP
Local 1: O Class: TMENU
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 68
Param 2: N 30
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 4456478
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 4456478
WINRUN
Param 1: N 4456478
Param 2: N 514
Param 3: N 0
Param 4: N 4456478
Param 5: N 6
Local 1: O Class: TBTNBMP
TWINDOW:ACTIVATE
Param 1: N 525598
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: B {|| ... }
Param 7: B {|| ... }
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TDOLPHINQRY
5 TWINDOW
6 TCONTROL
7 TXBROWSE
8 TGET
9 TCOMBOBOX
10 TVARIABLE
11 TINI
12 TMYSQLSERVER
13 TBRUSH
14 TFONT
15 TDIALOG
16 TSAY
17 TRECT
18 TDOLPHINSRV
19 TICON
20 TBITMAP
21 GET
22 TCLIPGET
23 TBTNBMP
24 TBUTTON
25 TBUTTONBMP
26 TREG32
27 TMSGBAR
28 TMSGITEM
29 TTIMER
30 TBAR
31 TMENU
32 TMENUITEM
33 TXBRWCOLUMN
34 TSCROLLBAR
35 TCLIPBOARD
36 WIN_OLEAUTO
37 TOLEAUTO
38 TAJUSTE
39 TMULTIGET
40 TPASSWORD
41 TCALC
42 TWBROWSE
43 TXIMAGE
44 FRREPORTMANAGER
45 FRPRINTOPTIONS
46 FRPREVIEWOPTIONS
47 FRENGINEOPTIONS
48 FRREPORTOPTIONS
49 TFACTUVENTA
50 TORDEN
51 TDATEPICK
52 TSTRUCT
Memory Analysis
===============
1085 Static variables
Dynamic memory consume:
Actual Value: 5767168 bytes
Highest Value: 5963776 bytes
Code: Select all | Expand
/////////////// CALL TO RESUMEN DE FACTURAS //////////////////////////////////////////////////////////////////////////////////
cQuery := "CALL obtener_saldos_clientes('"+_cPrefijo+"');"
TRY
oQry := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aResumen :={}
aResumenBack:= {}
aResumen:=oQry:FillArray()
aResumenBack:=aClone(aResumen)
/////////////// CALL TO DETALLES DE FACTURAS //////////////////////////////////////////////////////////////////////////////////
cQuery := "CALL ObtenerEstadoFacturas('"+_cPrefijo+"');"
TRY
oFacturas := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aFacturas := {}
aFacturas := oFacturas:FillArray()
aFacturasBackup:=aClone(aFacturas)
Fnct_CuadreToExcel()
_Close()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Define cursor oCursorBar resource 'manito'
Define cursor oCursorIndicador resource 'Indicador'
Define Font oFHeadBrw Name "Segoe UI SemiBold" Size 0, -14
Define Dialog oDlg_Facturas resource "oDlg_Facturas" title 'Gestión de Documentos Por Cobrar'
oDlg_Facturas:lHelpIcon:=.f.
Redefine Folderex oFolder Id 500 of oDlg_Facturas prompt 'Resumen', 'Detalles' BITMAPS ;
'open2' , 'close' DIALOGS ;
'oDlg_FactResumen' ,;
'oDlg_FactDetalle' ;
TAB HEIGHT 28 ROUND 5on change (Fnct_oFolderBitmaps())
oFolder:aDialogs[ 1 ]:SetBrush( oBrush )
oFolder:aDialogs[ 2 ]:SetBrush( oBrush )
//////////////////// XBROWSE RESUMEN ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Redefine get oGetSeek2 Var cSeek2 Id 4061 of oFolder:aDialogs[ 1 ] on change (cSeek2:=oGetSeek2:GetText()), Fnct_Seek(@aResumen),
Fnct_PonTotales() ) WHEN len(aResumen)>0
oGetSeek2:SetFont(_oFontGets)
oGetSeek2:SetColorFocus( CLR_YELLOW )
Redefine xBrowse oBrwVer Id 4060 DATASOURCE aResumen AUTOCOLS ;
COLUMNS cRif, cNombre, nVencido, nNoVencido, nVenceHoy, nTotalGeneral, nCodigoCliente ;
HEADERS "R.I.F", "Nombre", "Vencido", "No Vencido", "Vence Hoy", "Total","" ;
FIELDSIZES 90, 250, 100, 100, 100, 100, 30 ;
PICTURE nil, nil, '@E 9,999,999,999.99', '@E 9,999,999,999.99' '@E
'9,999,999,999.99', '@E 9,999,999,999.99', nil ;
JUSTIFY AL_LEFT, AL_LEFT, AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_RIGHT ;
CELL LINES ;
FASTEDIT ;
FOOTERS of oFolder:aDialogs[ 1 ] //on dblclick (cVarClien:=alltrim(oBrwVer:aCols[cNombre]:Value))
oBrwVer:aArrayData:=aResumen
WITH object oBrwVer
nCiclo:= 1
do while nCiclo<=7
oBrwVer:aCols[nCiclo] :nHeadStrAlign := AL_CENTER
oBrwVer:aCols[nCiclo] :oHeaderFont := oFHeadBrw
oBrwVer:aCols[nCiclo] :lAllowSizing :=.t.
nCiclo++
enddo
oBrwVer:aCols[7]:Hide()
oBrwVer:lAllowColSwapping :=.F.
oBrwVer:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrwVer:l2007 := .f.
oBrwVer:lFooter := .t.
oBrwVer:lRecordSelector:= .f.
oBrwVer:bClrHeader := { || { CLR_WHITE, CLR_BLUE, CLR_HGRAY } }
:bClrFooter := { || { CLR_WHITE, CLR_BLUE, CLR_HGRAY } }
:aCols[1] :bFooter := { || 'Total -> '+transform(len(aResumen),"@E 99,999") }
:aCols[3]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[4]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[5]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[6]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:MakeTotals()
oBrwVer:MakeTotals()
END
oBrwVer:gotop()
oBrwVer:Refresh()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Redefine get oGetSeek Var cSeek Id 11 of oFolder:aDialogs[ 2 ] on change (cSeek:=oGetSeek:GetText(), Fnct_SeekArray(), Fnct_PonTotales() ) WHEN len(aFacturas)>0
oGetSeek:SetFont(_oFontGets)
oGetSeek:SetColorFocus( CLR_YELLOW )
Redefine Radio oRSeek Var nSeek Id 4002,4003 of oFolder:aDialogs[ 2 ] on change (oGetSeek:SetFocus()) WHEN len(aFacturas)>0
Redefine xBrowse oBrwFac Id 4007 DATASOURCE aFacturas AUTOCOLS ;
AUTOSORT;
COLUMNS cRifCliente, cCliente , cNumeroDoc, dEmision, dVcto, nDiasVcto, FacMonto, ;
nFacPagos , nFacSaldo, cConcepto, nCodigoCli, nFacCodigoCli, nEmail, nLimite, cTolera ;
HEADERS _cIdEmpresa, "Cliente", "N# Doc. ","Emisión", "Vencto.", "Dias Vcdo.", "Monto "+_cSignoMoneda ,;
"Pagos", "Saldo", "Concepto", "", "", "", "", "" ;
FIELDSIZES 90, 250, 70, 75, 90, 85, 100, 100, 100, 160,20,20,50, 100, 0 ;
PICTURE nil, nil, nil, nil, nil, nil, '@E 9,999,999,999.99', '@E 9,999,999,999.99','@E 9,999,999,999.99', ;
nil, nil,nil, nil, '@E 9,999,999,999.99', nil ;
JUSTIFY AL_LEFT, AL_LEFT, AL_CENTER, AL_CENTER, AL_CENTER, AL_CENTER,;
AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_LEFT, AL_LEFT, AL_CENTER, AL_LEFT, AL_LEFT, AL_CENTER ;
CELL LINES FASTEDIT FOOTERS of oFolder:aDialogs[ 2 ] on Dblclick (Fnct_FiltrarCliente(alltrim(oBrwFac:aCols[cCliente]:Value)))//(Fnct_FiltrarCliente(alltrim(oBrwFac:aCols[cCliente]:Value)))
oBrwFac:aArrayData:=aFacturas
WITH object oBrwFac
nCiclo:= 1
do while nCiclo<=nObrwColsToShow
oBrwFac:aCols[nCiclo] :nHeadStrAlign := AL_CENTER
oBrwFac:aCols[nCiclo] :oHeaderFont := oFHeadBrw
oBrwFac:aCols[nCiclo] :lAllowSizing :=.T.
nCiclo++
enddo
oBrwFac:aCols[nCodigoCli] :Hide()
oBrwFac:aCols[nFacCodigoCli]:Hide()
oBrwFac:aCols[11]:Hide()
oBrwFac:aCols[12]:Hide()
oBrwFac:aCols[13]:Hide()
oBrwFac:aCols[14]:Hide()
oBrwFac:aCols[15]:Hide()
oBrwFac:lAllowColSwapping :=.F.
oBrwFac:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrwFac:l2007 := .f.
oBrwFac:lFooter := .t.
oBrwFac:lRecordSelector:= .f.
oBrwFac:bOnSort:={|b,oCol| oBrwFac:Gotop() }
*:aCols[cConcepto]:bLDClickData:= {|| Fnct_VerConcepto()} //oBrwCiudades:SetFilter( (oBrwCiudades:aCols[2]:value) =
(oBrwEstados:aCols[1]:Value) )
*:aCols[nFacPagos]:bLDClickData:= {|| Fnct_VerPagos()}
oBrwFac:bClrHeader := { || iif(lBW, ( { CLR_WHITE, CLR_GRAY, CLR_GRAY }), ({ CLR_WHITE, CLR_BLUE, CLR_HGRAY })) }
:bClrFooter := { || iif(lBW, ( { CLR_WHITE, CLR_GRAY, CLR_GRAY }), ({ CLR_WHITE, CLR_BLUE, CLR_HGRAY })) }
AEval( oBrwFac:aCols, { |oCol| ;
oCol:bClrSelFocus := { || { CLR_BLACK, RGB( 255, 224, 126) } }, ;
oCol:bPaintText := { |oCol, hDC, cData, aRect, aColors| ;
PaintCol( oCol, hDC, cData, aRect, aColors ) } } )
:nStretchCol := STRETCHCOL_WIDEST
:aCols[nFacMonto]:nFooterType := AGGR_SUM // TOTAL
:aCols[nFacPagos]:nFooterType := AGGR_SUM //TOTAL
:aCols[nFacSaldo]:nFooterType := AGGR_SUM //TOTAL
:bRClicked :={ || Fnct_EditarFactura() }
:bchange := { || Fnct_PonTotales() }
:aCols[2]:cFooter := { || " Total Documentos -> "+transform( len(aFacturas), "@E 9,999,999.99") }
:MakeTotals()
oBrwFac:MakeTotals()
END
WITH OBJECT oBrwFac:aCols[nDiasVcto]
oBrwFac:aCols[nDiasVcto]:bClrStd := ChangeColor()
END
WITH OBJECT oBrwFac:aCols[nFacPagos]
oCol:=oBrwFac:aCols[nFacPagos]
oBrwFac:aCols[nFacPagos]:nEditType := EDIT_BUTTON
oBrwFac:aCols[nFacPagos]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerPagos( nRow, nCol, oCol, nKey, oBrwFac:aCols[nFacMonto] :Value ,;
oBrwFac:aCols[dEmision] :Value ),oBrwFac:Refresh() }
END
WITH OBJECT oBrwFac:aCols[cConcepto]
oCol:=oBrwFac:aCols[cConcepto]
oBrwFac:aCols[cConcepto]:nEditType := EDIT_BUTTON
oBrwFac:aCols[cConcepto]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerConcepto( nRow, nCol, oCol, nKey ) }
END
WITH OBJECT oBrwFac:aCols[dVcto]
oCol:=oBrwFac:aCols[dVcto]
oBrwFac:aCols[dVcto]:nEditType := EDIT_BUTTON
oBrwFac:aCols[dVcto]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerDiasCredito( nRow, nCol, oCol, nKey ) }
END
oBrwFac:gotop()
oBrwFac:Refresh()
Code: Select all | Expand
/////////////// CALL TO RESUMEN DE FACTURAS //////////////////////////////////////////////////////////////////////////////////
cQuery := "CALL obtener_saldos_clientes('"+_cPrefijo+"');"
TRY
oQry := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aResumen :={}
aResumenBack:= {}
aResumen:=oQry:FillArray()
aResumenBack:=aClone(aResumen)
/////////////// CALL TO DETALLES DE FACTURAS //////////////////////////////////////////////////////////////////////////////////
cQuery := "CALL ObtenerEstadoFacturas('"+_cPrefijo+"');"
TRY
oFacturas := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aFacturas := {}
aFacturas := oFacturas:FillArray()
aFacturasBackup:=aClone(aFacturas)
Fnct_CuadreToExcel()
_Close()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Define cursor oCursorBar resource 'manito'
Define cursor oCursorIndicador resource 'Indicador'
Define Font oFHeadBrw Name "Segoe UI SemiBold" Size 0, -14
Define Dialog oDlg_Facturas resource "oDlg_Facturas" title 'Gestión de Documentos Por Cobrar'
oDlg_Facturas:lHelpIcon:=.f.
Redefine Folderex oFolder Id 500 of oDlg_Facturas prompt 'Resumen', 'Detalles' BITMAPS ;
'open2' , 'close' DIALOGS ;
'oDlg_FactResumen' ,;
'oDlg_FactDetalle' ;
TAB HEIGHT 28 ROUND 5on change (Fnct_oFolderBitmaps())
oFolder:aDialogs[ 1 ]:SetBrush( oBrush )
oFolder:aDialogs[ 2 ]:SetBrush( oBrush )
//////////////////// XBROWSE RESUMEN ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Redefine get oGetSeek2 Var cSeek2 Id 4061 of oFolder:aDialogs[ 1 ] on change (cSeek2:=oGetSeek2:GetText()), Fnct_Seek(@aResumen),
Fnct_PonTotales() ) WHEN len(aResumen)>0
oGetSeek2:SetFont(_oFontGets)
oGetSeek2:SetColorFocus( CLR_YELLOW )
Redefine xBrowse oBrwVer Id 4060 DATASOURCE aResumen AUTOCOLS ;
COLUMNS cRif, cNombre, nVencido, nNoVencido, nVenceHoy, nTotalGeneral, nCodigoCliente ;
HEADERS "R.I.F", "Nombre", "Vencido", "No Vencido", "Vence Hoy", "Total","" ;
FIELDSIZES 90, 250, 100, 100, 100, 100, 30 ;
PICTURE nil, nil, '@E 9,999,999,999.99', '@E 9,999,999,999.99' '@E
'9,999,999,999.99', '@E 9,999,999,999.99', nil ;
JUSTIFY AL_LEFT, AL_LEFT, AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_RIGHT ;
CELL LINES ;
FASTEDIT ;
FOOTERS of oFolder:aDialogs[ 1 ] //on dblclick (cVarClien:=alltrim(oBrwVer:aCols[cNombre]:Value))
oBrwVer:aArrayData:=aResumen
WITH object oBrwVer
nCiclo:= 1
do while nCiclo<=7
oBrwVer:aCols[nCiclo] :nHeadStrAlign := AL_CENTER
oBrwVer:aCols[nCiclo] :oHeaderFont := oFHeadBrw
oBrwVer:aCols[nCiclo] :lAllowSizing :=.t.
nCiclo++
enddo
oBrwVer:aCols[7]:Hide()
oBrwVer:lAllowColSwapping :=.F.
oBrwVer:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrwVer:l2007 := .f.
oBrwVer:lFooter := .t.
oBrwVer:lRecordSelector:= .f.
oBrwVer:bClrHeader := { || { CLR_WHITE, CLR_BLUE, CLR_HGRAY } }
:bClrFooter := { || { CLR_WHITE, CLR_BLUE, CLR_HGRAY } }
:aCols[1] :bFooter := { || 'Total -> '+transform(len(aResumen),"@E 99,999") }
:aCols[3]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[4]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[5]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:aCols[6]:nFooterType := AGGR_SUM
:bchange := { || Fnct_PonTotales(@aResumen) }
:MakeTotals()
oBrwVer:MakeTotals()
END
oBrwVer:gotop()
oBrwVer:Refresh()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Redefine get oGetSeek Var cSeek Id 11 of oFolder:aDialogs[ 2 ] on change (cSeek:=oGetSeek:GetText(), Fnct_SeekArray(), Fnct_PonTotales() ) WHEN len(aFacturas)>0
oGetSeek:SetFont(_oFontGets)
oGetSeek:SetColorFocus( CLR_YELLOW )
Redefine Radio oRSeek Var nSeek Id 4002,4003 of oFolder:aDialogs[ 2 ] on change (oGetSeek:SetFocus()) WHEN len(aFacturas)>0
Redefine xBrowse oBrwFac Id 4007 DATASOURCE aFacturas AUTOCOLS ;
AUTOSORT;
COLUMNS cRifCliente, cCliente , cNumeroDoc, dEmision, dVcto, nDiasVcto, FacMonto, ;
nFacPagos , nFacSaldo, cConcepto, nCodigoCli, nFacCodigoCli, nEmail, nLimite, cTolera ;
HEADERS _cIdEmpresa, "Cliente", "N# Doc. ","Emisión", "Vencto.", "Dias Vcdo.", "Monto "+_cSignoMoneda ,;
"Pagos", "Saldo", "Concepto", "", "", "", "", "" ;
FIELDSIZES 90, 250, 70, 75, 90, 85, 100, 100, 100, 160,20,20,50, 100, 0 ;
PICTURE nil, nil, nil, nil, nil, nil, '@E 9,999,999,999.99', '@E 9,999,999,999.99','@E 9,999,999,999.99', ;
nil, nil,nil, nil, '@E 9,999,999,999.99', nil ;
JUSTIFY AL_LEFT, AL_LEFT, AL_CENTER, AL_CENTER, AL_CENTER, AL_CENTER,;
AL_RIGHT, AL_RIGHT, AL_RIGHT, AL_LEFT, AL_LEFT, AL_CENTER, AL_LEFT, AL_LEFT, AL_CENTER ;
CELL LINES FASTEDIT FOOTERS of oFolder:aDialogs[ 2 ] on Dblclick (Fnct_FiltrarCliente(alltrim(oBrwFac:aCols[cCliente]:Value)))//(Fnct_FiltrarCliente(alltrim(oBrwFac:aCols[cCliente]:Value)))
oBrwFac:aArrayData:=aFacturas
WITH object oBrwFac
nCiclo:= 1
do while nCiclo<=nObrwColsToShow
oBrwFac:aCols[nCiclo] :nHeadStrAlign := AL_CENTER
oBrwFac:aCols[nCiclo] :oHeaderFont := oFHeadBrw
oBrwFac:aCols[nCiclo] :lAllowSizing :=.T.
nCiclo++
enddo
oBrwFac:aCols[nCodigoCli] :Hide()
oBrwFac:aCols[nFacCodigoCli]:Hide()
oBrwFac:aCols[11]:Hide()
oBrwFac:aCols[12]:Hide()
oBrwFac:aCols[13]:Hide()
oBrwFac:aCols[14]:Hide()
oBrwFac:aCols[15]:Hide()
oBrwFac:lAllowColSwapping :=.F.
oBrwFac:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrwFac:l2007 := .f.
oBrwFac:lFooter := .t.
oBrwFac:lRecordSelector:= .f.
oBrwFac:bOnSort:={|b,oCol| oBrwFac:Gotop() }
*:aCols[cConcepto]:bLDClickData:= {|| Fnct_VerConcepto()} //oBrwCiudades:SetFilter( (oBrwCiudades:aCols[2]:value) =
(oBrwEstados:aCols[1]:Value) )
*:aCols[nFacPagos]:bLDClickData:= {|| Fnct_VerPagos()}
oBrwFac:bClrHeader := { || iif(lBW, ( { CLR_WHITE, CLR_GRAY, CLR_GRAY }), ({ CLR_WHITE, CLR_BLUE, CLR_HGRAY })) }
:bClrFooter := { || iif(lBW, ( { CLR_WHITE, CLR_GRAY, CLR_GRAY }), ({ CLR_WHITE, CLR_BLUE, CLR_HGRAY })) }
AEval( oBrwFac:aCols, { |oCol| ;
oCol:bClrSelFocus := { || { CLR_BLACK, RGB( 255, 224, 126) } }, ;
oCol:bPaintText := { |oCol, hDC, cData, aRect, aColors| ;
PaintCol( oCol, hDC, cData, aRect, aColors ) } } )
:nStretchCol := STRETCHCOL_WIDEST
:aCols[nFacMonto]:nFooterType := AGGR_SUM // TOTAL
:aCols[nFacPagos]:nFooterType := AGGR_SUM //TOTAL
:aCols[nFacSaldo]:nFooterType := AGGR_SUM //TOTAL
:bRClicked :={ || Fnct_EditarFactura() }
:bchange := { || Fnct_PonTotales() }
:aCols[2]:cFooter := { || " Total Documentos -> "+transform( len(aFacturas), "@E 9,999,999.99") }
:MakeTotals()
oBrwFac:MakeTotals()
END
WITH OBJECT oBrwFac:aCols[nDiasVcto]
oBrwFac:aCols[nDiasVcto]:bClrStd := ChangeColor()
END
WITH OBJECT oBrwFac:aCols[nFacPagos]
oCol:=oBrwFac:aCols[nFacPagos]
oBrwFac:aCols[nFacPagos]:nEditType := EDIT_BUTTON
oBrwFac:aCols[nFacPagos]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerPagos( nRow, nCol, oCol, nKey, oBrwFac:aCols[nFacMonto] :Value ,;
oBrwFac:aCols[dEmision] :Value ),oBrwFac:Refresh() }
END
WITH OBJECT oBrwFac:aCols[cConcepto]
oCol:=oBrwFac:aCols[cConcepto]
oBrwFac:aCols[cConcepto]:nEditType := EDIT_BUTTON
oBrwFac:aCols[cConcepto]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerConcepto( nRow, nCol, oCol, nKey ) }
END
WITH OBJECT oBrwFac:aCols[dVcto]
oCol:=oBrwFac:aCols[dVcto]
oBrwFac:aCols[dVcto]:nEditType := EDIT_BUTTON
oBrwFac:aCols[dVcto]:bEditBlock := { |nRow,nCol,oCol,nKey| Fnct_VerDiasCredito( nRow, nCol, oCol, nKey ) }
END
oBrwFac:gotop()
oBrwFac:Refresh()
Code: Select all | Expand
// Despues de:
aResumen:=oQry:FillArray()
XBrowse( aResumen )
y dime si el xbrowse se muestra correctamente]]>Code: Select all | Expand
// Despues de:
aResumen:=oQry:FillArray()
XBrowse( aResumen )
y dime si el xbrowse se muestra correctamente]]>Code: Select all | Expand
c:\GCC1501
12/05/2025 10:36 <DIR> .
12/05/2025 10:36 <DIR> ..
09/05/2025 17:49 <DIR> bin
09/05/2025 17:27 <DIR> i686-w64-mingw32 // Elimina Enrico?
09/05/2025 17:27 <DIR> include
09/05/2025 17:27 <DIR> lib
09/05/2025 17:25 <DIR> libexec // Elimina?
09/05/2025 17:26 <DIR> share // Elimina?
Code: Select all | Expand
c:\GCC1501
12/05/2025 10:36 <DIR> .
12/05/2025 10:36 <DIR> ..
09/05/2025 17:49 <DIR> bin
09/05/2025 17:27 <DIR> i686-w64-mingw32 // Elimina Enrico?
09/05/2025 17:27 <DIR> include
09/05/2025 17:27 <DIR> lib
09/05/2025 17:25 <DIR> libexec // Elimina?
09/05/2025 17:26 <DIR> share // Elimina?
Code: Select all | Expand
cannot find -lfivehg
cannot find -lfivehgc
cannot find -l.\..\lib\libmysql32
Code: Select all | Expand
cannot find -lfivehg
cannot find -lfivehgc
cannot find -l.\..\lib\libmysql32
Code: Select all | Expand
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour... and GCC - May. 2019 Harbour development power ³Ü
ECHO ³ (c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
if "%fwh%" == "" set fwh=.\..
set hdir=c:\HBGCC151
set hdirc=%hdir%\bin\win\mingw\harbour.exe
set hlibs=%hdir%\lib\win\mingw
set mingw=c:\gcc1501
set path=%mingw%\bin
%hdirc% %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2>> comp2.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type comp2.log
%mingw%\bin\gcc -c %1.c -o%1.o -I%hdir%\include -I%mingw%\include -Wall > comp.log 2>> comp2.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DDIALOG=DIALOGEX -i%1.rc -o_%1.o
IF ERRORLEVEL 1 GOTO RESOURCESERROR
if not exist %1.rc %mingw%\bin\gcc -o%1.exe %1.o -Wall -s -mwindows -L%mingw%\lib -L%hlibs% -L%fwh%\lib -Wl,--enable-stdcall-fixup -Wl,--start-group -lfivehg -lfivehgc -lgtgui -luser32 -lshell32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -loledlg -lmfcuia32 -lmsimg32 -lwin32k -lstdc++ -lversion -luuid -lwinmm -lvfw32 -lwsock32 -lshell32 -lmpr -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbdebug -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmzip -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb -lhbziparc -lminizip -lhbmzip -lhbziparc -lpng -Wl,--end-group > b32.gc
if exist %1.rc %mingw%\bin\gcc -o%1.exe %1.o _%1.o -Wall -s -mwindows -L%mingw%\lib -L%hlibs% -L%fwh%\lib -Wl,--enable-stdcall-fixup -Wl,--start-group -lfivehg -lfivehgc -lgtgui -luser32 -lshell32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -lmsimg32 -lwin32k -loledlg -lstdc++ -lmfcuia32 -lversion -luuid -lwinmm -lvfw32 -lwsock32 -lshell32 -lmpr -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbdebug -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmzip -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb -lhbziparc -lminizip -lhbmzip -lhbziparc -lpng -Wl,--end-group > b32.gc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
rem delete temporary files
@del %1.c
@if exist %1.rc del _%1.o
GOTO EXIT
ECHO
:RESOURCESERROR
ECHO * Resources errors *
GOTO EXIT
:COMPILEERROR
@type comp.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Link errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Buildg [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
Regards, saludos.]]>Code: Select all | Expand
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour... and GCC - May. 2019 Harbour development power ³Ü
ECHO ³ (c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
if "%fwh%" == "" set fwh=.\..
set hdir=c:\HBGCC151
set hdirc=%hdir%\bin\win\mingw\harbour.exe
set hlibs=%hdir%\lib\win\mingw
set mingw=c:\gcc1501
set path=%mingw%\bin
%hdirc% %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2>> comp2.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type comp2.log
%mingw%\bin\gcc -c %1.c -o%1.o -I%hdir%\include -I%mingw%\include -Wall > comp.log 2>> comp2.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DDIALOG=DIALOGEX -i%1.rc -o_%1.o
IF ERRORLEVEL 1 GOTO RESOURCESERROR
if not exist %1.rc %mingw%\bin\gcc -o%1.exe %1.o -Wall -s -mwindows -L%mingw%\lib -L%hlibs% -L%fwh%\lib -Wl,--enable-stdcall-fixup -Wl,--start-group -lfivehg -lfivehgc -lgtgui -luser32 -lshell32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -loledlg -lmfcuia32 -lmsimg32 -lwin32k -lstdc++ -lversion -luuid -lwinmm -lvfw32 -lwsock32 -lshell32 -lmpr -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbdebug -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmzip -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb -lhbziparc -lminizip -lhbmzip -lhbziparc -lpng -Wl,--end-group > b32.gc
if exist %1.rc %mingw%\bin\gcc -o%1.exe %1.o _%1.o -Wall -s -mwindows -L%mingw%\lib -L%hlibs% -L%fwh%\lib -Wl,--enable-stdcall-fixup -Wl,--start-group -lfivehg -lfivehgc -lgtgui -luser32 -lshell32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -lmsimg32 -lwin32k -loledlg -lstdc++ -lmfcuia32 -lversion -luuid -lwinmm -lvfw32 -lwsock32 -lshell32 -lmpr -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbdebug -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmzip -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb -lhbziparc -lminizip -lhbmzip -lhbziparc -lpng -Wl,--end-group > b32.gc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
rem delete temporary files
@del %1.c
@if exist %1.rc del _%1.o
GOTO EXIT
ECHO
:RESOURCESERROR
ECHO * Resources errors *
GOTO EXIT
:COMPILEERROR
@type comp.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Link errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Buildg [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
Regards, saludos.]]>Esto no es importante Enrico, yo uso PECOMPACT.exe para comprimir el ejecutable.Enrico Maria Giordano wrote: Tue May 13, 2025 4:20 pm Never mind, I manage to fix the batch. Ok, the new MGW seems to work fast as MSC with small FWH samples. But it is still very slow building Harbour and xHarbour, sorry. And the EXE generated with MGW is still bigger (6 MB vs. 4 MB).
Esto no es importante Enrico, yo uso PECOMPACT.exe para comprimir el ejecutable.Enrico Maria Giordano wrote: Tue May 13, 2025 4:20 pm Never mind, I manage to fix the batch. Ok, the new MGW seems to work fast as MSC with small FWH samples. But it is still very slow building Harbour and xHarbour, sorry. And the EXE generated with MGW is still bigger (6 MB vs. 4 MB).
The linker already takes care of that. You cannot eliminate any of the used libraries. Anyway, having MinGW as an alternative is certainly a good thing.]]>karinha wrote: Tue May 13, 2025 6:05 pmEnrico, it may be that the .EXE is larger, because of the GCC LIBS, as you gain experience, you will eliminate the LIBS that do not need to be used, do you understand?
The linker already takes care of that. You cannot eliminate any of the used libraries. Anyway, having MinGW as an alternative is certainly a good thing.]]>karinha wrote: Tue May 13, 2025 6:05 pmEnrico, it may be that the .EXE is larger, because of the GCC LIBS, as you gain experience, you will eliminate the LIBS that do not need to be used, do you understand?
Code: Select all | Expand
incpaths=include
libpaths=lib
{mingw}libs=fwchanged
{mingw}libs=fivehg
{mingw}libs=fivehgc
{mingw}libs=user32 winspool kernel32 comctl32 comdlg32 gdi32 gdiplus ole32
{mingw}libs=oleaut32 psapi oledlg mfcuia32 msimg32 win32k stdc++ version
{mingw}libs=uuid winmm vfw32 wsock32
{mingw}libs=uxtheme
libs=hbwin.hbc
libs=xhb.hbc
libs=hbct.hbc
libs=hbmzip.hbc
libs=hbziparc.hbc
fwchanged is my library to modify fivewinCode: Select all | Expand
incpaths=include
libpaths=lib
{mingw}libs=fwchanged
{mingw}libs=fivehg
{mingw}libs=fivehgc
{mingw}libs=user32 winspool kernel32 comctl32 comdlg32 gdi32 gdiplus ole32
{mingw}libs=oleaut32 psapi oledlg mfcuia32 msimg32 win32k stdc++ version
{mingw}libs=uuid winmm vfw32 wsock32
{mingw}libs=uxtheme
libs=hbwin.hbc
libs=xhb.hbc
libs=hbct.hbc
libs=hbmzip.hbc
libs=hbziparc.hbc
fwchanged is my library to modify fivewinQueremos recordaros que tenemos una copia de estos foros funcionando en:To check if any infected content is present in the cPanel account, I have initiated a courtesy malware scan. The scan has detected 1 infected file
/home1/fivetec1/public_html/500.php: SL-PHP-EVAL_REQUEST-axog.UNOFFICIAL FOUND
----------- SCAN SUMMARY -----------
Known viruses: 2299997
Engine version: devel-clamav-0.99-beta1-632-g8a582c7
Scanned directories: 2286
Scanned files: 38847
Infected files: 1
Data scanned: 379.62 MB
Data read: 6107.80 MB (ratio 0.06:1)
Time: 1564.957 sec (26 m 4 s)
It is advisable to clean this infected file.
Queremos recordaros que tenemos una copia de estos foros funcionando en:To check if any infected content is present in the cPanel account, I have initiated a courtesy malware scan. The scan has detected 1 infected file
/home1/fivetec1/public_html/500.php: SL-PHP-EVAL_REQUEST-axog.UNOFFICIAL FOUND
----------- SCAN SUMMARY -----------
Known viruses: 2299997
Engine version: devel-clamav-0.99-beta1-632-g8a582c7
Scanned directories: 2286
Scanned files: 38847
Infected files: 1
Data scanned: 379.62 MB
Data read: 6107.80 MB (ratio 0.06:1)
Time: 1564.957 sec (26 m 4 s)
It is advisable to clean this infected file.
Code: Select all | Expand
cQuery := "CALL obtener_saldos_clientes();"
TRY
_oSqlConex:execute( cQuery )
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
Code: Select all | Expand
cQuery := "CALL obtener_saldos_clientes();"
TRY
_oSqlConex:execute( cQuery )
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
Code: Select all | Expand
cQuery := "CALL obtener_saldos_clientes('"+_cPrefijo+"');"
TRY
oQry := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aResumen :={}
aResumenBack:= {}
aResumen:=oQry:FillArray()
aResumenBack:=aClone(aResumen)
Code: Select all | Expand
cQuery := "CALL obtener_saldos_clientes('"+_cPrefijo+"');"
TRY
oQry := _oSqlConex:Query( cQuery )
_oSqlConex:NextResult()
CATCH
Fnct_MsgErrorBD("NoMySql" , .f. , "No hay conexión a La Base de Datos" , "Sin Acceso a La Red","Error en servicio de Datos",)
_Close()
return .f.
END TRY
aResumen :={}
aResumenBack:= {}
aResumen:=oQry:FillArray()
aResumenBack:=aClone(aResumen)
Si y no.paquitohm wrote: Sun Apr 20, 2025 3:36 pm De alguna manera la agencia quiere que creemos un registro de la factura.
Si, por que no? Pero es una opción no una obligación.paquitohm wrote: Sun Apr 20, 2025 3:36 pm Asi pues entiendo que pudiera ser conveniente que toda la informacion, incluso aunque pareciera redundante, estuviera unificada en un mismo registro en una misma tabla.
En absoluto, creo que es lo correcto.paquitohm wrote: Sun Apr 20, 2025 3:36 pm Por otra parte. Te importa si sigo conversando contigo de estos temas por privado-email ? Tengo algunas cosas que comentarte y queria que fuera por privado. Si no lo ves conveniente, sin problema. En mi caso por este medio no voy a seguir mucho más
Si y no.paquitohm wrote: Sun Apr 20, 2025 3:36 pm De alguna manera la agencia quiere que creemos un registro de la factura.
Si, por que no? Pero es una opción no una obligación.paquitohm wrote: Sun Apr 20, 2025 3:36 pm Asi pues entiendo que pudiera ser conveniente que toda la informacion, incluso aunque pareciera redundante, estuviera unificada en un mismo registro en una misma tabla.
En absoluto, creo que es lo correcto.paquitohm wrote: Sun Apr 20, 2025 3:36 pm Por otra parte. Te importa si sigo conversando contigo de estos temas por privado-email ? Tengo algunas cosas que comentarte y queria que fuera por privado. Si no lo ves conveniente, sin problema. En mi caso por este medio no voy a seguir mucho más
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 hbmcp.hbp -comp=msvc64
@endlocal
Code: Select all | Expand
hbmcp.prg
-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt
-luxtheme
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
-ldflag+=/NODEFAULTLIB:libucrt
Code: Select all | Expand
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
hb_memoWrit( "c:\temp\stdin.txt", cInput )
cResponse := ProcessMessage( cInput )
IF !Empty( cResponse )
StdOut( cResponse )
ENDIF
END
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hJson := hb_jsonDecode( cInput )
IF HB_ISHASH( hJson ) .AND. "method" $ hJson .AND. "id" $ hJson
cMethod := hJson[ "method" ]
cId := ExtractId( cInput )
// Manejar el método "initialize"
IF cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
// Manejar el método "tools/list"
ELSEIF cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
// Manejar el método "tools/call"
ELSEIF cMethod == "tools/call"
hParams := hJson[ "params" ]
IF HB_ISHASH( hParams ) .AND. "name" $ hParams .AND. "arguments" $ hParams
cToolName := hParams[ "name" ]
IF cToolName == "get_time" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + hb_DateTime() + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( Version(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( hb_Compiler(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: parámetros inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
ELSE
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32601,' + ;
'"message":"Method not found"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// JSON inválido o sin método/ID
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":null,' + ;
'"error":{' + ;
'"code":-32700,' + ;
'"message":"Parse error"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
RETURN cResponse
// Función para extraer el ID parseando el JSON con hb_jsonDecode()
STATIC FUNCTION ExtractId( cInput )
LOCAL hJson, cId := '"1"' // Valor por defecto si falla el parseo
LOCAL xId
// Decodificar el JSON en un hash
hJson := hb_jsonDecode( cInput )
IF HB_ISHASH( hJson ) .AND. "id" $ hJson
xId := hJson[ "id" ]
IF HB_ISSTRING( xId )
// Si el id es string, incluir comillas
cId := '"' + xId + '"'
ELSEIF HB_ISNUMERIC( xId )
// Si el id es numérico, convertir a string sin comillas
cId := hb_ntos( xId )
ELSEIF xId == NIL
// Si el id es null, retornar "null"
cId := "null"
ENDIF
ENDIF
RETURN cId
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 hbmcp.hbp -comp=msvc64
@endlocal
Code: Select all | Expand
hbmcp.prg
-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt
-luxtheme
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
-ldflag+=/NODEFAULTLIB:libucrt
Code: Select all | Expand
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
hb_memoWrit( "c:\temp\stdin.txt", cInput )
cResponse := ProcessMessage( cInput )
IF !Empty( cResponse )
StdOut( cResponse )
ENDIF
END
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hJson := hb_jsonDecode( cInput )
IF HB_ISHASH( hJson ) .AND. "method" $ hJson .AND. "id" $ hJson
cMethod := hJson[ "method" ]
cId := ExtractId( cInput )
// Manejar el método "initialize"
IF cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
// Manejar el método "tools/list"
ELSEIF cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
// Manejar el método "tools/call"
ELSEIF cMethod == "tools/call"
hParams := hJson[ "params" ]
IF HB_ISHASH( hParams ) .AND. "name" $ hParams .AND. "arguments" $ hParams
cToolName := hParams[ "name" ]
IF cToolName == "get_time" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + hb_DateTime() + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( Version(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( hb_Compiler(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: parámetros inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
ELSE
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32601,' + ;
'"message":"Method not found"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// JSON inválido o sin método/ID
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":null,' + ;
'"error":{' + ;
'"code":-32700,' + ;
'"message":"Parse error"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
RETURN cResponse
// Función para extraer el ID parseando el JSON con hb_jsonDecode()
STATIC FUNCTION ExtractId( cInput )
LOCAL hJson, cId := '"1"' // Valor por defecto si falla el parseo
LOCAL xId
// Decodificar el JSON en un hash
hJson := hb_jsonDecode( cInput )
IF HB_ISHASH( hJson ) .AND. "id" $ hJson
xId := hJson[ "id" ]
IF HB_ISSTRING( xId )
// Si el id es string, incluir comillas
cId := '"' + xId + '"'
ELSEIF HB_ISNUMERIC( xId )
// Si el id es numérico, convertir a string sin comillas
cId := hb_ntos( xId )
ELSEIF xId == NIL
// Si el id es null, retornar "null"
cId := "null"
ENDIF
ENDIF
RETURN cId
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
"mcp": {
"servers": {
"Harbour": {
"type": "stdio",
"command": "c:\\temp\\hbmcp.exe",
"args": []
}
}
}
Code: Select all | Expand
"mcp": {
"servers": {
"Harbour": {
"type": "stdio",
"command": "c:\\temp\\hbmcp.exe",
"args": []
}
}
}
Code: Select all | Expand
#define LogFile( cKey, cValue ) hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + cKey + cValue )
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "in: " + cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "out: " + cResponse )
StdOut( cResponse )
ENDIF
END
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId := "1", cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
LogFile( "method: ", cMethod )
// if hb_HHasKey( hJson, "id" )
// cId = hJson[ "id" ]
// else
// cId = "null" // Si no hay id, asignar null
// endif
LogFile( "id: ", cId )
do case
case cMethod == "initialize"
LogFile( "initialize: ", cMethod )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
hParams := hJson[ "params" ]
IF HB_ISHASH( hParams ) .AND. "name" $ hParams .AND. "arguments" $ hParams
cToolName := hParams[ "name" ]
IF cToolName == "get_time" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + hb_DateTime() + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( Version(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( hb_Compiler(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: parámetros inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32601,' + ;
'"message":"Method not found"' + ;
'}' + ;
'}' + hb_eol()
endcase
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "response: " + cResponse )
RETURN cResponse
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#define LogFile( cKey, cValue ) hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + cKey + cValue )
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "in: " + cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "out: " + cResponse )
StdOut( cResponse )
ENDIF
END
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId := "1", cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
LogFile( "method: ", cMethod )
// if hb_HHasKey( hJson, "id" )
// cId = hJson[ "id" ]
// else
// cId = "null" // Si no hay id, asignar null
// endif
LogFile( "id: ", cId )
do case
case cMethod == "initialize"
LogFile( "initialize: ", cMethod )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
hParams := hJson[ "params" ]
IF HB_ISHASH( hParams ) .AND. "name" $ hParams .AND. "arguments" $ hParams
cToolName := hParams[ "name" ]
IF cToolName == "get_time" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + hb_DateTime() + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( Version(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler" .AND. HB_ISHASH( hParams[ "arguments" ] ) .AND. Empty( hParams[ "arguments" ] )
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":"' + StrTran( hb_Compiler(), '"', '\"' ) + '"' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: parámetros inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32601,' + ;
'"message":"Method not found"' + ;
'}' + ;
'}' + hb_eol()
endcase
hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + "response: " + cResponse )
RETURN cResponse
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#define LogFile( cKey, cValue ) hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + cKey + cValue )
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
LogFile( "method: ", cMethod )
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
LogFile( "initialize: ", cMethod )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#define LogFile( cKey, cValue ) hb_memoWrit( "c:\temp\hbmcp.log", hb_memoRead( "c:\temp\hbmcp.log" ) + hb_eol() + cKey + cValue )
PROCEDURE Main()
LOCAL cInput, cResponse
// Bucle para leer continuamente desde stdin
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
// Procesar el mensaje
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
LogFile( "method: ", cMethod )
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
LogFile( "initialize: ", cMethod )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"result":{' + ;
'"protocolVersion":"2025-03-26",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"prompts":{}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"prompts":{}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment",' + ;
'"schema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"additionalProperties":false,' + ;
'"returns":{' + ;
'"type":"string"' + ;
'}' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format. Useful for logging or timestamping operations within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment. Use this to verify compatibility or for debugging purposes.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment. Helpful for diagnosing build-related issues.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in YYYY-MM-DD HH:MM:SS format. Useful for logging or timestamping operations within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment. Use this to verify compatibility or for debugging purposes.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment. Helpful for diagnosing build-related issues.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "YYYY-MM-DD HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
LOCAL cCode, xResult, cResult
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in HH:MM:SS format. Useful for logging or timestamping operations within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment. Use this to verify compatibility or for debugging purposes.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment. Helpful for diagnosing build-related issues.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ; // Nueva herramienta hb_macro
'"name":"hb_macro",' + ;
'"description":"Executes a Harbour macro expression provided as a string and returns the result as a string. Useful for dynamic code execution within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{"code":{"type":"string"}},' + ;
'"required":["code"],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_macro"
// Nueva herramienta: ejecutar macro y devolver resultado como cadena
// Verificar que el parámetro "code" existe y es una cadena
IF hb_HHasKey( hJson[ "params" ], "arguments" ) .AND. ;
hb_HHasKey( hJson[ "params" ][ "arguments" ], "code" ) .AND. ;
ValType( hJson[ "params" ][ "arguments" ][ "code" ] ) == "C"
cCode := hJson[ "params" ][ "arguments" ][ "code" ]
// Ejecutar la macro y convertir el resultado a cadena
BEGIN SEQUENCE
xResult := &( cCode )
cResult := hb_ValToExp( xResult )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + cResult + '"}]}' + ;
'}' + hb_eol()
cResponse := StrTran( cResponse, '""', '"' )
RECOVER
// En caso de error en la macro, devolver un error JSON-RPC
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32602,"message":"Invalid macro expression"}' + ;
'}' + hb_eol()
END SEQUENCE
ELSE
// Error: parámetro "code" no proporcionado o inválido
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32602,"message":"Missing or invalid code parameter"}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP
Code: Select all | Expand
#include "fileio.ch"
PROCEDURE Main()
LOCAL cInput, cResponse
ErrorBlock( { | oError| LogFile( "error: ", oError:Description ) } )
WHILE .T.
cInput := StdIn()
IF Empty( cInput )
EXIT // Salir si no hay entrada (EOF)
ENDIF
LogFile( "in: ", cInput )
cResponse := ProcessMessage( cInput )
IF ! Empty( cResponse )
LogFile( "out: ", cResponse )
StdOut( cResponse )
ENDIF
END
LogFile( "exit: ", "termina" )
RETURN
// Función para procesar mensajes JSON-RPC
FUNCTION ProcessMessage( cInput )
LOCAL cResponse := ""
LOCAL hJson, cId, cMethod, hParams, cToolName
LOCAL cCode, xResult, cResult
// Decodificar el JSON para obtener el método y el ID
hb_jsonDecode( cInput, @hJson )
cMethod = hJson[ "method" ]
if hb_HHasKey( hJson, "id" )
cId = AllTrim( Str( hJson[ "id" ] ) )
endif
do case
case cMethod == "initialize"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"protocolVersion":"2024-11-05",' + ;
'"capabilities":{' + ;
'"tools":{},' + ;
'"resources":{},' + ;
'"prompts":{}' + ;
'},' + ;
'"serverInfo":{"name":"Harbour-xbase","version":"0.0.2"}' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "notifications/initialized"
cResponse := hb_eol()
case cMethod == "resources/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "prompts/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32601,"message":"Method not found"}' + ;
'}' + hb_eol()
case cMethod == "tools/list"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{' + ;
'"tools": [' + ;
'{' + ;
'"name":"get_time",' + ;
'"description":"Returns the current system time in HH:MM:SS format. Useful for logging or timestamping operations within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_version",' + ;
'"description":"Returns the version of the Harbour runtime environment. Use this to verify compatibility or for debugging purposes.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ;
'"name":"hb_compiler",' + ;
'"description":"Returns the name of the compiler used to build the Harbour runtime environment. Helpful for diagnosing build-related issues.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{},' + ;
'"required":[],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'},' + ;
'{' + ; // Nueva herramienta hb_macro
'"name":"hb_macro",' + ;
'"description":"Executes a Harbour macro expression provided as a string and returns the result as a string. Useful for dynamic code execution within the Harbour runtime environment.",' + ;
'"inputSchema":{' + ;
'"type":"object",' + ;
'"properties":{"code":{"type":"string"}},' + ;
'"required":["code"],' + ;
'"additionalProperties":false,' + ;
'"$schema":"http://json-schema.org/draft-07/schema#"' + ;
'}' + ;
'}' + ;
']' + ;
'}' + ;
'}' + hb_eol()
case cMethod == "tools/call"
cToolName = hJson[ "params" ][ "name" ]
IF cToolName == "get_time"
// Obtener la hora actual en formato "HH:MM:SS"
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Time() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_version"
// Obtener la versión de Harbour
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + Version() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_compiler"
// Obtener el nombre del compilador
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + hb_Compiler() + '"}]}' + ;
'}' + hb_eol()
ELSEIF cToolName == "hb_macro"
// Nueva herramienta: ejecutar macro y devolver resultado como cadena
// Verificar que el parámetro "code" existe y es una cadena
IF hb_HHasKey( hJson[ "params" ], "arguments" ) .AND. ;
hb_HHasKey( hJson[ "params" ][ "arguments" ], "code" ) .AND. ;
ValType( hJson[ "params" ][ "arguments" ][ "code" ] ) == "C"
cCode := hJson[ "params" ][ "arguments" ][ "code" ]
// Ejecutar la macro y convertir el resultado a cadena
BEGIN SEQUENCE
xResult := &( cCode )
cResult := hb_ValToExp( xResult )
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"result":{"content":[{"type":"text","text":"' + cResult + '"}]}' + ;
'}' + hb_eol()
cResponse := StrTran( cResponse, '""', '"' )
RECOVER
// En caso de error en la macro, devolver un error JSON-RPC
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32602,"message":"Invalid macro expression"}' + ;
'}' + hb_eol()
END SEQUENCE
ELSE
// Error: parámetro "code" no proporcionado o inválido
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{"code":-32602,"message":"Missing or invalid code parameter"}' + ;
'}' + hb_eol()
ENDIF
ELSE
// Error: herramienta no encontrada o argumentos inválidos
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32602,' + ;
'"message":"Invalid params"' + ;
'}' + ;
'}' + hb_eol()
ENDIF
// Manejar métodos no soportados
otherwise
cResponse := ;
'{' + ;
'"jsonrpc":"2.0",' + ;
'"id":' + cId + ',' + ;
'"error":{' + ;
'"code":-32604,' + ;
'"message":"Method not found"' + cMethod +;
' }' + ;
'}' + hb_eol()
endcase
RETURN cResponse
FUNCTION LogFile( cKey, cValue )
LOCAL nHandle, lSuccess
// Considerar hacer la ruta configurable
if ! File( "c:\temp\hbmcp.log" )
// Crear el archivo si no existe
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE + FO_CREAT )
else
// Abrir el archivo para añadir contenido
nHandle := fopen( "c:\temp\hbmcp.log", FO_WRITE )
endif
IF nHandle > 0
FSeek( nHandle, 0, FS_END ) // Mover el puntero al final del archivo
lSuccess = fWrite( nHandle, cKey + cValue + hb_eol() )
fclose( nHandle )
RETURN lSuccess // Opcional: retornar éxito/fallo
ENDIF
RETURN .F.
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( STDIN )
{
char buffer[ 1024 ];
if( fgets( buffer, sizeof( buffer ), stdin ) != NULL )
{
// Eliminar salto de línea final, si existe
size_t len = strlen( buffer );
if( len > 0 && buffer[ len - 1 ] == '\n' )
buffer[ len - 1 ] = '\0';
hb_retc( buffer );
}
else
{
hb_retc( "" ); // Retornar cadena vacía en caso de EOF
}
}
HB_FUNC( STDOUT )
{
if( HB_ISCHAR( 1 ) )
{
fputs( hb_parc( 1 ), stdout );
fflush( stdout ); // Forzar la escritura inmediata
}
}
#pragma ENDDUMP