[ I FIGURED IT OUT ]
Thank You to anyone who had a look at the question and thought about it, even if just for a little bit
How do you solve this problem. I am making an application to run in System Tray as well. Need help.
I tried the solution recommended by Adobe:
On the Windows operating system, windows created with the types utility or lightweight do not appear on the taskbar. Invisible windows do not appear on the taskbar, either.
Because the initial window is necessarily of type, normal, in order to create an application without any windows appearing in the taskbar, you must either close the initial window or leave it invisible. To close all windows in your application without terminating the application, set the autoExit property of the NativeApplication object to false before closing the last window. To simply prevent the initial window from ever becoming visible, add <visible>false</visible> to the <initalWindow> element of the application descriptor file (and do not set the visible property to true or call the activate() method of the window).
In new windows opened by the application, set the type property of the NativeWindowInitOption object passed to the window constructor to NativeWindowType.UTILITY or NativeWindowType.LIGHTWEIGHT.
This works fine except: when an application is (accidently) launched again (when the user double clicks its short cut icon for instance), the UTILITY window is created again! I can't figure out a way to prevent this from happening. I tried using a boolean variable for it and check that and checking the titles of the windows in use by the app. But somehow it seems like a second instance of the application is created. I would be so happy if somebody could help me solving this. I've spend days on it and it the only issue holding me back from releasing my application now!