I'm creating an application that polls a server at set intervals for information. The application starts minimized and then if there is information to display, the application shows it's main window always-on-top, not activated (so when it pops up it doesn't grab focus). My problem is that when there isn't any more information to be shown, it minimizes itself. When it minimizes, it grabs the focus from whatever window has it. How can I programatically minimize my window without it taking focus?