来源:www.cncfan.com | 2006-1-13 | (有2114人读过)
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;
|