简体   繁体   中英

How to check whether Flex AIR application is minimized to system tray or not?

I have an AIR Application in which i am monitoring a server. By Default, it will be minimized to system tray. Whenever server sends an alert, then minimized application in system should display a message similar to outlook(Alerts similar to, when a new message comes).

My problem is, How to check whether an AIR application is minimized to system tray or not.i have tried the following condition

if( this.stage.nativeWindow.displayState == NativeWindowDisplayState.MINIMIZED)
{
    //Write code here
}

But this code didn't work. The condition is always false. When i have debugged and tried to see the values of the displaystate, it is always having maximized state.

I am not sure, where i am doing wrong.

Can anybody, please help me to find out the condition for checking whether the application is minimized to system tray or not.

if your window is not visible it doesn't necessarily mean it is minimized.

if the window is a lightweight window, you could simply manage it's visiblility by polling for the NativeWindow's visible property .


more: Adobe AIR - Managing Windows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM