dcsimg
September 23, 2020
Hot Topics:

VB Coding TIP: Using 'What's This?' Help

  • By Sam Huggill
  • Send Email »
  • More Articles »

Make a new project. To the form set the WhatsThisHelp and WhatsThisButton to True and add a command button with the WhatsThisHelpID=1 and HelpContextID=5

Use the following information to make the menus:

Menu Property Value
WhatsThis Caption WhatsThis
WhatsThis Name mnuWhatsThis
WhatsThis Visible False
What's This? Caption What's This?
What's This Name mnuWhatsThisHelp

Make the What's This? menu a submenu of WhatsThis

Public ThisControl as control

Private Sub mnuWhatsThisHelp_Click()
ThisControl.ShowWhatsThis 
End Sub

Private Sub Command1_MouseUp(Button As Integer,_ 
Shift As Integer, _X As Single, Y As Single)
If Button = vbRightButton Then 
Set ThisControl = Command1 
PopupMenu mnuWhatsThis 
End If 
Set ThisControl = Nothing 
End Sub





This article was originally published on November 19, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date