2

I need to listen to custom-event from a browsercontrol in a visual-basic program A recent windowsupdate prevents vbscript from working

Our problem: after windos update KB4490481 the internet explorer looses his VBScript capability! I know that IE11 doesn't run VBScript anyway, but I'm talking about the browsercontrol, which is behaving as IE7 by default!

Well ok, so I converted the VBScript code to javascript, that seems fine But it also uses Customevents, I used this help for it: here

Seems ok, when you listen internaly to the event

But, I need the customevent to be raised to the mainprogram which contains the browsercontrol, that doesn't work!

Unfortunately the mainprogram is written in VB6 (Visual Basic 6), so I don't find much help on it My problem is, that "addEventListener" properly with the help of https://msdn.microsoft.com/en-us/ie/aa752045(v=vs.94) I'm able to lisen to non customevents like

Browser.Document.getElementById("btnMyButton").addEventListener "click", cfForward

but not to my customevent

Browser.Document.addEventListener "JSEvent", cfForward, False

Can anyone provide help? I guess that working VBA Office Sample will also help me

The best thing for me would be a registry key to get vbscript back

Other things that don't help: <meta http-equiv="x-ua-compatible" content="IE=10"> ==> had no effekt, vbscript doesn't run

rename the page to .hta: Vbscript ist still working there, but there is a confirmation dialog, and it opens its own window

thanks Donald

"btnMyButton" is a Button

Browser.Document.getElementById("btnMyButton").addEventListener "click", cfForward ==> is ok

"JSEvent" is a custom-event, that is fired onmousedown for testing

Browser.Document.addEventListener "JSEvent", cfForward, False ==> not ok

rohrl77
  • 3,277
  • 11
  • 47
  • 73
Donald
  • 17
  • 1
  • Before update to the KB4490481, whether the code works well? From [this article](https://support.microsoft.com/en-us/help/4493509), it seems that the latest version is KB4493509, try to upgrade to the latest version. If still not working, please send us a simple sample to reproduce. – Zhi Lv Apr 22 '19 at 09:14
  • Thank you for your comment! I installed the newest updates, but it's still not working! I made a simple Program to show what I'm trying to do: the first button in the sample is directly wired via the "click" event to some code of the program, this is working the second button calls a custom-event, which should call the program, this is not working Why this custom event? We are using a sort of event-hub, otherwise we must write really much eventhandler directly inside the VB6 program If the problem can't be solved, we will have to this as a last resort – Donald Apr 24 '19 at 08:30
  • A word on the Testprogram: just unpack it into any folder, open Javachecklist.vbp and run it. Just note: browsercontrol must run as IE11, otherwise there will be errors HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION DWORD vb6.exe = 11001 dec to run browsercontrol as IE11! Link to the sample program, valid for 3 days https://spideroak.com/storage/MRSXA4BSO5SWE/shared/986859-2-9842/JSMini.zip?85a45ac74f5826b7d061f55f1c88a6ab – Donald Apr 24 '19 at 08:30

0 Answers0