...Disable the Close [X] button on a Form?
Author: Gianluca Colombo
procedure TFMain.FormCreate(Sender: TObject);
var
hMenuHandle: Integer;
begin
hMenuHandle := GetSystemMenu(Handle, False);
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
printed from
www.swissdelphicenter.ch
developers knowledge base