Click to See Complete Forum and Search --> : F1 cancel i IE


nybo
February 10th, 2000, 09:35 AM
I've build an ocx and placed it on a web page.
to catch events from Internet Explorer I use Multicasting by declaring
..
Dim WithEvents msDoc As HTMLDocument

Private Sub UserControl_Show()
Set msDoc = UserControl.Parent.Script.document
end sub
..

Thereby I am able to catch events fired from IE, but when catching the onhelp
event I am not able to CANCEL IE-help
(The help you get when pressing F1 in Internet Explorer)

This is the catch-event declaration
Private Function msDoc_onhelp() As Boolean
Debug.Print "msDoc_onhelp()"
msDoc_onhelp = False
End Function
..
By declaring the return value msDoc_onhelp = False, the should be no further
event-handling, but still IE-help appears


a colleague of mine can stop the IE-help in javascribt:
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>

</SCRIPT>

Have anyone caught the onhelp event and prevented IE from showing IE-help
?

Thank You very much :-)

René Nybo

Lothar Haensler
February 11th, 2000, 01:33 AM
I haven't tried this from VB, so it's more a guess:
try to set
window.event.cancelBubble = true
in your onhelp event handler.
This prevents the event from bubbling.