XbpHtmlViewer

This forum is for general support of Xbase++
Message
Author
User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

XbpHtmlViewer

#1 Post 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?
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: XbpHtmlViewer

#2 Post by rdonnay »

Tom - Please post some sample code that you are using.

I would like to run it.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: XbpHtmlViewer

#3 Post 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!
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: XbpHtmlViewer

#4 Post by rdonnay »

How do you enter your app's name in the registry key?
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: XbpHtmlViewer

#5 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: XbpHtmlViewer

#6 Post 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 16496 times
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: XbpHtmlViewer

#7 Post 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.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: XbpHtmlViewer

#8 Post 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?
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: XbpHtmlViewer

#9 Post 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.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: XbpHtmlViewer

#10 Post 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:
greetings by OHR
Jimmy

Post Reply