I have SpeedButton on my form and I want it open avi file with associated program.I tried Windows.winexec but it doesn't seem to be worked.
+14
A:
You want ShellExecute - see http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx for the API and also this link http://delphi.about.com/od/windowsshellapi/a/executeprogram.htm for details of how to use it from Delphi.
anon
2010-01-02 15:31:23
I tried but it gives compilation error: Undeclared identifier
Azad Salahli
2010-01-02 15:39:29
If it doesn't compile, edit your question to include the code that doesn't compile.
anon
2010-01-02 16:03:03
@Azad Salahli, add `ShellApi` in the `uses`.
Nick D
2010-01-02 16:06:52
It worked. Thanks for your help.
Azad Salahli
2010-01-02 16:11:21
@Azad Salahli, you should mark this as an accepted answer, then.
_J_
2010-01-04 15:19:50