|
-
Nov 11th, 2002, 11:08 AM
#1
Thread Starter
Member
Opening Files[Resolved] - Still open for general help to anyone who needs it
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???
Last edited by MasterMind_2002; Nov 11th, 2002 at 01:44 PM.
-
Nov 11th, 2002, 11:18 AM
#2
Frenzied Member
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
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Nov 11th, 2002, 11:19 AM
#3
Lively Member
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
tecnithV -- artisan, artificer, workman, mechanic, architect, or builder
VB6, ASP, HTML, XML, Oracle, Access, MySql, PHP, C++, Etc...
To format your VB code in this forum use tags like this [vbcode] your code here[/vbcode]
-
Nov 11th, 2002, 11:25 AM
#4
A Better Solution.....
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"
-
Nov 11th, 2002, 11:34 AM
#5
Addicted Member
Re: A Better Solution.....
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".
-
Nov 11th, 2002, 11:38 AM
#6
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.
-
Nov 11th, 2002, 11:42 AM
#7
Thread Starter
Member
Ok, I am thinking that API is the better solution, it's much less code aswell.
-
Nov 11th, 2002, 11:42 AM
#8
Addicted Member
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.
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?
-
Nov 11th, 2002, 11:46 AM
#9
Thread Starter
Member
And how exactly do I design this CHM file (I have never even heard of it before)
-
Nov 11th, 2002, 11:49 AM
#10
Addicted Member
Originally posted by MasterMind_2002
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
-
Nov 11th, 2002, 11:50 AM
#11
Frenzied Member
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Nov 11th, 2002, 11:53 AM
#12
Thread Starter
Member
How did you learn to use it though? or is it that easy
-
Nov 11th, 2002, 11:54 AM
#13
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?
Yes, goto http://msdn.microsoft.com and search for HTML HelpKit... you can also search the web. There are several out there.
Originally posted by MasterMind_2002
And how exactly do I design this CHM file (I have never even heard of it before)
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):
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|