L linuxcrow Unregistered / Unconfirmed GUEST, unregistred user! 2001-11-12 #1 当用户单击最小化标签时,会发出什么消息?我如何截获它不让windows执行最小化,<br>而做我想做的!<br>用setwindowlong(application.handle,GW_EXSTYLE,WS_EX_TOOLWINDOW)时如果最小化<br>窗体就会向左下缩小到任务栏上如何不让它这么做?
当用户单击最小化标签时,会发出什么消息?我如何截获它不让windows执行最小化,<br>而做我想做的!<br>用setwindowlong(application.handle,GW_EXSTYLE,WS_EX_TOOLWINDOW)时如果最小化<br>窗体就会向左下缩小到任务栏上如何不让它这么做?
卷 卷起千堆雪tyn Unregistered / Unconfirmed GUEST, unregistred user! 2001-11-12 #2 截获WM_SYSCOMMAND消息。<br>窗体的类声明如下:<br>TForm1 = class(TForm)<br>private<br>{ Private declarations }<br>public<br>{ Public declarations }<br>procedure WMSysCommand(var Message: TWMSysCommand);message WM_SYSCOMMAND;//响应WM_SYSCOMMAND消息<br>end;<br><br>WMSysCommand的实现如下:<br>procedure TForm.WMSysCommand(var Message: TWMSysCommand);<br>begin<br>Inherited;//调用先前的处理函数<br>if (Message.CmdType and $FFF0 = SC_MINIMIZE) then<br>... //自己的处理<br>end;<br>
截获WM_SYSCOMMAND消息。<br>窗体的类声明如下:<br>TForm1 = class(TForm)<br>private<br>{ Private declarations }<br>public<br>{ Public declarations }<br>procedure WMSysCommand(var Message: TWMSysCommand);message WM_SYSCOMMAND;//响应WM_SYSCOMMAND消息<br>end;<br><br>WMSysCommand的实现如下:<br>procedure TForm.WMSysCommand(var Message: TWMSysCommand);<br>begin<br>Inherited;//调用先前的处理函数<br>if (Message.CmdType and $FFF0 = SC_MINIMIZE) then<br>... //自己的处理<br>end;<br>
D databox Unregistered / Unconfirmed GUEST, unregistred user! 2001-11-12 #3 procedure TForm1.WMSysCommand(var Message: TWMSysCommand);<br>begin<br> inherited;<br> if (Message.CmdType=SC_MAXIMIZE) or (Message.CmdType=SC_SIZE) then//最大化<br> begin<br> ...<br> end<br> else if (Message.CmdType=SC_RESTORE) then//復原<br> begin<br> ...<br> end;<br>end;
procedure TForm1.WMSysCommand(var Message: TWMSysCommand);<br>begin<br> inherited;<br> if (Message.CmdType=SC_MAXIMIZE) or (Message.CmdType=SC_SIZE) then//最大化<br> begin<br> ...<br> end<br> else if (Message.CmdType=SC_RESTORE) then//復原<br> begin<br> ...<br> end;<br>end;