TApplication has On...EndSession handlers - for what event? Are these related to WM_QUERYCLOSE and WM_CLOSE, or something different? Also what's the event/purpose of OnUserInput? Of OnGetMainFormHandle? DoDi