📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "滚动字幕"
ClientHeight = 5085
ClientLeft = 60
ClientTop = 345
ClientWidth = 7335
LinkTopic = "Form1"
ScaleHeight = 5085
ScaleWidth = 7335
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "电影字幕"
Height = 495
Left = 5880
TabIndex = 2
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "滚动字幕"
Height = 495
Left = 5880
TabIndex = 1
Top = 1200
Width = 1215
End
Begin VB.Timer Timer1
Interval = 20
Left = 6360
Top = 2880
End
Begin VB.Label Label2
Caption = "《英雄》最新消息,敬请关注各大影院及相关海报!!!"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 120
TabIndex = 3
Top = 120
Width = 7215
End
Begin VB.Label Label1
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = $"Form1.frx":0000
BeginProperty Font
Name = "隶书"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 4200
Left = 360
TabIndex = 0
Top = 1080
Width = 5670
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim iStep As Integer
Dim News As Boolean '滚动字幕标志
Dim Movie As Boolean '电影字幕标志
Private Sub Command2_Click() '显示电影字幕
Movie = True
News = False
Form1.Cls
End Sub
Private Sub Command1_Click() '显示滚动字幕
News = True
Movie = False
Form1.Cls
End Sub
Private Sub Form_Load()
Label1.Top = Me.ScaleHeight '设置Label1的初始位置
Label2.Left = Me.ScaleWidth '设置Label2的初始位置
iStep = Me.ScaleHeight \ 200
Me.Show
Timer1.Enabled = True
News = False
Movie = False
End Sub
Private Sub Timer1_Timer()
If Movie Then
Label1.Top = Label1.Top - iStep
If Label1.Top < -Label1.Height Then
Label1.Top = Me.ScaleHeight '循环显示字幕
End If
End If
If News Then
Label2.Left = Label2.Left - iStep
If Label2.Left < -Label2.Width Then
Label2.Left = Me.ScaleWidth '循环显示字幕
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -