trayicon MinimizeToTray method
Return to Introduction  Previous page  Next page
Applies to
acTrayIcon component.  

procedure MinimizeToTray;  

Call MinimizeToTray method to minimize your forms or whole application (if acTrayIcon component was dropped to the main form) to the system tray area. To restore minimized window from tray - call RestoreFromTray method.  
However, acTrayIcon component can minimize forms to the system tray automatically when:  
1User clicks MinimizeToTray minimizetotray button on the form's title bar (if additional CaptionButton is Visible)  
2User selects "Minimize to Tray" menu item in the form's system menu (is ApplyToMenu property is True)  
3User clicks standard Minimize minimize button and Options property contains enabled oMinimizeToTray flag.  
4User selects any menu item, assigned to PopupMenuTrayMinimizeItem property.  

See also
RestoreFromTray method;  
IsMinimized, CaptionButton, SystemMenu, Options and PopupMenuTrayMinimizeItem properties;  
OnMinimize and OnRestore events.