Detect if window isn't active?

BlitzMax Forums/BlitzMax Beginners Area/Detect if window isn't active?

po(Posted 2006) [#1]
How would I detect when a window stops becoming active by, say, clicking on a different program's window? If GadgetDisabled(window)=True doesn't seem to work.


Garrett(Posted 2006) [#2]
In the Docs, look for "Event Objects" Event Messages to look at are:

EVENT_APPSUSPEND
EVENT_APPRESUME
    WaitEvent()
    Select EventID()
    Case EVENT_APPSUSPEND
     ' Your app no longer is the active window.
    Case EVENT_APPRESUME
     ' Your app is now the active window.
    End Select

-Garrett


po(Posted 2006) [#3]
Ah, thanks.


Mordax_Praetorian(Posted 2006) [#4]
Aha, I've been wondering about this stuff for a while now

Very very useful, ty