Webbrowser OCX (shdocvw) onkeydown

LBiddiscombe

New Member
Good day,

I am using the web browser OCX shdocvw.dll to host a webpage in a progress window. It works great except that some events are not being fired.

Specifically the site has some javascript to limit key presses that doesn't fire as it uses onkeydown and onkeyup events. An HTML containing something as simple as the following doesn't fire the event, but works fine in IE.

Both the following fire the alert box on IE...

<input name="test" type="text" onkeypress="alert(event.keyCode);">
<input name="test" type="text" onkeydown="alert(event.keyCode);">

But only the onkeypress one works through the OCX.

I've tried all manner of cimbinations of the honourprokey settings etc but with no luck.

I've also created a simple winform in C# and used the same shdocvw OCX and both versions work fine there...

Any ideas?
 
Top