Page 2 of 5
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 15, 2025 3:26 pm
by srvet_claudio
Serge,
On Windows, the cross-platform C/C++ base library (Webview) invokes Windows' Webview2. You'll need to look in the Webview2 documentation to see if the option you need is available. HB_webview is simply a wrapper around the base library's and Harbour, meaning it merely acts as a bridge between Harbour and the base C/C++ library.
https://learn.microsoft.com/microsoft-e ... orm=MA13LH
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 15, 2025 5:14 pm
by serge_girard
Thanks, I' will take a look!
Serge
Re: HB_WebView (a cross-platform Webview library)
Posted: Thu Mar 20, 2025 2:42 am
by srvet_claudio
I have added to the first post where the source files are located, a .pdf file with the documentation of HB_WebView:
https://www.hmgforum.com/viewtopic.php?t=7659
Re: HB_WebView (a cross-platform Webview library)
Posted: Thu Mar 20, 2025 7:35 am
by serge_girard
Thanks!
Re: HB_WebView (a cross-platform Webview library)
Posted: Thu Mar 20, 2025 6:09 pm
by jorge_riv
Hola, en Harbour MiniGUI Extended Edition 24.12 (Standard), se puede compilar?? en la version de hmg 3.6 anda perfecto, como seria en minigui para compilar?
Re: HB_WebView (a cross-platform Webview library)
Posted: Thu Mar 20, 2025 6:28 pm
by srvet_claudio
Hola Jorge,
No he probado en MG Ex, pero el código fuente ya se lo pasé a Grigory, así que seguramente pronto estará disponible en MG Ex.
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 22, 2025 12:11 am
by srvet_claudio
Hi all,
I have added to the first post where the source files are located, a new demo4.prg and the pdf file documentation.
I've added new comments inside the demos for better code understanding.
The added demo4.prg is very interesting; it allows you to inject PRG code written entirely in Harbour from JavaScript.
https://www.hmgforum.com/viewtopic.php?t=7659
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 22, 2025 9:03 am
by serge_girard
Thank you, very amazing!
Do you think it would be possible to have MySQL integrated?
Serge
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 22, 2025 10:16 am
by srvet_claudio
Hi Serge,
Yes, of course. I don't have much experience with MySQL. Please upload a small demo complete with all the necessary libraries, and I'll try to adapt it to HB_Webwiew.
Re: HB_WebView (a cross-platform Webview library)
Posted: Sat Mar 22, 2025 10:41 am
by serge_girard
Claudio,
Here is a small example (not tested or compiled !) but it gives an idea!
Many thanks, Serge
Code: Select all
#include "hmg.ch"
FUNCTION MAIN()
/***************/
PUBLIC dbo
PUBLIC dbname
PUBLIC host
PUBLIC user
PUBLIC password
PUBLIC cVersion
PUBLIC aRESULT := {}
IF SQL_Connect()
cQuery1a := " SELECT SOME_FIELD "
cQuery1a += " FROM SOME_TABLE "
cQuery1a += " WHERE SOME_REC_NO = 1 "
cSQL1 := cQuery1a
? cSQL1
cQuery1a := dbo:Query( cQuery1a )
IF cQuery1a:NetErr()
MSGINFO( 'SQL DEMO ' + UPPER(cQuery1a:Error()))
ENDIF
FOR i := 1 to cQuery1a:Lastrec()
aCurRowa := cQuery1a:GetRow(i)
cNAAM := Strvalue(aCurRow:fieldGet(1))
AADD(aRESULT, {cNAAM } )
NEXT
SQL_Disconnect()
?
?
ELSE
? 'NO CONNECTION'
ENDIF
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 1200 ;
HEIGHT 500 ;
TITLE '';
MAIN ;
FONT 'Arial' SIZE 15 ;
@ 10,10 GRID Grid_ZF ;
WIDTH 1150 ;
HEIGHT 450 ;
HEADERS {'SOME_FIELD'};
WIDTHS {250 };
JUSTIFY { GRID_JTFY_LEFT } ;
FONT "Arial" SIZE 09 ;
iTEMS aRESULT
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
FUNCTION SQL_Connect()
/***********************/
dbname := 'dbname'
host := 'host.db.host.xx'
user := 'dbname_user'
password := 'secret_password'
dbo := tmysqlserver():new(AllTrim(host), AllTrim(user), AllTrim(password))
IF dbo:NetErr()
?'R1', dbo:ERROR()
RETURN nil
ENDIF
IF!EMPTY(dbname)
dbo:selectdb(dbname)
IF dbo:NetErr()
?'R2', dbo:ERROR()
RETURN nil
ENDIF
ENDIF
cVersion := dbo:sql_Version()
? 'cVersion', cVersion
RETURN dbo
FUNCTION SQL_Disconnect()
/************************/
dbo:Destroy()
RETURN