1 2 unit Unit1; 3 4 interface 5 6 uses 7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 8 Dialogs; 9 10 type 11 TForm1 = class(TForm) 12 procedure FormCreate(Sender: TObject); 13 private 14 { Private declarations } 15 public 16 { Public declarations } 17 end; 18 19 var 20 Form1: TForm1; 21 22 implementation 23 24 {$R *.dfm} 25 26 procedure TForm1.FormCreate(Sender: TObject); 27 28 var 29 hMenuHandle : HMENU; 30 begin 31 hMenuHandle := GetSystemMenu(Form1.Handle, FALSE); 32 if (hMenuHandle <> 0) then 33 DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND); 34 end; 35 36 end.