type Tcontrolacess= class(Tcontrol);
procedure TForm3.ControlCMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Twincontrol(sender).Perform(WM_SYSCOMMAND, $F012, 0 );
end;
procedure TForm3.FormCreate(Sender: TObject);
var i:integer;
begin
for i:= 0 to componentcount -1 do
begin
if components[i] is TWincontrol then
Tcontrolacess(components[i]).onmousedown := ControlCMouseDown;
end;
end;
沒有留言:
張貼留言