Bringing an application to the front - Programmer
This is a discussion on Bringing an application to the front - Programmer ; Given an application's process ID, how can I bring the entire
application (and all of its Windows, not a specific window) to the
front?
I'd like an Win32 C API answer if possible.
I've seen references to "AppActivate" for Visual ...
-
Bringing an application to the front
Given an application's process ID, how can I bring the entire
application (and all of its Windows, not a specific window) to the
front?
I'd like an Win32 C API answer if possible.
I've seen references to "AppActivate" for Visual Basic (or is it WSH?).
Is there a Win32 C API equivalent?
- Paul
-
Re: Bringing an application to the front
"Paul J. Lucas" wrote in
message news:v7jLh.3969$Qw.2462@newssvr29.news.prodigy.net ...
> Given an application's process ID, how can I bring the entire
> application (and all of its Windows, not a specific window) to the
> front?
>
> I'd like an Win32 C API answer if possible.
First you need to find the overlapped main window of the application. If you
knew to Caption text and/or Class name of the window then you would use
GetWindow().
But knowning only the process ID i think you will need to enumerate all top
level (EnumWindows) and call GetWindowThreadProcessId to see if you find a
window that was created by the given process.
> I've seen references to "AppActivate" for Visual Basic (or is it WSH?).
Yes, the reference shows such methods but they may be based on internal
storage of metadata...
> Is there a Win32 C API equivalent?
Not that i have bumped into.
- Sten