How to make my app to stay in tray icon and when any other application is active to showsUP form1

Example :
1.I start my app
2.automaticly stay only in tray (mean nothing form on the desktop, only tray)
3.waiting for any process or window (example winamp)
4.and when winamp is active then shows up form1.frm

please gimme example source code ..

thanks !