用vb怎样编写文本框连续向右移动后消失又从原位置连续向右移动的程序

2024-11-27 17:43:20
推荐回答(2个)
回答1:

Private Sub Form_Load()
Text1.Text = "欢迎您来到VB的世界!"
Text1.FontSize = 16
Text1.ForeColor = vbBlue
Text1.Left = 0
Timer1.Enabled = True
Timer1.Interval = 100
End Sub

Private Sub Timer1_Timer()
Text1.Left = Text1.Left + 50
If Text1.Left > Form1.Width Then Text1.Left = 0
End Sub

回答2:

用timer控件