HB_WebView (a cross-platform Webview library)

User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post by serge_girard »

Thanks, I' will take a look!

Serge
There's nothing you can do that can't be done...
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post by serge_girard »

Thanks!
There's nothing you can do that can't be done...
User avatar
jorge_riv
Posts: 86
Joined: Thu Nov 22, 2018 2:20 pm
DBs Used: DBF, MySQL,SQL SERVER, Oracle.

Re: HB_WebView (a cross-platform Webview library)

Post 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?
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post by serge_girard »

Thank you, very amazing!

Do you think it would be possible to have MySQL integrated?

Serge
There's nothing you can do that can't be done...
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_WebView (a cross-platform Webview library)

Post 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
 
There's nothing you can do that can't be done...
Post Reply