I have an application that runs in the tray, it has a hidden main window with a pop-up menu and a tray icon. Everything runs fine expect when I go to shut down windows it will not shut down. I don't know which message windows sends at shut down, but I tried handling (via Applicaiton.OnMessage) WM_CLOSE, WM_QUIT, WM_ENDSESSION and calling Application.Terminate for each. I put in a showmessage so I would know if the message was received. I never got the showmessage to work, so I think the application is simply not processing Windows messsages propertly. The inconsistent thing is I have a 'terminate' option on my popup menu that appears when you right click on the tray icon. If I try to close the app this way, it works fine. Anyone know why my app won't process messages?