skynergy
asked on
Bring previous application instance to front
I hide my application to the system tray, then try to prevent another instance of the application to be run but are unable to bring the first instance to the front again.
Here is my code to hide the application to the system tray:
ShowWindow(Application.Han dle, SW_HIDE);
ShowWindow(Application.Mai nForm.Hand le, SW_HIDE);
to prevent I use:
Mutex := CreateMutex(nil, False, AppTitle);
if (GetLastError = ERROR_ALREADY_EXISTS) or
(Mutex = 0) then
Application.Terminate;
But how do I bring my previous instance of my application to the front?
Thanx in advance!
Here is my code to hide the application to the system tray:
ShowWindow(Application.Han
ShowWindow(Application.Mai
to prevent I use:
Mutex := CreateMutex(nil, False, AppTitle);
if (GetLastError = ERROR_ALREADY_EXISTS) or
(Mutex = 0) then
Application.Terminate;
But how do I bring my previous instance of my application to the front?
Thanx in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ziolko.