📄 滚动文本框.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4905
ClientLeft = 60
ClientTop = 345
ClientWidth = 5925
LinkTopic = "Form1"
ScaleHeight = 4905
ScaleWidth = 5925
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
Height = 4755
Left = 60
ScaleHeight = 4695
ScaleWidth = 5775
TabIndex = 0
Top = 120
Width = 5835
Begin VB.Timer Timer1
Left = 420
Top = 4260
End
Begin VB.TextBox Text1
Height = 2775
Left = 60
TabIndex = 2
Text = "Text1"
Top = 660
Width = 5475
End
Begin VB.VScrollBar VScroll1
Height = 4635
Left = 5580
TabIndex = 1
Top = 0
Width = 195
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 35
VScroll1.Max = Picture1.Height
VScroll1.Min = 0 - Text1.Height
VScroll1.Value = VScroll1.Max
VScroll1.Height = Picture1.ScaleHeight
End Sub
Private Sub Timer1_Timer()
If VScroll1.Value > -(Text1.Height - 20) Then
VScroll1.Value = VScroll1.Value - 35
Else
VScroll1.Value = VScroll1.Max
DoEvents
End If
Text1.Top = VScroll1.Value
Text1.Visible = True
DoEvents
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -