VB 文本框内容移动问题

2025-03-24 01:35:58
推荐回答(2个)
回答1:

Dim n As Integer, s As String Private Sub Form_Click() Text1.Text = "sudjfhkasjdfhkasjfhkasjhfkashfk;aasfasdffg" n = Len(Text1) s = Text1.Text & Text1.Text Timer1.Enabled = True End Sub Private Sub Form_Load() Timer1.Enabled = False End Sub Private Sub Timer1_Timer() Static i As Integer i = i + 1 If i > n Then i = 1 End If Text1.Text = Mid(s, i, n) End Sub 这个代码可以帮你实现这功能,需以个时钟控件和文本框

回答2:

在内容前加空格就移动了,用循环一个一个加就行了