Z ZRY Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #3 就是这样: //禁止最大化,最小化,关闭 BorderIcons := []; //允许最大化,最小化,关闭 BorderIcons := [biSystemMenu, biMinimize, biMaximize];
就是这样: //禁止最大化,最小化,关闭 BorderIcons := []; //允许最大化,最小化,关闭 BorderIcons := [biSystemMenu, biMinimize, biMaximize];
K Keyes Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #5 >>ZRY 这样还不行,Alt+F4还是能关闭, 还是截获wm_syscommand处理一下.
L liuge Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #6 >>Keyes 不用处理wm_syscommand,在此时的onColseQuery里 CanClose:=False;
L Liu JZX Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #7 屏蔽Alt+F4键只需在Form的CloseQuery事件中将CanClose:=False; 以后要关闭窗体时Form1.OnCloseQuery:=nil;close即可
Y yaoyao Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #10 procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose := MySelfCanClose; end; 简单易行. 其中MySelfCanClose是自己定义的决定窗体是否关闭的Boolean变量.
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose := MySelfCanClose; end; 简单易行. 其中MySelfCanClose是自己定义的决定窗体是否关闭的Boolean变量.
L Liu JZX Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #11 procedure WndProc(var message:TMessage);override; procedure TForm1.WndProc(var message:TMessage); begin if message.msg=WM_SYSCOMMAND then begin message.wparam:=0; end; end;
procedure WndProc(var message:TMessage);override; procedure TForm1.WndProc(var message:TMessage); begin if message.msg=WM_SYSCOMMAND then begin message.wparam:=0; end; end;
L Liu JZX Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #12 对不起,忘了写inherited procedure WndProc(var message:TMessage);override; procedure TForm1.WndProc(var message:TMessage); begin if message.msg=WM_SYSCOMMAND then message.wparam:=0; inherited; end;
对不起,忘了写inherited procedure WndProc(var message:TMessage);override; procedure TForm1.WndProc(var message:TMessage); begin if message.msg=WM_SYSCOMMAND then message.wparam:=0; inherited; end;
Z ZRY Unregistered / Unconfirmed GUEST, unregistred user! 1999-12-09 #13 Alt+F4是Windows中关闭应用程序的组合键,如果是对主窗体的话就要截获 WM_SYSCOMMAND消息,如果是程序中的其他窗体,用BorderIcons属性就行了。
K kongg Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-13 #14 将窗体的borderstyle属性设置为none,即你的窗体无边框。这样最小化和最大 化及关闭都不见了。
阿 阿蒙 Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-14 #16 一般要求只要 borderstyle bordericons 都设置为 none 就行了.
W walala Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-15 #17 heihei ctrl alt del 怎么办?还要让窗口成为屏保,有类似问题。
沈 沈前卫 Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-16 #18 在Win9X下还要处理WM_QUERYENDSESSIONX消息! To walala: 但在NT下无效.