I am writing a C # application that will aggregate the management of several applications (WMP, Google Earth, etc.). For applications that I don’t write myself, I start as a process, so I have their descriptors (handle = Process.Start ("C: \ whatever.exe"), I think this is code).
In order for it to work smoothly, I need to be able to control the minimized / maximized state of each window, including the ones that I started using Process.Start (). I have seen several methods that claim this, usually requiring import of user32.dll and applying ShowWindow (handle, state).
I ask two questions. Is this the best way to do this? I am new to .NET / Windows programming (coming from * nix). Also, I couldn't get it to work, so are there any quirks that will catch the newbie?
(FYI: VS 2008 for Windows 7 RTM)
source
share