Link to home
Start Free TrialLog in
Avatar of chvsuresh
chvsuresh

asked on

Get focus to the application that is already started...

Hi all,
 
   i start an executable. When i start the same executable i want to close the later one and i want the former to be on the top of the window list (or desktop)...
How can i achieve this.

rgds
suresh
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I think with the property App.PrevInstance you can check if the application is already running
Then, using the AppActivate method, you can bring the other instance to the foreground...

Hope this helps
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Netminder
Netminder

A request has been made (https://www.experts-exchange.com/questions/20320181/General-CleanUp.html) that this question be closed with the following resolution: points refund and PAQ

EXPERTS: Please leave any comment regarding this request here; I will return in seven (7) days to close the question.

Netminder
CS Moderator
A request has been made (https://www.experts-exchange.com/questions/20320181/General-CleanUp.html) that this question be closed with the following resolution: points refund and PAQ

EXPERTS: Please leave any comment regarding this request here; I will return in seven (7) days to close the question.

Netminder
CS Moderator
Although i said "i think", my comment should solve the question.
And hongjun's link is even more complete, as it includes the complete code...
CHeers