Hello everyone
I wish to write a program wich run and close two difrent program. And when it run one of these two program second one truning of. Actually this program should controlling rwo another programs.
And BTW I can start another program whic iss install on windows but I can´t close this program and after that automatically run second program.
is there any way to use somthing like this for close program:
thi is run program:
system("start C:\\Appfolder\\name.exe")
but for close porgram I don´t know how to do that
No, if you use system() you have to wait until the program finishes. There are though ways to close the program, again depending on your OS. If you're on windows you can use the SendMessage function to send a WM_CLOSE message to the window of the process you want to terminate.
Problem staying
Now I will replay what I wish to do in my program I wish run two diferent progrqams which are in my OS (Windpws). And when writen program running automaticaly switching from program to program
Example:
Run program 1 and if in this time runing program 2 than close it (program 2)
Please do not give me complete source code of this program.
Give me just function which run one program, function which close one program and function which will be controling the user (when he/she close program).
I was trying Create Process () and similar but I don´t understand code and compiler (GCC) always displaying error.
info I using wxDev c++ - IDE
Can anyone write toutrrial in this mode which are other toutrials in this site (A lot of examples) I will be very happy if anyone do this.
Please help anyone who can.