Author |
Message |
Ashi_Mashi2
|
Posted: Sat Apr 09, 2005 11:30 pm Post subject: How to create a help file? |
|
|
Hi everyone...
I want to create a help file in VB. I want to use something like those 'tree diagrams' that have different topics/subtopics, etc (like Windows traditional help file)...how can i do it?..thanks |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Brightguy
|
Posted: Tue Apr 12, 2005 9:15 am Post subject: Re: How to create a help file? |
|
|
You don't use VB to create help files. They are actually .rtf text files (that have to follow a very specific format). You can use the "Help Workshop" (comes with Visual Studio, I think) to compile the text along with your help contents.
When I first wanted to make a help file I couldn't find any free programs so I did it manually. I just checked for a page with that format description but found this program. I haven't used it, but it looks good. |
|
|
|
|
|
Ashi_Mashi2
|
Posted: Tue Apr 12, 2005 3:37 pm Post subject: thx |
|
|
ok..thanks a lot...i donwloaded the program..i just need to learn how to use it and i think i'll be fine;)...but, when i am done making the help file, how can i run it in VB? |
|
|
|
|
|
Brightguy
|
Posted: Tue Apr 12, 2005 10:37 pm Post subject: Re: thx |
|
|
You can associate a help file with your application in the project properties or by setting App.HelpFile, and whenever you press F1 the help file will open. The CommonDialog control also has a HelpFile property and you can use the ShowHelp method to open the help file. And I think there's a winAPI HelpFile function that you can use to open help files. |
|
|
|
|
|
Ashi_Mashi2
|
Posted: Thu Apr 21, 2005 8:56 pm Post subject: (No subject) |
|
|
thanks....so, how can i direct the help file to open up in a specific place? i mean whenever i run the help file, it starts from the beginning...i want it to start say from the part that is related to the specific part of my project...thx |
|
|
|
|
|
Brightguy
|
Posted: Tue Apr 26, 2005 12:06 am Post subject: Re: |
|
|
When creating your help file, I think every topic gets a context ID. You should be able to open to a specific topic if you know the HelpContextID...
VisualBASIC: | CommonDialog.HelpCommand = cdlHelpContext
CommonDialog.HelpContext = HelpContextID
CommonDialog.ShowHelp |
And if you press F1 the App.HelpFile will open using the HelpContextID property of the object that currently has the focus. |
|
|
|
|
|
Ashi_Mashi2
|
Posted: Sat May 07, 2005 4:46 pm Post subject: (No subject) |
|
|
ok..thanks...but, i am unfamiliar with common dialog...i mean i tried what you said, and it didnt even open the help file....so, can you please tell me how to do it, like a bit like 'step by step'. thanks a lot. |
|
|
|
|
|
GlobeTrotter
|
Posted: Sat May 07, 2005 5:03 pm Post subject: (No subject) |
|
|
Press Ctrl+T in VB and then check off the CommonDialog control. Then drag the CommonDIalog onto your form. You can then use those commands. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Ashi_Mashi2
|
Posted: Sat May 07, 2005 5:58 pm Post subject: (No subject) |
|
|
ok...i did that...but, still no result...i have my help file as "test.hlp", and in the common dialog menus, i set the "help file" to say "C:\test.hlp" and copied your code into a command control...i think i'm not doing something right. |
|
|
|
|
|
GlobeTrotter
|
Posted: Sat May 07, 2005 8:09 pm Post subject: (No subject) |
|
|
What do you mean by "copied your code into a command control"? You add the Common Dialog Control to the form as you would a timer. Then you can use it in your code as CommonDialog.Whatever. |
|
|
|
|
|
Ashi_Mashi2
|
Posted: Sun May 08, 2005 9:54 am Post subject: (No subject) |
|
|
lol...sorry, i was in a hurry...i meant the command button...anyway, i know it doesnt matter where you put the code...but, it still doesnt work...anyway, i reasearched a lot and found out that there's more to it than just putting the code...using:
code: |
App.HelpFile = "F:\temp\test.hlp"
With Form1.CommonDialog1
.HelpFile = App.HelpFile
.HelpContext = topicID
.HelpCommand = cdlHelpContext
.HelpKey = "the selected topic" '(*optional)
.ShowHelp
End With
|
(i know it is almost the same as what you previously wrote)
i could start the help file, but i dont know how to add id to the different topics...when i put a random number (like 1, 5, 12, etc) in the "topicID" field, i can get different parts of the help file..but, i dont know how can i direct them to the topic that i want, i.e., how to add the topic id to the help file?
thanks agian |
|
|
|
|
|
Brightguy
|
Posted: Sun May 08, 2005 1:01 pm Post subject: Re: |
|
|
I can't remember if you can set your own topic IDs. I suspect there will be some way to do it in that help maker program. |
|
|
|
|
|
|