让DELPHI编出的程序像QQ一样
【打印文章】
private
{ Private declarations }
procedure WMMOVE(var Msg: TMessage); message WM_MOVE;
procedure CMMouseEnter(var Msg:TMessage);message CM_MouseEnter;
procedure CMMouseLeave(var Msg:TMessage);message CM_MouseLeave;
--------------------------------------------------------------
procedure TfrmMain.CMMouseEnter(var Msg: TMessage);
begin
Inherited;
if frmMain.Top<0 then frmMain.Top:=0;
Msg.Result:=0;
end;
procedure TfrmMain.CMMouseLeave(var Msg: TMessage);
var pt: TPoint;
begin
Inherited;
GetCursorPos(pt);
if PtInRect(Self.BoundsRect, pt) then Exit;
frmMain.Top:=0-frmMain.Height +5;
end;
procedure TfrmMain.WMMOVE(var Msg: TMessage);
var pt: TPoint;
begin
Inherited;
GetCursorPos(pt);
if PtInRect(Self.BoundsRect, pt) then Exit;
frmMain.Top:=0-frmMain.Height +5;
end;
{ Private declarations }
procedure WMMOVE(var Msg: TMessage); message WM_MOVE;
procedure CMMouseEnter(var Msg:TMessage);message CM_MouseEnter;
procedure CMMouseLeave(var Msg:TMessage);message CM_MouseLeave;
--------------------------------------------------------------
procedure TfrmMain.CMMouseEnter(var Msg: TMessage);
begin
Inherited;
if frmMain.Top<0 then frmMain.Top:=0;
Msg.Result:=0;
end;
procedure TfrmMain.CMMouseLeave(var Msg: TMessage);
var pt: TPoint;
begin
Inherited;
GetCursorPos(pt);
if PtInRect(Self.BoundsRect, pt) then Exit;
frmMain.Top:=0-frmMain.Height +5;
end;
procedure TfrmMain.WMMOVE(var Msg: TMessage);
var pt: TPoint;
begin
Inherited;
GetCursorPos(pt);
if PtInRect(Self.BoundsRect, pt) then Exit;
frmMain.Top:=0-frmMain.Height +5;
end;
本栏文章均来自于互联网,版权归原作者和各发布网站所有,本站收集这些文章仅供学习参考之用。任何人都不能将这些文章用于商业或者其他目的。( Pfan.cn )
【编程爱好者论坛】