CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: F1 cancel i IE

  1. #1
    Join Date
    Feb 2000
    Posts
    1

    F1 cancel i IE

    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


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: F1 cancel i IE

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured