?
Solved

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

Posted on 2001-06-18
5
Medium Priority
?
152 Views
Last Modified: 2010-05-03
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
0
Comment
Question by:chvsuresh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6201958
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
0
 
LVL 33

Accepted Solution

by:
hongjun earned 150 total points
ID: 6201995
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7135248
A request has been made (http://www.experts-exchange.com/cleanup/Q_20320181.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
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7135252
A request has been made (http://www.experts-exchange.com/cleanup/Q_20320181.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
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7137008
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
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question