Adding help file to project  
Author Message
paughjj





PostPosted: Sat Jul 03 10:32:44 CDT 2004 Top

Visual Basic >> Adding help file to project

I am having trouble adding a help file to my project. The help file runs
fine in another project and the reference is in the Visual Basic Project
file.

Thanks in advance

Visual Studio379  
 
 
Gale





PostPosted: Sat Jul 03 10:32:44 CDT 2004 Top

Visual Basic >> Adding help file to project On Sat, 03 Jul 2004 11:04:12 -0400, "Richard M. Geis"


> I am having trouble adding a help file to my project. The help file runs
> fine in another project and the reference is in the Visual Basic Project
> file.

What do you mean by "having trouble"?

Does it work at all? Do you get an error message?

Gale.

 
 
Richard





PostPosted: Sat Jul 03 10:40:53 CDT 2004 Top

Visual Basic >> Adding help file to project No eror message, does not work at all
VB 6.0
Windows XP



> On Sat, 03 Jul 2004 11:04:12 -0400, "Richard M. Geis"

>
>
>>I am having trouble adding a help file to my project. The help file runs
>>fine in another project and the reference is in the Visual Basic Project
>>file.
>
>
> What do you mean by "having trouble"?
>
> Does it work at all? Do you get an error message?
>
> Gale.
>

 
 
Gale





PostPosted: Sat Jul 03 10:50:48 CDT 2004 Top

Visual Basic >> Adding help file to project On Sat, 03 Jul 2004 11:40:53 -0400, "Richard M. Geis"


> No eror message, does not work at all
> VB 6.0
> Windows XP

Windows Help or HTML Help?

How are you trying to run it? Context-sensitive or opened in code?

Gale.

 
 
Richard





PostPosted: Sat Jul 03 11:28:16 CDT 2004 Top

Visual Basic >> Adding help file to project It is windows help
I have this menu item:
Begin VB.Menu HelpMenu
Caption = "Help"
Shortcut = {F1}
End



> On Sat, 03 Jul 2004 11:40:53 -0400, "Richard M. Geis"

>
>
>>No eror message, does not work at all
>>VB 6.0
>>Windows XP
>
>
> Windows Help or HTML Help?
>
> How are you trying to run it? Context-sensitive or opened in code?
>
> Gale.
>

 
 
Don





PostPosted: Sat Jul 03 11:50:41 CDT 2004 Top

Visual Basic >> Adding help file to project


>It is windows help
>I have this menu item:
> Begin VB.Menu HelpMenu
> Caption = "Help"
> Shortcut = {F1}
> End
>

That only gets it to show up on the Menu Bar...
Private Sub HelpMenu_Click() is the sub that gets the click event when you click
on the menu....
What are you doing here to load/run your Helpless File...???



>
>> On Sat, 03 Jul 2004 11:40:53 -0400, "Richard M. Geis"

>>
>>
>>>No eror message, does not work at all
>>>VB 6.0
>>>Windows XP
>>
>>
>> Windows Help or HTML Help?
>>
>> How are you trying to run it? Context-sensitive or opened in code?
>>
>> Gale.
>>

Have a good day...

Don
 
 
Richard





PostPosted: Sat Jul 03 12:43:55 CDT 2004 Top

Visual Basic >> Adding help file to project It seems to me that F1 should get the job done as it does in the other
application, however I do have:
Private Sub HelpMenu_Click()
'I just don't know what command should I put here
'I tried .showHelp and ss Help and got error messages
End Sub






>
>
>>It is windows help
>>I have this menu item:
>> Begin VB.Menu HelpMenu
>> Caption = "Help"
>> Shortcut = {F1}
>> End
>>
>
>
> That only gets it to show up on the Menu Bar...
> Private Sub HelpMenu_Click() is the sub that gets the click event when you click
> on the menu....
> What are you doing here to load/run your Helpless File...???
>
>
>

>>
>>
>>>On Sat, 03 Jul 2004 11:40:53 -0400, "Richard M. Geis"

>>>
>>>
>>>
>>>>No eror message, does not work at all
>>>>VB 6.0
>>>>Windows XP
>>>
>>>
>>>Windows Help or HTML Help?
>>>
>>>How are you trying to run it? Context-sensitive or opened in code?
>>>
>>>Gale.
>>>
>
>
> Have a good day...
>
> Don

 
 
Gale





PostPosted: Sat Jul 03 13:05:13 CDT 2004 Top

Visual Basic >> Adding help file to project On Sat, 03 Jul 2004 13:43:55 -0400, "Richard M. Geis"


