Request for different behavior from "Close" menu item.
Brought to you by:
tpsfadmin
Exported from Bugzilla, issue 3636.
--- Comment added on 8/7/02 4:49:03 PM ---
Customer doesn't like PostQuitMessage in the DoCloseClick event, says it
bypasses OnCloseQuery/OnClose event handlers.
procedure TStCustomTrayIcon.DoCloseClick(Sender: TObject);
begin
TForm(Owner).Close; {!!.02}
// PostQuitMessage(0); {!!.02}
end;
Application.MainForm.Close has also been suggested.
Having to include the Forms unit
Assuming the component is owned by a TForm
Assuming the availability of the Application object
PostMessage(TForm(Owner).Handle, WM_CLOSE, 0, 0);