1)private procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
begin
Message.Result := HTCAPTION
end;
2)http://www.trichview.com/
3)private procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
var
AControl: TControl;
Pt: TPoint;
begin
Pt := SmallPointToPoint(TWMNCHitTest(Message).Pos);
AControl := ControlAtPos(ScreenToClient(Pt), False);
if AControl <> nil then
begin
//测试位置,返回相应值,e.g.: HTRIGHT, HTLEFT, HTBOTTOM, HTBOTTOMRIGHT, ..., etc.
Message.Result := HTRIGHT;
end
else
inherited;
end;
4)DELPHI 自带相应的Class and RTTI (Persistent Object Run time Type Info).
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
begin
Message.Result := HTCAPTION
end;
2)http://www.trichview.com/
3)private procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
var
AControl: TControl;
Pt: TPoint;
begin
Pt := SmallPointToPoint(TWMNCHitTest(Message).Pos);
AControl := ControlAtPos(ScreenToClient(Pt), False);
if AControl <> nil then
begin
//测试位置,返回相应值,e.g.: HTRIGHT, HTLEFT, HTBOTTOM, HTBOTTOMRIGHT, ..., etc.
Message.Result := HTRIGHT;
end
else
inherited;
end;
4)DELPHI 自带相应的Class and RTTI (Persistent Object Run time Type Info).