Delphi

1 procedure TForm1.FormCreate(Sender: TObject);
2 begin
3 EnableMenuItem(GetSystemMenu(Handle, FALSE), SC_CLOSE,MF_BYCOMMAND or MF_GRAYED);
4 end;

C#

1 public Frm()
2 {
3 InitializeComponent();
4 this.ControlBox = false;
5
6 }
posted on 2011-06-20 17:13  smiling face  阅读(560)  评论(0编辑  收藏  举报