procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if ssMiddle in Shift then ... end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if ssMiddle in Shift then ... end;
通过判断mouseDown事件中的shift变量的值,例如: Form1.FormMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;x,y:integer); if shift>=[ssMiddle] then do sth;
begin
if ssMiddle in Shift then
...
end;
begin
if ssMiddle in Shift then
...
end;
Form1.FormMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;x,y:integer);
if shift>=[ssMiddle] then do sth;