?
Solved

Showing a process from within a diff app.

Posted on 1997-06-01
2
Medium Priority
?
188 Views
Last Modified: 2010-04-06
I have used delphi and the Win API call CreateProcess to run another program when the user presses a button.  If the user presses the same button and the app is still running, I want it to be brought to the foreground.  How do I do this using the Process-Information data returned from the CreateProcess call (ie: without doing an EnumWindow or other such function)?
0
Comment
Question by:chrisk
[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 Comments
 
LVL 1

Accepted Solution

by:
jackb022197 earned 200 total points
ID: 1336733
Is this app you are starting a Win-app developed with Delphi?
If so, get a copy of the freeware JustOne component and drop this on the form of this app and recompile it. Then this all will be done for you...
The source of this freeware component is also available. So, if this first option is no option for you, check this source for further hints to solve your problem.

0
 

Author Comment

by:chrisk
ID: 1336734
Unfortunately, the programs I am running are not my own, so I cannot add the JustOne component to them.  Also, the method JustOne uses to find the previous instance is to do an EnumWindows function and look through all of the windows.  I was looking for a way to bring up the application as I already have a handle to it's process (and a process ID and a thread handle and a thread ID).  There has to be a way to get the handle to the main window from one of these handles/IDs???
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

801 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