首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

这样的程序该如何做

2012-02-14 
这样的程序该怎么做?我想要的效果是当鼠标准备点击button1时,button1立即跑到别的地方,而button2则移动到b

这样的程序该怎么做?
我想要的效果是
当鼠标准备点击button1时,button1立即跑到别的地方,而button2则移动到button原先的位置,这样的程序该怎么做?

[解决办法]
procedure TForm1.Button1Click(Sender: TObject);
var
Pos:Trect;
begin
Pos:=button1.BoundsRect;
button1.BoundsRect:=button2.BoundsRect;
button2.BoundsRect:=pos;
end;

热点排行