开发者

Vb.net process close event

I'm asking a question which my mind goes b开发者_JS百科lank on how it'll be coded... I'm trying to make a simple program that detects if a game closes, and when it does, it shuts down the computer.

Thanks!


Once you have the process, you can set EnableRaisingEvents to true, and the process will raise the Exited event.

As for shutting down the system - this is potentially more difficult. You can P/Invoke ExitWindowsEx, but it requires specific permissions (SE_SHUTDOWN_NAME) or it will fail.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