为什么不能关闭了呢???
cjdbd 2003-07-01 10:54:36 procedure TForm1.SystemMinimize(var Message: TMessage);
begin
case Message.WParam of
SC_MINIMIZE:
begin
ShowWindow(handle,SW_Hide);
ShowTrayIcon();
end;
end;
end;
我做了一个系统托盘的小程序,当窗体最小化时隐藏窗体,然后出现在系统托盘中,
我用的是:
SC_MINIMIZE:
怪事发生了,当我让窗体 showWindow(handle,SW_show)后
窗体显示出来后,不能用窗体的关闭按钮了???
怎么解决??
procedure TForm1.SystemMinimize(var Message: TMessage);
begin
inherited; //加上这一句就没有问题了,不然后窗体不再影响SYSCOMMAND的消息了。
case Message.WParam of
SC_MINIMIZE:
begin
ShowWindow(handle,SW_Hide);
ShowTrayIcon();
end;
end;
end;
加了inherited; 还是不行??