procedure DragControl(aControl:TWincontrol);
const sc_dragmove=$f012;
begin
releasecapture;
acontrol.Perform(wm_syscommand,sc_dragmove,0);
end;
const sc_dragmove=$f012;
begin
releasecapture;
acontrol.Perform(wm_syscommand,sc_dragmove,0);
end;
解决方案 »
- 关于Delphi调用webservices的一个问题,请教
- delphi 要定一个变量名为[type]怎么做
- c/s问题,求助?
- 我想知道delphi组件面板中所有ado,bde,data controls,dbexpress等数据库相关组件
- 报表的问题?在线等待!!!!!
- monthof(Date)
- Delphi的BUGS之我见
- 请问哪里有播放rm视频的控件下载?
- 请高手帮小弟看看
- Access中的时间类型数据怎么变成了日期类型数据?????
- delphi语法---stored的用法
- delphi中,怎样实现向access中的ole字段中添加,修改照片,最好有元码,我在其他数据库中可以实现这个功能,但access好像不一样
procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if SSCtrl in Shift then begin
SetCapture(Button1.handle);
Capturing:=true;
MouseDownSpot.x:=x;
MouseDownSpot.y:=y;
end;
end;procedure TForm1.Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if Capturing then begin
Button1.left:=Button1.left-(mousedownspot.x-x);
button1.top:=button1.top-(mousedownspot.y-y);
end;
end;procedure TForm1.Button1Mouseup(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if capturing then begin
releasecapture;
capturing:=false;
button1.left:=Button1.left-(mousedownspot.x-x);
button1.top:=button1.top-(mousedownspot.y-y);
end;
end;
按住ctrl键就可移动button1.