Page 2 of 2

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Tue Jun 02, 2015 4:33 am
by UltraVox
Make this experience...

Open my .pub, add a fourth button, and point to this website :
https://stemkoski.github.io/Three.js/Skybox.html
Of course, you need a WebGL compatible video card.

This skybox adresse is 100% compatible with :
I.E version 11.0.9600.17801 (Tested and approved.)
Chrome version 43.0.2357.81 m (Tested and approved.)
Firefox version 38.0.1 (Tested and approved.)

And yet, don't work in NB...

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Tue Jun 02, 2015 5:14 am
by Gaev
UltraVox:

That's impossible. The moment "CustomWindow" appears, my NB app freezes. My only choice is to close the CustomWindow with the red cross at the top right of the screen. I can look around me, in 3D, in the skybox, but I can do nothing else. Worse, if I make up the SkyBox in a WebBrowser directly in my app (without CustomWindow), any application freezes.

1) Again, this is the first time you mention CustomWindow ... you don't say whether the WebBrowser object is inside the Custom Window or not ... perhaps the properties assigned to the custom window are causing the (perceived) problems with RefreshObject.

2) I did NOT suggest you insert AlertBox commands in your pub ... but replace the javascript command (line 74) with a (javascript) alert command ... that way, you would verify that this part of the html/javascript was being serviced after a Refresh ... something like ...
Code: Select all
If "[Floor]" "=" "Checked"
   FileWrite "[PubDir]Data\3D\SkyBox\Skybox.html" "74" "    scene.add(floor);"
   RefreshObject "Navigateur_Web5"
Else
    FileWrite "[PubDir]Data\3D\SkyBox\Skybox.html" "74" "   alert(12345);"
    RefreshObject "Navigateur_Web5"
EndIf


I did a test with a new temporary application, in which I do the same thing in my application. And surprise ? This is worse than the first application: there is absolutely nothing that works...

Do you have any code to trap the values of [BrowserStatus] at events like Before Navigate, Download Begin, Download Complete and Navigate Complete ? ... it occured to me that IE 11 might be sending back its default error message (and giving up any further rendering) ... and because you are not checking for it, all you see is "no change to the rendering" ... which could very well be the rendering before the request to referesh it.

Again, start with a simple test ...

a) have two files on disk ... one with the scene.add(floor); command ... the other with the alert(12345); command ... composed with notepad++

b) invoke each file in a separate WebBrowser object

c) when (b) works, invoke the different files in the same WebBrowser object

d) when (c) works, show one file in a WebBrowser object, then (using nortepad++) edit line 74 of this file and invoke RefreshObject

Until (b), (c) and (d) work, there is no reason to move forward ... you have to determine why "YOUR HTML/JAVASCRIPT" is not rendering (because I have not seen any other recent posts where WebBrowser/RefreshObject are reported to be problematic) ... remember that every combination of technology does not work in every circumstance ... many decades ago, we used to have a saying "be careful about trying to be leading edge; it most likely will become bleeding edge".

Here is my application for download (.exe , .pub , images , .js , all...) :

There is nothing I can do with it ... as I do not have IE 11.

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Tue Jun 02, 2015 7:15 am
by UltraVox
Hello Gaev,

1) Again, this is the first time you mention CustomWindow ... you don't say whether the WebBrowser object is inside the Custom Window or not ... perhaps the properties assigned to the custom window are causing the (perceived) problems with RefreshObject.


It's false :
http://www.neosoftware.com/community/viewtopic.php?f=22&t=21197#p11217866
and, I am well aware of that Gaev, and there is no option checked for CustomWindow. I use CustomWindow because that is the only way to show the Three.js pages. Directly in NB, no Three.js page is displayed and my NB app. freezes. No freeze with CustomWindow, but RefreshObject don't work... because NB app. is freeze in background.

With AlertBox JS command, this command is a problem (in NB app only, work well with I.E local mode) :
Code: Select all
var keyboard = new THREEx.KeyboardState();


