|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checking the window state of a running process.What is the best way to check and change the window state of a process
given either a System.Diagnostics.Process or a MainWindowHandle? I was using the following commands, but hide is not working for some reason. ShowWindow(prTarget.MainWindowHandle, SW.HIDE) ' This doesn't always work SendMessage(prTarget.MainWindowHandle, WM.SYSCOMMAND, SC.MAXIMIZE, 0) SendMessage(prTarget.MainWindowHandle, WM.SYSCOMMAND, SC.MINIMIZE, 0) SendMessage(prTarget.MainWindowHandle, WM.SYSCOMMAND, SC.RESTORE, 0) Note that prTarget is of type System.Diagnostics.Process. SW, WM, and SC are enums with the appropriately defined values. This is a repost I think from around 4 days ago
Crouchie1998 BA (HONS) MCP MCSE |
|||||||||||||||||||||||