N nervernerver Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #1 想实现一个这样的效果: form上面有一个bitbtn,使bitbtn从form的最左侧以5厘米/秒的速度(最好是匀速)向form的最右侧移动!
K kaida Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #2 可以用定时器改变bitbtn的坐标,不过只能跳跃式移动。要想不闪烁匀速运动,得用DirectDraw技术,用普通控件恐怕做不到。
C cnzzlp Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #3 timer的Interval设为10左右差不多了 procedure TForm1.Timer1Timer(Sender: TObject); begin BitBtn1.Left := BitBtn1.Left +1; end; procedure TForm1.Button1Click(Sender: TObject); begin Timer1.Enabled := True; end;
timer的Interval设为10左右差不多了 procedure TForm1.Timer1Timer(Sender: TObject); begin BitBtn1.Left := BitBtn1.Left +1; end; procedure TForm1.Button1Click(Sender: TObject); begin Timer1.Enabled := True; end;
N nervernerver Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #4 我也尝试过用timer,但实现起来会感觉到闪烁!
C cnzzlp Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #5 procedure TForm1.FormCreate(Sender: TObject); begin DoubleBuffered := true; end;
N nervernerver Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-24 #6 DoubleBuffered := true; 这行代码是用来干吗的?