作业帮 > 综合 > 作业

怎样VB 文本框从右向左移动?Text1.Left = Text1.Left + 100是向右移动,那向左呢?

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/23 02:31:25
怎样VB 文本框从右向左移动?Text1.Left = Text1.Left + 100是向右移动,那向左呢?
怎样VB 文本框从右向左移动?Text1.Left = Text1.Left + 100是向右移动,那向左呢?
Private Sub Form_Load()
Timer1.Interval = 100
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static a As Integer
If a = 0 Or Text1.Left < 0 Then
a = 100
ElseIf Text1.Left > Me.ScaleWidth - Text1.Width Then
a = -100
End If
Text1.Left = Text1.Left + a
End Su