Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thanks for the tips~ I did try thi

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
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
 
SORRY, this is my original post i was replying to ~ don't know how it turned into this new thread.
Paul


I have a need to call a "help" application provided by one of our suppliers from one of my Access forms. The help data was created using Microsoft Windows Help version 4.10.1995.

What I would like to do is when a user needs to view this help information when on a particular Access form, is to somehow allow the user to invoke this help app by clicking a button on the form. I have tried to use the Call Shell command as follows:

Dim AppName As String
AppName = "C:\GRNLITE\GLMSDS.GID"
Call Shell(AppName, 1)

When I try this, Access gives me the error message "INVALID PROCEDURE CALL OR ARGUEMENT"

Hope someone can help me here

thanks,
Paul
 
Should you not shell to the .hlp file? What shell does is the same as double clicking a file from explorer. If that does not work, then shell won't either. Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top