procedure Tmainfrm.SpeedButtonMouseMove(Sender: TObject;Shift: TShiftState; X, Y: Integer); var J:integer; begin if ControlSpeedButtonMove[b]=false then begin mybutton.Left:=x-ScrollBox1.HorzScrollBar.Position; mybutton.Top:=y-ScrollBox1.VertScrollBar.Position; end; end; 如果要把坐标记录 下来的话 就得保存到数据库了 //可以移动了
http://www.cnread.net/cnread1/dnwl/cxsj/delphi/jcjc/023.htm
var
J:integer;
begin
if ControlSpeedButtonMove[b]=false then begin
mybutton.Left:=x-ScrollBox1.HorzScrollBar.Position;
mybutton.Top:=y-ScrollBox1.VertScrollBar.Position;
end;
end;
如果要把坐标记录 下来的话 就得保存到数据库了
//可以移动了
ControlSpeedButtonMove[b]:=false;//不可以移动了 ControlSpeedButtonMove[b]:=true;