C# - bring winform application window to the front?

Tom Knowlton
Tom Knowlton used Ask the Experts™
Is there a way to programmatically make my application be the "front" window.

My question would apply equally to if it is minimized as well as if it is not minimized or is partially behind another window.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
private static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
private static extern int SetForegroundWindow(IntPtr hWnd);

ShowWindow(hWnd, 1);


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial