How to run a file with it's default program

That's all I want to know, and also if you could tell me of a good control to replace the TImage as I need jpg and gif support(is this possible?).

thanks.
pin_plunderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RohanGregCommented:
use the ShellExecute Function

ShellExecute ( 'Open', 'Explore', FolderName, 0, 0, SW_SHOWMAXIMIZED)
0
pin_plunderAuthor Commented:
Undeclared identifier ShellExecute

I tried this before and got the same error. What am I doin wrong?
0
rfedykCommented:
You need to have ShellAPI in your USES statement.

Regarding JPG, GIF support, you have to purchase an external library to do that. I currently uses VISIMAGE from Visionary Solutions, www.visolu.com, but there are others including Lead Technologies and Sequoia.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kubeerjaCommented:
in uses clause add

uses shellapi ;

and use this function

ShellExecute(self.Handle,'Open',pChar(fileName),'','',SW_SHOWMAXIMIZED);
0
pin_plunderAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.