views:

132

answers:

1

I did a notifier app in C# that sits on the taskbar and display a balloon when i get something from it, similar to Google Talk when you receive a new email but at the momment it ignores if i am running an application on fullscreen or not and just do it is job.

How can i detect and make sure an application is in fullscreen mode ? I dont mean maximized(as an app could be maximized on your screen but still not in fullscreen) mode but true fullscreen.

For example when you run a game most will run in fullscreen mode.

Initially GetForegroundWindow() and GetWindowRect() came to my mind but even so i could make a window go larger then my screen if i am not on fullscreen which would'nt help me so i am wondering if there are other flags or ways to approch this.

Best regards.

+1  A: 

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.

selbie
Thanks i will check that but i was looking for a more gerenic lookup, having to actually go thru all these to check it would be sort of painfull.
Prix