Do you have any code to trap the values of [BrowserStatus] at events like Before Navigate, Download Begin, Download Complete and Navigate Complete ? ... it occured to me that IE 11 might be sending back its default error message (and giving up any further rendering) ... and because you are not checking for it, all you see is "no change to the rendering" ... which could very well be the rendering before the request to referesh it


No, nothing code. It's a very simple WebBrowser object... I have no other commands elsewhere that could interfere in one way or another. All this is very simple and the .exe is that I gave is a very fine demonstration of the problem. The problem, is that WebBrowser Object of NeoBook can not display correctly the WebGL technologie.

Until (b), (c) and (d) work, there is no reason to move forward ... you have to determine why "YOUR HTML/JAVASCRIPT" is not rendering

Gaev, I realize that it's not MY html code the problem, or my code in NB, but the WebGL technologie whole that is denied by NB. I tried more than 20 website addresses with skybox, etc, and it's very rare to find a single address that works... The problem, is NeoBook.

There is nothing I can do with it ... as I do not have IE 11.

Ok... you would have the absolute proof that NeoBook is incompatible (almost entirely) with WebGL technologie.

I try with a other 3D WebGL engine :
http://www.babylonjs.com

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Tue Jun 02, 2015 10:44 am
by Neosoft Support
NeoBook does NOT have its own web browser. It relies entirely on the Internet Explorer component built into Windows. If you see a Windows application that displays web sites or HTML content, 99% of the time it's using the IE component. For whatever reason Microsoft made some really bad choices and configured the IE component to always emulate IE7 as the default. The only way to change this behavior is by either placing a meta tag in your HTML code or by adding something to the registry. We cannot use another browser component because doing so would add 30MB+ to the size of NeoBook and each compiled application - which is unacceptable.

If you have control over the HTML content being loaded into NeoBook's Web Browser, the simplest solution is to add the following meta tag to insure that the content is displayed with the installed version of IE instead of IE7:

Code: Select all
<meta http-equiv="X-UA-Compatible" content="IE=edge">


As for WebGL, here is some information from an article that might be helpful:

As it turns out, the embedded browser uses the IE7 rendering engine by default, even if a newer version of IE is installed. Also, GPU rendering is switched off, so the browser uses software rendering only.

This was fixed by setting the following feature control registry keys:

FEATURE_BROWSER_EMULATION – set to the desired version of the IE rendering engine
FEATURE_GPU_RENDERING – set to 1 to enable GPU rendering.
These keys can be set under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER for a specific program (executable name), which uses the embedded browser. HKCU is preferred since the program won’t need administrator privileges to write to HKCU.

So when I set FEATURE_BROWSER_EMULATION to 10000 (for IE10) and set FEATURE_GPU_RENDERING to 1, the performance improved to ~850 fishies @ 60 fps. Still not as good as standalone IE with its 1000+ fishies, but quite an improvement!


To refresh the Web Browser, usually the RefreshObject action will work. If it doesn't, then you may need to force the browser to clear its content using something like BrowserLoadFromStr or navigate to a blank screen like this:

Code: Select all
BrowserGoTo "WebBrowser1" "about:blank"
BrowserGoTo "WebBrowser1" "back to the original page"

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Tue Jun 02, 2015 12:14 pm
by UltraVox
Dave ! Thank you very much for this very important informations.

The META tag already allows me to properly display all Three.js and Babylon.js pages. So far, they refused to appear. Or it freezes my application. It was horrible !

I will do a comparative test (FPS) with and without the registry keys. There surely has other FPS to win...

Again thank you, and thank you Gaev.
This META tag just gave an acceptable answer to 95% of the problems I meet :)

Re: Reload / Refresh an HTML page in a WebBrowser

PostPosted: Wed Jun 03, 2015 10:36 am
by Neosoft Support
I'm glad the meta tag trick helped!