AddHelp



Private Sub Form_Load()
'This should point to the hc directory

'under the VB4 directory

App.HelpFile = "c:\vb\hc\shed.hlp"
End Sub

'Add two menu items to Form1 using the following as a guide:

'Menu Property Value

'----------------------------------------------------

'WhatsThis Caption WhatsThis

'WhatsThis Name mnuWhatsThis

'WhatsThis Visible False

'What's This? Caption What's This?

'What's This? Name mnuWhatsThisHelp


'Indent "What's This?" to make it a sub-menu of WhatsThis

'by pressing the right-arrow button on the Menu Editor.

'Add the following code to the General Declarations section

'of Form1:


Public ThisControl as control
'Add the following code to the mnuWhatsThisHelp_Click

'procedure:

Private Sub mnuWhatsThisHelp_Click()
ThisControl.ShowWhatsThis
End Sub

'Add a Command Button control to the form and set the

'following Properties:


WhatsThisHelpID = 1
HelpContextID = 5
'Add following code to the Command1_MouseUp event:

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

'Run the application. Right-click on the Command button

'and then left-Click on the "What's This?" popup to bring

'up the Help file.


(addhelp.html)- by Paolo Puglisi - Modifica del 25/3/2019