Hi,
This is my first post here, I've used the search function but couldn't find what I was looking for...
So here's my problem/request: I've created an application using kixscript and kixforms.
When this application is launched it starts another executable (program2.exe). This program2.exe is started minimized by using the "start /MIN program2.exe" command.
I created a button that launches program2.exe when it's clicked. However when someone clicks this button it launches another instance of program2.exe, instead of maximizing it from the taskbar.
So I created some sort of workaround that kills program2.exe using the StopProc() process (found here on kixtart.org) and then launches it again.
Unfortunately this is not the way it should work, program2.exe should keep on running and maximize when someone clicks the button in the application. It should not be running twice either.
So I was wondering if there's a way to do the following:
- Check if program2.exe is running - Maximize/activate program2.exe if it is running
If this would exist (for example functions called ProcRunning and ProcActivate) I can then put this function under the button like:
If ProcRunning(program2.exe) ProcActivate(program2.exe) Else Run program2.exe EndIf
I hope someone can help me out. Thanks in advance!
Regards, Jeroen
Edited by Laggetjeuh (2009-05-05 08:50 AM) Edit Reason: typos
|