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!

Opening a folder from an edit box

Status
Not open for further replies.

beier

Technical User
May 6, 2006
10
DK
what i wanna do is, to be able to write a custom path in an edit box, and then open that folder clicking a button..
I tryed
ShellExecute("EXPLORE", "open", string , NULL, NULL, SW_SHOWNORMAL);
the string is a widestring that i have saved the path to.

it would probally be bedst if I could take the path directly from the edit box, instead of using a variable.

Im pretty new to this, but i'll be glad if someone would tell me what to do to make it work.
 
In one of my own programs, I find:
[tt]
STARTUPINFO i={sizeof(i)};
PROCESS_INFORMATION p;
CreateProcess
(
0,((String)"explorer \""+dir+"\"").c_str(),
0,0,0,0,0,0,&i,&p
);
[/tt]
where "dir" is the path of the required directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top