📄 12.1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "字幕闪烁"
ClientHeight = 3555
ClientLeft = 45
ClientTop = 435
ClientWidth = 4935
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3555
ScaleWidth = 4935
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = 600
Top = 2760
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 495
Left = 3000
TabIndex = 0
Top = 2400
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "祝你考试成功"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 435
Left = 1080
TabIndex = 1
Top = 840
Width = 2700
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True '单击开始后计时器可用
Command1.Caption = "停止"
Else
Timer1.Enabled = False '单击停止后计时器不可用
Command1.Caption = "开始"
End If
End Sub
Private Sub Timer1_Timer()
Dim R As Byte, G As Byte, B As Byte
Randomize
R = Int(Rnd * 255) + 1 '随机产生RGB颜色值
G = Int(Rnd * 255) + 1
B = Int(Rnd * 255) + 1
Label1.ForeColor = RGB(R, G, B) '改变字体颜色实现文字闪烁
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -