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!

on close my program, open another

Status
Not open for further replies.

mirodel2

Technical User
Nov 4, 2002
1
BG
Hi there.
what I need to do is this: when I close my program I want to start another one simultaniously. How ?
 
We include a copy of the unit fmxUtils found in the borland demo folder: C:\Program Files\Borland\Delphi6\Demos\Doc\Filmanex. Replace Delphi6 with whatever version number you're using.

Then we call ExecuteFile like this

ExecuteFile(FileNameWithPath,'','' ,sw_ShowMaximized);

All you need is the name of the file with path, and the fourth parameter, which could also be one of these:
SW_SHOWNORMAL
SW_SHOWMINIMIZED
SW_SHOWMAXIMIZED
SW_SHOWNOACTIVATE
SW_SHOW
SW_MINIMIZE
SW_SHOWMINNOACTIVE
SW_SHOWNA
SW_RESTORE = 9;

ExecuteFile is really just a wrapper for ShellExecute(), which you could call instead (it has two more parameters, and I've never tried to use it).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top