>Great! Thanks so much! Do I need to include the declaration? It seems to work without the declaration of those variables. What are they used for anyway?
You'd include winAPI declaration :
declare long ShellExecute in "shell32.dll" ;
long hwnd, string lpszOp, ;
string lpszFile, string lpszParams, ;
string lpszDir, long nShowCmd
You need to declare once if you're not keen on resource it uses. ie: In your main.prg declare once and would be available anytime.
They're windowhandle,operation,file,parameters,workingdirectory and showwindow type. MSDN help have details of each parameter. Practically what you get is same when you dblclick a file in explorer. ie:
ShellExecute(0,'Open','c:\mp3\myFavoriteSong.mp3',0,0,0)
Cetin