用vb做文本浏览器自动翻页效果怎么弄

2025-05-09 06:26:02
推荐回答(1个)
回答1:

Option Explicit
Private Const VK_DOWN = &H28
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Form_Load()
Text1.Text = "好多好多文本文字..."
End Sub

Private Sub Timer1_Timer()
Text1.SetFocus
keybd_event VK_DOWN, 0, 0, 0
End Sub



Option Explicit
Dim x As Integer
Private Sub Form_Load()
x = 0
Text1.Text = "好多好多文本文字..."
End Sub

Private Sub Timer1_Timer()
x = x + 1
Text1.SelStart = x
End Sub