Setting a foreground window with managed code

Announcements and discussion for PInvoke

Setting a foreground window with managed code

Postby yourbuddypal » Thu Dec 20, 2007 4:51 pm

There is a win32 api method (SetForegroundWindow) that can be used to set the focused window if you have the window handle. Is there a way to do this with managed code?
Posts: 1
Joined: Thu Dec 20, 2007 4:47 pm

Postby Brian Donahue » Thu Dec 20, 2007 5:13 pm


I'd happened to come across some information on this yesterday while searching doing some other research, and the consensus I get is that things like bringing the window to the front from the taskbar or giving focus seem to only be available by invoking the Windows API.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests