The documentation for AppActivate(ProcessID) states…
The AppActivate function changes the
focus to the named application or
window but does not affect whether it
is maximized or minimized.
Unfortunately, it doesn’t then advise how you CAN un-Minimize an application from the task bar when you want it activated.
I can’t find something like a SetWindowState on the Process object, so given I have a ProcessID and/or a Process object, what can be done to bring the window into a Normal or Maximized state?
For unknown reasons, it appears that the Process.MainWindowHandle value returned from a VB6 application is not the appropriate value to pass to ShowWindow in order to restore the application from a minimized state.
In the situation where the application caption is not constant, the FindWindow API call is not useful. This code below provides a function that will return the handle to a running application based on the window’s caption STARTING with a specified value.
Sample usage : Identifying the IDs…
… restoring the application…
… the functional routines …