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

executing an application

Status
Not open for further replies.

dakkarin

Instructor
Nov 11, 2005
76
TR
does anyone know how can i execute an application within borland ?

Liars Do Not Fear The Truth If There Are Enough Liars
 
Look at the FAQ for this forum. :)


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
why what is wrong with that?

Liars Do Not Fear The Truth If There Are Enough Liars
 
why what is wrong with that?
Sorry, you lost me there.

faq101-1950, faq101-1951, faq101-1952, faq101-1953, and faq101-1954 tell how to run an app from C++.

James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 

Below excerpt from Windows SDK


The ShellExecute function opens or prints a specified file. The file can be an executable file or a document file. See ShellExecuteEx also.

HINSTANCE ShellExecute(

HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);


end of excerpt

So to open an application called MyApp.exe from Form1 would be :

ShellExecute( Handle, "open","MyApp.exe",NULL,NULL,SW_SHOW );

Hope this helps...

Regards

BuilderSpec

 
Thanks so much to everyone

Liars Do Not Fear The Truth If There Are Enough Liars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top