S swpihwd Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #1 窗口在最小化时需要执行一段代码,应将代码放在什么事件中?谢谢! 在OnResize中不行。
D Door2000 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-27 #3 截获 WM_SYSCOMMAND TForm1 = class(TForm) private procedure WMSysCommand(var Message: TMessage); message WM_SYSCOMMAND; { Private declarations } procedure TForm1.WMSysCommand(var Message: TMessage); begin if Message.WParam = SC_ICON then showmessage('最小化了'); inherited; end;
截获 WM_SYSCOMMAND TForm1 = class(TForm) private procedure WMSysCommand(var Message: TMessage); message WM_SYSCOMMAND; { Private declarations } procedure TForm1.WMSysCommand(var Message: TMessage); begin if Message.WParam = SC_ICON then showmessage('最小化了'); inherited; end;