Page 1 of 2

XbpHtmlViewer

Posted: Tue May 01, 2018 2:30 am
by Tom
XbpHtmlViewer is even with Xbase++ 2.0 a wrapper for the IE activex-control, using compatibility mode for IE version 4.0 (!). XbpHtmlWindow is not able to work with JS code. So, if trying to display GoogleMaps within a dialog, XbpHtmlViewer says "You're using a much too old browser", XbpHtmlWindow only displays the static elements (the header). I need to use GM inside my dialogs. Any ideas?

Re: XbpHtmlViewer

Posted: Tue May 01, 2018 6:17 am
by rdonnay
Tom - Please post some sample code that you are using.

I would like to run it.

Re: XbpHtmlViewer

Posted: Thu May 03, 2018 5:19 am
by Tom
If anyone has the same problem - Roger helped me a little, Alaska (Till) showed the solution:

The IE control works in compatibility mode for IE 4/6 by default, but you can set the mode to 11/edge by adding a DWORD regstry key with your app's name (myapp.exe) to

Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

containing "2AF9" (11001 binary). Works!

Re: XbpHtmlViewer

Posted: Thu May 03, 2018 5:53 am
by rdonnay
How do you enter your app's name in the registry key?

Re: XbpHtmlViewer

Posted: Thu May 03, 2018 5:59 am
by Tom

Code: Select all

DC_RegWrite(HKEY_CURRENT_USER,'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION','myapp.exe',11001)
FEATURE_BROWSER_EMULATION is the key group, and you can set keys for all apps you manage.

Re: XbpHtmlViewer

Posted: Thu May 03, 2018 6:29 am
by rdonnay
That's great!!

I added the below code to the beginning of the WebBrow.prg sample program in ..\samples\activex\webbrow.prg.

This is generic for any Xbase++ program.

I ran your sample HTML and it worked with no Javascript errors.

Code: Select all

DC_RegWrite(HKEY_CURRENT_USER,'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', ;
            AppName(),11001)
html.jpg
html.jpg (108.12 KiB) Viewed 16578 times

Re: XbpHtmlViewer

Posted: Fri May 04, 2018 2:20 am
by skiman
Hi,

On my system this looks as it is not a very stable solution? The sample program exits without any warning after 5 minutes.

Re: XbpHtmlViewer

Posted: Fri May 04, 2018 3:57 am
by Tom
Hi, Chris.

I can't confirm this. The modified WEBBROW-sample works on serveral machines with Windows 10 (32/64) and with Windows 7 (the key should be ignored here), it runs without stopping. Do you get an XPPFATAL? What does it say?

Re: XbpHtmlViewer

Posted: Fri May 04, 2018 5:11 am
by skiman
Hi Tom,

No error at all. The screen disappears without any notice and no xppfatal.
I tried it with http://maps.google.com and I moved the map with the mouse. It start without problem, is getting slow and suddenly it disappears.
I had the same problem with our online manual, I was trying to have display it in our application.
Last test was with a youtube training movie we made.

Re: XbpHtmlViewer

Posted: Fri May 04, 2018 5:18 am
by Auge_Ohr
rdonnay wrote: I ran your sample HTML and it worked with no Javascript errors.

Code: Select all

DC_RegWrite(HKEY_CURRENT_USER,'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', ;
            AppName(),11001)
can you please share TEST.HTM :pray: