Solved

Showing a process from within a diff app.

Posted on 1997-06-01
2
186 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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