When you say "not working", are you getting a (non-zero) window handle OK or not?
Is IsIconic returning true (non-zero)?
What dows ShowWindow return?
When minimised, is it still showing in the task bar?
Was it visible before it was minimised?
Was a sensible size set before it was minimised?
Do the main windows have any child / owned windows that could be interfering (modal dialogs in progress?)?
Are you sure that the window you are after is the MAIN window - see
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.mainwindowhandle.aspx[
^] -
The main window is the window that is created when the process is started. After initialization, other windows may be opened, including the Modal and TopLevel windows, but the first window associated with the process remains the main window.
and subsequent notes for various possible issues.