2

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.

Dinesh
  • 2,026
  • 7
  • 38
  • 60
  • Hi Dinesh, Have you done that in your project. i am asking you because you had worked on the similar functionality that i want. but i didn't know how to show the message so please help me to show the message in SystemTray. Please Reply me.. – Sagar Rawal Feb 21 '12 at 12:32
  • i have done it indirectly. It's just a workaround and it didn't give any problems till date. – Dinesh Feb 22 '12 at 03:29
  • If possible please post your code as answer on following link http://stackoverflow.com/questions/9376422/create-a-notification-window-in-adobe-air-application – Sagar Rawal Feb 22 '12 at 04:11

1 Answers1

1

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

Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162