当我们把QQ(100分)

  • 主题发起人 主题发起人 visual_cjiajia
  • 开始时间 开始时间
V

visual_cjiajia

Unregistered / Unconfirmed
GUEST, unregistred user!
1)"OICQ“不用我多说了吧,然而,当我们把QQ<br>&nbsp; 主窗体拖到桌面顶部后,放开鼠标,他就会自动<br>&nbsp; 缩上去,鼠标移到他身上时又会重新出现!<br>&nbsp; 大富翁上的高手说在<br>&nbsp; procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;<br>&nbsp; procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;<br>&nbsp; 在这两个消息映射中实现,然而不管我怎么写<br>&nbsp; 我的窗体都没反应(不会动),请问谁有研究过<br>&nbsp; 教我一下吧?<br><br>我写了但没用:<br>procedure TForm1.CMMouseEnter(var message: TMessage);<br>begin<br>{if top=-17 then<br>begin//2<br>Height:=65 ;<br>SetCapture(Handle);<br>end;//2 &nbsp; &nbsp; // 激活窗口<br>}<br>&nbsp;case Message.Msg of<br>&nbsp; &nbsp; CM_MOUSEENTER:begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SetCapture(Handle);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if Self.Height &lt;= 0 then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.Height := 30;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.Invalidate;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; end;<br><br><br>end;<br><br>procedure TForm1.CMMouseLeave(var Message: TMessage);<br>//var<br>// &nbsp;Pt: TPoint;<br>begin<br>&nbsp; {GetCursorPos(Pt);<br>&nbsp; if not PtInRect(Bounds(Left, Top, Width, Height), Pt)<br>&nbsp; then &nbsp;// 做此判断为过滤<br>&nbsp; begin//1<br>&nbsp; &nbsp;if top=-17 then<br>&nbsp; &nbsp;begin//2<br>&nbsp; &nbsp; Height:=1;<br>&nbsp; &nbsp; ReleaseCapture;<br>&nbsp; &nbsp;end;//2<br>&nbsp; &nbsp;end;//1<br>&nbsp; }<br>&nbsp;case Message.Msg of<br>&nbsp; &nbsp; &nbsp;CM_MOUSELEAVE: begin<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if self.Height &gt; 30 then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.Height := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.Invalidate;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ReleaseCapture;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp;end;<br><br><br>end;<br><br>procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;<br>&nbsp; Shift: TShiftState; X, Y: Integer);<br>begin<br>if Button= mbLeft then<br>begin<br>ReleaseCapture;<br>SendMessage(Handle , WM_NCLBUTTONDOWN, HTCAPTION, 0);<br><br>end;<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>top:=-17;<br>left:=300;<br>height:=30;<br>end;<br><br>procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;<br>&nbsp; Shift: TShiftState; X, Y: Integer);<br>begin<br>if top&lt;0 then<br>&nbsp; &nbsp;top:=-100;<br>end;
 
这样当然不行,你只是 截获 &nbsp;自己程序的鼠标信息,藏起来啦就不行啦。<br>oicq &nbsp;应该是属于 那个 appbar &nbsp;还是 &nbsp;用另外一个 线程 &nbsp;不停的 去监测<br>鼠标信息,忘记拉,呵呵,不过 感觉用appbar &nbsp;比较好,可以拷贝代码,哈哈
 
给我一个可以运行出效果的原程序好吗?谢谢!
 
appbar只有*。DCU不给免费原代码的,而且<br>他的效果不好,停靠到上方后整个窗体长度被拉大!<br>我要的QQ的效果,窗体长度保持不变才行!
 
后退
顶部