PDA

View Full Version : Embedded IE version



brc
1st October 2012, 13:48
Hello
Im having a rather strange problem when I try to use internet explorer as an active x component. I have installed IE 9 on my computer and are using Zenon 6.51 sp0


First I added the Microsoft Webbrowser from the active x list. I could see that it used an old IE version, and some googling led me to:

http://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx#browser_emulation

After putting zenrt32.exe in 9000 (standard IE) it fixed a lot of the problems, and the browser says that it is IE9. However, there are still some javascript problems which are not there when opening the page in the IE9 browser. Another problem is that I cant tab between input fields

As a test, I created a new .net project where I used the .net webbrowser control. I made the project embeddable and put it into zenon and created a standalone webform that use the same control (and added the exe to the registry database). When I execute the standalone version it works as it would do in a browser, but the embedded version through zenon have the same problems as before.

It MAY have something to do with script being included in axd files. It seems that the embeded version may be restricted further then in the browser?

brc
1st October 2012, 15:49
Cant find a way to delete this entry, but if anyone is interrested the error came because there were made changes to the browsers useragent (can be done with the code below)


Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Sub UrlMkSetSessionOption Lib "urlmon.dll" (ByVal _
dwOption As Long, _
pBuffer As Any, _
ByVal dwBufferLength As Long, _
ByVal dwReserved As Long)
Const URLMON_OPTION_USERAGENT As Long = &H10000001

UrlMkSetSessionOption URLMON_OPTION_USERAGENT, ByVal USERAGENT, Len(USERAGENT), 0


The code above changes the useragent for all browsers embedded in an application, and the change ment that .net's scriptmanager couldnt recognize the browser, and therefore not provide correct code