浦 浦欣 Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-02 #2 left:=0-width; for i:=widthdo wnto 0 left:=0-width;
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-02 #3 在 for 里面加一个 sleep(N) 以实现“缓慢移动”
萧 萧月禾 Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-02 #4 上面的代码应为 left:=0-width; for i:=widthdo wnto 0do left:=0-i; 但只能到left等于0的时候,即窗体的左边贴着屏幕的边 要到屏幕中间,还要再修改
萧 萧月禾 Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-02 #5 procedure TForm1.Button1Click(Sender: TObject); var i:integer; ileft:integer; begin left:=0-width; ileft := (screen.Width - width) div 2; for i:=widthdo wnto 0do begin form1.left:=ileft-i; sleep(50); end; end;
procedure TForm1.Button1Click(Sender: TObject); var i:integer; ileft:integer; begin left:=0-width; ileft := (screen.Width - width) div 2; for i:=widthdo wnto 0do begin form1.left:=ileft-i; sleep(50); end; end;