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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with ShellExecute. 2

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA

I have happily been using the code below .... but suddenly (having made some changes to my software) instead of producing my HelpFile I merely end up with the folder containing the Help File.

Can someone throw some light on this please?

(By the way I do have ShellAPI in the uses clause. :- )


procedure TfrmMainForm.btbtnHelpClick(Sender: TObject);
begin
ShellExecute(hInstance, 'OPEN', PChar(Application.HelpFile), nil, nil, sw_Normal);
end;
 
Make sure that
Code:
Application.HelpFile
has the help file name, not just the directory. It is just a string (i.e. not validation) and can get garbled.

Cheers
 
Debug:
[tt]ShowMessage(Application.HelpFile);[/tt]
 
Hey fellllaaaaaaaaaaaaasss!!

It helps to go to Projects->Options->Application and
tell poor old Delphi in "Äpplication Settïngs" that
one has deemed it appropriate to call up a Help File
now and then. :) :)

Why didn't you lads remind me that I had re-installed Delphi (not to mention W2K) in between??

Geeeeeee!! You could have been more helpful!! :) :)

Nevertheless you both merit a star - for pointing me in the right direction.

I feel such and ass!! :-(
 
The only reason we knew the probable cause is because we have made this mistake (and so, so many more).

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top