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

Shellexexcute again.... :(

Status
Not open for further replies.

LoneRanger123

Programmer
Dec 19, 2000
62
0
0
GB
Okay, ShellExecute dont like me :)

I can get it to run programs, but It wont open files with the defualt viewer (which makes me Dir Browser Pretty Useless)

here is the command for a Program

ShellExecute(Handle,"open","D:\\Project2.exe",NULL,NULL,0);

and for the File

ShellExecute(Handle,"open","D:\\hi.txt",NULL,NULL,0);

do I need to change 1 of the last 3 parameters, where i looked it suggested u didnt.

and the file exists :)
 
I was able to reproduce this.
Try SW_SHOWDEFAULT (instead of 0) as the last parameter.
This worked for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top