Thanks for the tips~ I did try this however could not get it to work because i have no way to pass the help routine supplied by the vendor with a "help context id" ~ so my only option now is to invoke this .hlp file using the following method you described by another tipster, I just need a little more help getting it to work ~
TIP:
You'll need to use the ShellExecute API. Check out this article.
API: Start an app with ShellExecute
Terry
------------------------------------
Terry, thanks for the tip and link
Unfortunately I cannot get it to work; also, I do not seem to have VB help here on my pc for the api calls.
I am not a vb programmer so am a little confused by the sample code; it appears there are two (2) functions in that sample. I did try to paste all the code into an access module and then invoke the fHandleFile function passing it the path to the help file. It ran the function and i could see that it did bet the path name ok in the parameter i sent it but still it gave me an error. by the way, i did not notice that the first function ran at all :
Private Declare Function apiShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
etc etc
(maybe this is not supposed to "run" and is merely a way of defining what is going on in the real function?)
in any event, i invoked the function from my Form button in an event as follows :
if fHandleFile("C:\GLMSDS\GLMSDS.HLP",1)then
endif
the error message i got was "Bad DLL calling convention".
I cannot find any help on calling a dll ;-(
I noticed that in the lRet = apiShellExecute(hWndAccessApp, vbNullString, _
stFile, vbNullString, vbNullString, lShowHow)
statement the "hWndAccessAPP" would not display a value while the stFile did have the path and help file name in it and the "1ShowHow" field had a 1 and the rest of the values were null as expected. Could it be the "hWndAccessAPP" is the problem ? (i am not calling an Access App so don't know what this parameter is supposed to be).
I also tried the:
'Try the OpenWith dialog
varTaskID = Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " _
& stFile, WIN_NORMAL)
method and did get the dialog window asking which program to use to open the file however, alas, Windows help was not in the list of options.
Have any of you VB programmers had experience using this sort of shell execute ?
thanks
Paul
TIP:
You'll need to use the ShellExecute API. Check out this article.
API: Start an app with ShellExecute
Terry
------------------------------------
Terry, thanks for the tip and link
Unfortunately I cannot get it to work; also, I do not seem to have VB help here on my pc for the api calls.
I am not a vb programmer so am a little confused by the sample code; it appears there are two (2) functions in that sample. I did try to paste all the code into an access module and then invoke the fHandleFile function passing it the path to the help file. It ran the function and i could see that it did bet the path name ok in the parameter i sent it but still it gave me an error. by the way, i did not notice that the first function ran at all :
Private Declare Function apiShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
etc etc
(maybe this is not supposed to "run" and is merely a way of defining what is going on in the real function?)
in any event, i invoked the function from my Form button in an event as follows :
if fHandleFile("C:\GLMSDS\GLMSDS.HLP",1)then
endif
the error message i got was "Bad DLL calling convention".
I cannot find any help on calling a dll ;-(
I noticed that in the lRet = apiShellExecute(hWndAccessApp, vbNullString, _
stFile, vbNullString, vbNullString, lShowHow)
statement the "hWndAccessAPP" would not display a value while the stFile did have the path and help file name in it and the "1ShowHow" field had a 1 and the rest of the values were null as expected. Could it be the "hWndAccessAPP" is the problem ? (i am not calling an Access App so don't know what this parameter is supposed to be).
I also tried the:
'Try the OpenWith dialog
varTaskID = Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " _
& stFile, WIN_NORMAL)
method and did get the dialog window asking which program to use to open the file however, alas, Windows help was not in the list of options.
Have any of you VB programmers had experience using this sort of shell execute ?
thanks
Paul