tags:

views:

20

answers:

1

Hi... Here ther is one button. If we click that button pop up window will be opened.If i minimized that one and again i click that button means that minimized pop up window sholud be opened. Any idea ?

A: 

Assuming that the popup window is part of your assembly, just keep track of a reference to it when you create it on the first click and on the second click just change the WindowState of the reference, like:

frm.WindowState = FormWindowState.Normal

If the popup window is an external app you can get a handle to it via FindWindowEx and then call SetWindowPlacement. They're both Windows API methods that can be called via PInvoke. More information can be found here:

http://www.pinvoke.net/default.aspx/user32/setwindowplacement.html

ho1