Sysinternals Homepage
Forum Home Forum Home > Windows Discussions > Development
  New Posts New Posts RSS Feed - How does "Window->Bring to front" work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How does "Window->Bring to front" work

 Post Reply Post Reply
Author
Message
RoboRoger View Drop Down
Newbie
Newbie
Avatar

Joined: 12 April 2006
Location: Sweden
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote RoboRoger Quote  Post ReplyReply Direct Link To This Post Topic: How does "Window->Bring to front" work
    Posted: 12 April 2006 at 1:45am

Hello.

I am writing my very own little task manager in C++. I found the right-click menu "Window->Bring to front" function in Process Explorer really cool, since it helps alot when Explorer.exe crashes or hangs.

I would like to know how this works in code? What API functions are used to get the processes to restore their windows? I've tried to solved this by sending Windows messages to the exe, but this doesn't seem to work.

Best Regards
/ Roger
Back to Top
EP_X0FF View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Status: Offline
Points: 4758
Post Options Post Options   Thanks (0) Thanks(0)   Quote EP_X0FF Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 8:37pm
Please try this - SetForegroundWindow(HWND hwnd)
Back to Top
MP_ART View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Status: Offline
Points: 947
Post Options Post Options   Thanks (0) Thanks(0)   Quote MP_ART Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2006 at 1:02am

You may also use SetWindowPos function to set window topmost style

Back to Top
MakeSense View Drop Down
Newbie
Newbie


Joined: 16 December 2016
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MakeSense Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2016 at 11:16am
you show use: SetForegroundWindow function to active the application, and then use ShowWindow function to display it in front.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.06
Copyright ©2001-2016 Web Wiz Ltd.