PDA

View Full Version : Runing 4 aplications ( one by one ) using pause command



melissa
01-03-2008, 10:54 AM
hi every one

i have 4 application to run using one button

but when the first application begin the others must pause till the first one finish

and a same for application 2 when it start the others must pause

so i want to run them one by one , and this is the names of my applications :

MyWork1

MyWork2

MyWork3

MyWork4

i hope i find help from you

thanks

mindstitchdr
01-03-2008, 11:29 AM
I believe this is what you are looking for:


File.Run("AutoPlay\\Docs\\MyWork1.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyWork2.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyWork3.exe", "", "", SW_SHOWNORMAL, true);
File.Run("AutoPlay\\Docs\\MyWork4.exe", "", "", SW_SHOWNORMAL, true);

You will notice the WaitForReturn is set to true. This will make the first app run and wait until it is finished before moving on to the next one.

melissa
01-04-2008, 07:48 AM
thanks a lot mindstitchdr , i`m gonna try it