hi all,
how can i use the WhatThisbutton property of the form? i changed the from to fixed dialog and set this property to TRUE, but how can i show the yellow box when i use this button during runtime?
thnx
Printable View
hi all,
how can i use the WhatThisbutton property of the form? i changed the from to fixed dialog and set this property to TRUE, but how can i show the yellow box when i use this button during runtime?
thnx
VB Code:
1) Create a new project in Visual Basic. Form1 is created by default. 2) Set the WhatsThisHelp and WhatsThisButton properties for Form1 to True. 3)Add the following code to reference the Hotspot Editor help file to the Form_Load procedure: Private Sub Form_Load() ' your machine ' Change this path to where ever Msdev.hlp is located on App.HelpFile = "C:\Program Files\DevStudio\Common\MSDev98\Help\Msdev.hlp" 4) 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 5) Indent "What's This?" to make it a sub-menu of WhatsThis by pressing the right-arrow button on the Menu Editor. 6) Add the following code to the General Declarations section of Form1: Public ThisControl as control 7) Add the following code to the mnuWhatsThisHelp_Click procedure: Private Sub mnuWhatsThisHelp_Click() ThisControl.ShowWhatsThis End Sub 8) Add a Command Button control to the form and set the following Properties: WhatsThisHelpID = 1 HelpContextID = 5 9) 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 10)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
thnx HanneS,
but there is no MsDev.hlp file on my system. i checked it.
Hi, the MsDev.hlp was just an example file - you must use your own helpfile there. :thumb:Quote:
Originally Posted by Harsh Gupta
thank you very much HanneS. could you please explain the values ofQuote:
Originally Posted by HanneSThEGreaT
WhatsThisHelpID = 1
HelpContextID = 5.
i mean how to determine these values?
WhatsThisHelpID
http://msdn.microsoft.com/library/de...ThisHelpID.asp
HelpContextID
http://msdn.microsoft.com/library/de...pContextID.asp
Also have a look here:
http://msdn.microsoft.com/library/de...pplication.asp
The help ID's and context ID's are something you set to each topic when you design the help file. The box that comes up is a page from the help file.
thnx Joacim and GrimmReaper.
just one more question. can .chm file can be used instead of .hlp?
if no then how can i make .hlp file?
Yes you can use a CHM file.
Well, the easiest way would be to use the HTML Help Editor
You could also look at the Help Compiler Workshop, there should be a tool called HCW in your VB 98 directory (somewhere) or on the VB6 cd
all right. thank all of you.