I'm having a bit of a problem.I have an Air application which can be minimized to system tray.But the problem is... how do I restore it?I've been searching for days, but can't seem to find anything that might be helpful. I've also checked the developers guide.

So... the question is,How do I restore my application?

-----

ANSWER was:

How are you "minimizing" your main UI?

Are you calling NativeWindow.minimize(), setting NativeWindow.visible = false, or are you destroying the window?

- In the first case restoring the window is as easy as calling NativeWindow.restore().

- In the second, setting NativeWindow.visible = true, should do the trick.

If you are actually wondering about how to listen for mouse events on the SystemTrayIcon - you can do that by calling SystemTrayIcon.addEventListener(ScreenMouseEvent.MOUSE_DOWN) - or by adding a menu to the SystemTrayIcon and handling menu selections.

So, the window disappears, but the application still runs in the background. How, then, can users truly exit the application? Like Chris said, use the SystemTrayIcon class, add a menu item that says something like "Exit App", and have that menu item listen for the Event.SELECT event. My app is called Report Viewer, and the system tray icon menu has an item labeled Exit Report Viewer. When the user clicks that menu item, the event handler below fires, and the application exits. The code below is partial; it does not include the steps for loading the icon, creating the SystemTrayIcon object and assigning it a menu.You can find that guidance in the livedocs at http://livedocs.adobe.com/flex/3/html/taskbar_1.html#1030697

The system tray icon also has a menu item labeled Open Report Viewer. It does 2 things: 1) If the window is not visible, but the app is running in the background, it makes the window visible; 2) if the window is merely minimized, it does the same thing that clicking the taskbar icon: it restores the window.