Reputation: 183
How to determinate if one process with GetProcess(Name) is background process or not ?
Upvotes: 1
Views: 1002
Reputation: 1
There must be a better way to determine if the process is running background. For example, it can happend, that MSAccess process doesn't close correctly. The MSAccess.exe process appears under background processes list even if has MainWindowHandle...
Upvotes: 0
Reputation: 10929
For the Process
class, you can examine the MainWindowHandle
property. It will be IntPtr.Zero
if the process doesn't have a window.
Upvotes: 1