当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Detect if user has any application running in fullscreen

问题描述:

This question already has an answer here:

  • Is there a way to check to see if another program is running full screen

    1 answer

网友答案:

For PowerPoint, see this MS KB article here: http://support.microsoft.com/kb/913045

Screen Saver: Windows API: FindWindow("WindowsScreenSaverClass"). (For more details see this web article: http://bobmoore.mvps.org/Win32/w32tip22.htm - it has a more detailsd way to do it, but I think FindWindow will work ok for you)

For detecting if a full screen game is in use: IDirect3DDevice9::TestCooperativeLevel http://msdn.microsoft.com/en-us/library/bb174472(VS.85).aspx

Otherwise, I think you are on the right path with GetForegroundWindow, GetWindowRect, and other window positioning api.

Things get complicated with you have more than one monitor - so don't forget that scenario as it relates to your app.

分享给朋友:
您可能感兴趣的文章:
随机阅读: