Solved

Showing a process from within a diff app.

Posted on 1997-06-01
2
180 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
2 Comments
 
LVL 1

Accepted Solution

by:
jackb022197 earned 100 total points
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now