I have designed a web-page for use as a help file (making it interactive) however I have no idea how to open the file when pressing the Help command button.
Can anybody please help???
I have designed a web-page for use as a help file (making it interactive) however I have no idea how to open the file when pressing the Help command button.
Can anybody please help???
Use the following API Call
VB Code:
Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As _ String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWNORMAL = 1 Private Sub Form_Load() "open", app.path& "\He;pfile.html", vbNullString, app.path, SW_SHOWNORMAL End Sub
More info http://www.Allapi.net
There are a couple of ways to go about it. If you want to say away from API calls, you can simply create a browser form in your vb project with only the browser control on the form (no tool bar or address bar). Then when the user clicks the Help button, show that browser form and Navigate() to the HTML help file.
Another option would be to use the ShellExecute API to call the help file directly and allow the API to load your HTML help file in the user's default Browser.
The advantage of the first option is your ability to customize the browser to possibly add some customized features to the "help" browser that are specifically related to the help files or your application.
Hope it Helps
Code designed specifically for Help files....
VB Code:
Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long Public Const HELP_CONTEXT = &H1 Public Const HELP_QUIT = &H2 Public Const HELP_INDEX = &H3 Public Const HELP_CONTENTS = &H3 Public Const HELP_HELPONHELP = &H4 Public Const HELP_SETINDEX = &H5 Public Const HELP_SETCONTENTS = &H5 Public Const HELP_CONTEXTPOPUP = &H8 Public Const HELP_FORCEFILE = &H9 Public Const HELP_KEY = &H101 Public Const HELP_COMMAND = &H102 Public Const HELP_PARTIALKEY = &H105 Public Const HELP_FINDER = &HB& Public Const HELP_FILE_NAME = "MyHelpFile.chm"
Quote:
Originally posted by techgnome
Code designed specifically for Help files....
VB Code:
Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long Public Const HELP_CONTEXT = &H1 Public Const HELP_QUIT = &H2 Public Const HELP_INDEX = &H3 Public Const HELP_CONTENTS = &H3 Public Const HELP_HELPONHELP = &H4 Public Const HELP_SETINDEX = &H5 Public Const HELP_SETCONTENTS = &H5 Public Const HELP_CONTEXTPOPUP = &H8 Public Const HELP_FORCEFILE = &H9 Public Const HELP_KEY = &H101 Public Const HELP_COMMAND = &H102 Public Const HELP_PARTIALKEY = &H105 Public Const HELP_FINDER = &HB& Public Const HELP_FILE_NAME = "MyHelpFile.chm"
This solution opens html files also? Because I'm assuming MasterMind_2002 is using html as he said "web-page".
Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
Ok, I am thinking that API is the better solution, it's much less code aswell.
Oh, I understand now. I've never compiled a chm file. Although I might give it a try now :D Any shareware/freeware apps to do it?Quote:
Originally posted by techgnome
Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
And how exactly do I design this CHM file (I have never even heard of it before)
I just found a program on my PC called HTML workshop, which compiles chm files. Do a search for *.chm on your PC, you will be suprised how many there are :)Quote:
Originally posted by MasterMind_2002
And how exactly do I design this CHM file (I have never even heard of it before)
Absolutely true. I had plain Word Documents earlier. real dud of a documentaion. :o :oQuote:
Originally posted by techgnome
Actually, no it doesn't. But.... if he's got HTML file(s), might as well compile it into a CHM file, then the user would have full searching and index capabilities. It doesn't take much and looks more professional besides.
U can download the Microsoft HTML HELP Workshop from their site. Its free and it quite easy to use.:o :)
How did you learn to use it though? or is it that easy
Yes, goto http://msdn.microsoft.com and search for HTML HelpKit... you can also search the web. There are several out there.Quote:
Originally posted by seh
Oh, I understand now. I've never compiled a chm file. Although I might give it a try now Any shareware/freeware apps to do it?
It takes a bit of work and some playing around with it, but it works basically like this (it's been a while, and we use RoboHelp, so this is just the basics):Quote:
Originally posted by MasterMind_2002
And how exactly do I design this CHM file (I have never even heard of it before)
Create html pages for each page you want in your help file.
In the HelpKit, create a new project, add the files. You can then add "Chapters" and other groupings, and move the files around, putting them into related groups.
If you want context sensitive help, there some additional things that need to be done.
Let me know if you want/need more info.