In xHB, I use timers - DEFINE TIMER. Timers don't work in HB.
In xHB, I use POPU PMENU - MENU oMen POUP, Only the left menu column is visible in the HB
xHarbour to Harbour
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: xHarbour to Harbour
Code: Select all | Expand
oCl:=TActiveX():New(oWnd, "Shell.Explorer")
oCl:Silent:=.T.
oCl:Do("Navigate2", "file.html")
do while .T.
oDk:=oCl:GetProp("Document")
if valtype(oDk)="U".or.oDk:ReadyState!="complete"
WaitMessage()
SysRefresh()
else
exit
endif
enddo
In the xHB open Activex and get a type object type document (1111111:Document)
Next, I can find the element I need on this document el:=oDk:getElementById("id-el") and click on it el:click()
In HB, this does not work. The problem is in the oDk. oDk:getElementById does not work
If I try to display oDk on the screen and get an error
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C
[ 2] = U
Stack Calls
===========
Called from: => CHARACTER:__OPPLUS( 0 )
Called from: .\source\function\WQOUT.PRG => (b)WQOUT( 11 )
Called from: => AEVAL( 0 )
Called from: .\source\function\WQOUT.PRG => WQOUT( 11 )
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: xHarbour to Harbour
If I understood correctly
I upload an HTML file with scripts for working with the map to the ActiveX object. After receiving the oDk, I can use the DOM to access certain elements of the oDk (document)
For example:
if oDk:DefaultView:itm=123 //itm - is a global variable that is visible both in the program
on FWH and in oDk
el:=oDk:getElenentByID("geo-ecr") // get a document element (button)
el:Click() // imitating a click on this button
endif
I basically moved my program from xharbour to Harbour. But before I start trying webview2, I wanted to check how Harbour works with ActivrX

I upload an HTML file with scripts for working with the map to the ActiveX object. After receiving the oDk, I can use the DOM to access certain elements of the oDk (document)
For example:
if oDk:DefaultView:itm=123 //itm - is a global variable that is visible both in the program
on FWH and in oDk
el:=oDk:getElenentByID("geo-ecr") // get a document element (button)
el:Click() // imitating a click on this button
endif
I basically moved my program from xharbour to Harbour. But before I start trying webview2, I wanted to check how Harbour works with ActivrX
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: xHarbour to Harbour
Dear Yuri,
If you plan to use webview2 then you don't need to manage ActiveX at all
If you plan to use webview2 then you don't need to manage ActiveX at all
Re: xHarbour to Harbour
Yes, Antonio, you're right. My goal is to use webview2 instead of ActiveX. That's why I had to transfer my program from xHarbour to Harbour