Link to home
Start Free TrialLog in
Avatar of Matt_Unsworth
Matt_Unsworth

asked on

Help File Question

I've got a completed VB app

I've got a set of help files produced in RoboHELP.

My question is,

How do I reference/launch the help files from my VB app, I've tried a couple of things but they were pretty unsuccessful.

I bet somebdy out there has got some slick code just waiting to go.

Thanks for your help (in advance)

Matt.
Avatar of mark2150
mark2150

You should be able to just place the .HLP file into the directory with the project and then set the project properties to point to that file. Fin. No code required. Pressing <F1> should pop the file. Go to Project/Properties and select the General Tab. Set the Help File Name field. Save and recompile.

M
ASKER CERTIFIED SOLUTION
Avatar of Gordonp
Gordonp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dont quite know what happened there

post should be

In the Project PRoperties dialog

set the helpfile to be the path of the
Help file you created.

you can that set the HelpContextIDs for your controls to match the appropriate context in the helpfile.


you can also use the winHelp api call to open the help file

Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd as Long, ByVal HelpFile as String, ByVal wCommand as Integer, dwData As Any) as Long

see

http://msdn.microsoft.com/library/psdk/shellcc/shell/Functions/WinHelp.htm

for how to use this function
You can also pop the help dialog with CommonDialog Show.Help

M
Avatar of Matt_Unsworth

ASKER

Cheers
From mof2
25/11/00

Under a command button add this code

Private Sub Command1_Click()
dummy = Shell ("winhelp.exe c:\program files\help.hlp", vbNormalFocus)

End Sub

Don't forget to declare the variable 'dummy' .

Make sure the path your help (.hlp) file is in is ok.

Of course, you can put this code under a menu if you wish

Above is just an example.