Results 1 to 6 of 6

Thread: Make Help Button Work.

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Mesa, Arizona
    Posts
    45

    Make Help Button Work.

    Hello All

    I'm try to link the help button to a help file using the msgbox function. I don't know what it is but when I press the button nothing happens. The 'OK' Button works fine and I can test for it too. Do I need to do something to make the help button work when using a msgbox? Here is the code that I have so far...

    Button click...
    Dim oErrors As New MakeSomeErrors()
    Try
    oErrors.TestDivideException()
    Catch ex As MyExceptions
    Dim stemp As String
    Dim msgResult As New MsgBoxResult()

    msgResult = MsgBox(ex.Message, msgBoxStyle.MsgBoxHelp, "Error")
    If msgResult = vbMsgBoxHelp Then
    MsgBox("Hello")
    End If
    End Try


    Matthew

  2. #2
    Member
    Join Date
    Dec 2002
    Location
    NY, USA
    Posts
    52
    ' The first argument is a Control object that works as the
    ' parent for the help dialog box.
    Help.ShowHelpIndex(Me, "c:\myhelpfile.chm")

    (You can also use a URL that uses forward slashes as separators.) The other method, ShowHelp,
    is overloaded to provide access to different portions of the help document:

    ' Display the contents of the help file.
    Help.ShowHelp(Me, "c:\myhelpfile.chm")
    ' Display the index page of the help file.
    Help.ShowHelp(Me, "c:\myhelpfile.chm", HelpNavigator.Index)
    ' Display the search page of the help file.
    Help.ShowHelp(Me, "c:\myhelpfile.chm", HelpNavigator.Find)
    ' Display the help page for a specific keyword.
    Help.ShowHelp(Me, "c:\myhelpfile.chm", "mykeyword")
    ' Display the help page for the specific topic #123.
    Help.ShowHel (Me, "c:\myhelpfile.chm", HelpNavigator.Topic, 123)
    Iouri Boutchkine

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Mesa, Arizona
    Posts
    45
    Thanks for the help but is there any way to make the help button thats display on the msgbox to cause an event when pressed.

    Matthew

  4. #4
    Lively Member
    Join Date
    May 2002
    Posts
    94
    If theres a way, then I haven't found it.. The only button objects listed are

    OKOnly
    OKCancel
    AbortRetryIgnore
    YesNoCancel
    YesNo
    RetryCancel

    An API Might be the best solution.

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Mesa, Arizona
    Posts
    45
    Yeah I've tried everything and still no go. Well thanks for the help though.

    Matt

  6. #6
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    UK
    Posts
    271
    hi,

    There is a way to do to add a help button to msgbox, there is a document somewhere that tells you how to 'hack' the msgbox function.

    or

    you could just create you own msgbox, using a form. it's a lot quick and you make it do what ever you like. that's what I had to do.
    §tudz

    Studzworld.com - Portfolio

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