> It seems to me that F1 should get the job done as it does in the other
> application, however I do have:
> Private Sub HelpMenu_Click()
> 'I just don't know what command should I put here
> 'I tried .showHelp and ss Help and got error messages
> End Sub

If you have set the Help file name in Project/Properties then F1 will
usually open it.

However, from your previous post, you have set F1 as the shortcut key
to your Help menu item.

Go back into the Menu Editor and set the shortcut key for the menu
item to "(none)". Then, as long as you have set the Help file name
correctly in Project/Properties, F1 should launch it.

Gale.

 
 
Gale





PostPosted: Sat Jul 03 13:30:47 CDT 2004 Top

Visual Basic >> Adding help file to project On Sat, 03 Jul 2004 13:43:55 -0400, "Richard M. Geis"


> It seems to me that F1 should get the job done as it does in the other
> application, however I do have:
> Private Sub HelpMenu_Click()
> 'I just don't know what command should I put here
> 'I tried .showHelp and ss Help and got error messages
> End Sub

Once you have the F1 key working, if you still want the menu item to
work, paste the code further down this message into the General
Declarations section of your form, then put this call into your
HelpMenu_Click event:

WinHelp Me.hwnd, _
App.HelpFile, _
HELP_CONTENTS, _
0

Gale.

===========================
The code below goes into General Declarations. I've included all the
HELP_ constants, just for completeness.
===========================

Private Const HELP_COMMAND As Long = &H102&
Private Const HELP_CONTENTS As Long = &H3&
Private Const HELP_CONTEXT As Long = &H1
Private Const HELP_CONTEXTMENU As Long = &HA
Private Const HELP_CONTEXTPOPUP As Long = &H8&
Private Const HELP_FINDER As Long = &HB
Private Const HELP_FORCEFILE As Long = &H9&
Private Const HELP_HELPONHELP As Long = &H4
Private Const HELP_INDEX As Long = &H3
Private Const HELP_KEY As Long = &H101
Private Const HELP_MSG_FILENAME As String = "NETH"
Private Const HELP_MULTIKEY As Long = &H201&
Private Const HELP_PARTIALKEY As Long = &H105&
Private Const HELP_QUIT As Long = &H2
Private Const HELP_SETCONTENTS As Long = &H5&
Private Const HELP_SETINDEX As Long = &H5
Private Const HELP_SETPOPUP_POS As Long = &HD
Private Const HELP_SETWINPOS As Long = &H203&
Private Const HELP_TCARD As Long = &H8000
Private Const HELP_TCARD_DATA As Long = &H10
Private Const HELP_TCARD_OTHER_CALLER As Long = &H11
Private Const HELP_WM_HELP As Long = &HC

Private Declare Function WinHelp _
Lib "user32.dll" _
Alias "WinHelpA" ( _
ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByVal dwData As Long) As Long


 
 
Richard





PostPosted: Sat Jul 03 13:33:28 CDT 2004 Top

Visual Basic >> Adding help file to project I tried to set the shortcut to none and there was no difference (in fact
I think I added it when it didn't work initially)
I also tried to get rid of the help menu completely; also no difference.

I have been trying to get this help working for over a month now. I have
other things to do on the project, but I just can't get past this
problem. I think that the next thing to try is to start a new project,
add the help file, and past everything into the form file.

Anyhow, thanks for helping




> On Sat, 03 Jul 2004 13:43:55 -0400, "Richard M. Geis"

>
>
>>It seems to me that F1 should get the job done as it does in the other
>>application, however I do have:
>>Private Sub HelpMenu_Click()
>> 'I just don't know what command should I put here
>> 'I tried .showHelp and ss Help and got error messages
>>End Sub
>
>
> If you have set the Help file name in Project/Properties then F1 will
> usually open it.
>
> However, from your previous post, you have set F1 as the shortcut key
> to your Help menu item.
>
> Go back into the Menu Editor and set the shortcut key for the menu
> item to "(none)". Then, as long as you have set the Help file name
> correctly in Project/Properties, F1 should launch it.
>
> Gale.
>

 
 
Gale





PostPosted: Sat Jul 03 13:49:17 CDT 2004 Top

Visual Basic >> Adding help file to project On Sat, 03 Jul 2004 14:33:28 -0400, "Richard M. Geis"


> I tried to set the shortcut to none and there was no difference (in fact
> I think I added it when it didn't work initially)
> I also tried to get rid of the help menu completely; also no difference.

Well, having any menu item's shortcut key set to F1 will *definitely*
stop the Help file from displaying (unless you specifically run
WinHelp in that menu item's Click event).

Gale.