Image of Navigational Panel mapped to Contents / Home / Search VBTools4: MhTip
Tech Support Question

Image of Line Break

Q. How can I disable MHTIP and then re-enable it again at run time. I have tried to set the Caption and Visible properties to FALSE with no luck. I then set the Enabled property to FALSE which permanently disabled MHTIP and couldn't re-enable it back even by setting Enabled back to TRUE. What am I doing wrong?
A. Try using the MakeVisible parameter that is passed in the MhTip's _SetCaption event. Setting MakeVisible to false will effectively keep the tip from appearing. You can set a Global or Form-Level variable to determine when the tip should be displayed, like this:

  Sub MhTipSample_SetCaption (ControlName As String, hWnd As Integer, 
                              MakeVisible As Integer, MouseX As Integer, 
                              MouseY As Integer)
    If gfShowTips = True Then
      Select Case ControlName
        Case "cmdMove"
          MhTipSample.Caption = "Move file from one location to another"
        Case "cmdClose"
          MhTipSample.Caption ="Exit program"
      End Select
     Else
      MakeVisible = False
    End If
  End Sub


Image of Arrow to Previous Article
Image of Line Break
[HOME] [TABLE OF CONTENTS] [SEARCH]