Link to home
Start Free TrialLog in
Avatar of scottmichael2
scottmichael2

asked on

Adding code to KeyPress in DOM prevents letters from being displayed in INPUT control (text).

Here is the situation.  I have a VB 6.0 app that accesses the DOM of an open IE Window (I'm not using the WebBrowser control, just the MS HTML Object Library - mshtml).  I'm capturing the events of the DOM and adding items to a ListBox control.  However, it doesn't seem to matter even if there is no code in the procedure:

Private Function md_onkeypress() As Boolean
    'lstEvents.AddItem "d_onkeypress"
End Function

md is an HTMLDocument object from an IE Window.  The only way that it will allow me to type certain charaters is to totally comment out the entire event procedure.  It won't even work with the lstEvents.AddItem "d_onkeypress" code commented out.  However, the backspace key does work.

I appreciate any help you can give me!

Thanks,
Scott
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scottmichael2
scottmichael2

ASKER

Thanks, that worked perfectly!!