📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3060
ClientLeft = 120
ClientTop = 420
ClientWidth = 4560
LinkTopic = "Form1"
ScaleHeight = 3060
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 4200
Top = 5160
End
Begin VB.CommandButton Command3
Caption = "归零滚动"
Height = 615
Left = 5640
TabIndex = 6
Top = 2880
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "结束"
Height = 615
Left = 6720
TabIndex = 5
Top = 2040
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 615
Left = 4440
TabIndex = 4
Top = 2040
Width = 1695
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00C0FFFF&
Caption = "good luck!"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 2535
Left = 840
TabIndex = 3
Top = 2040
Width = 3495
End
Begin VB.Label Label3
Alignment = 2 'Center
BackColor = &H00C0FFFF&
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 615
Left = 6120
TabIndex = 2
Top = 480
Width = 1695
End
Begin VB.Image Image1
Height = 1920
Left = 5640
Picture = "Form1.frx":0000
Top = 3720
Width = 1920
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H00C0FFFF&
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 615
Left = 3660
TabIndex = 1
Top = 480
Width = 1695
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00C0FFFF&
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 615
Left = 1200
TabIndex = 0
Top = 480
Width = 1695
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()
Label4.Caption = "good luck !"
Image1.Visible = False
Timer1.Enabled = False
Label1.Caption = Int(Rnd() * 10)
Label2.Caption = Int(Rnd() * 10)
Label3.Caption = Int(Rnd() * 10)
If Val(Label2.Caption) = 8 And (Val(Label3.Caption) = 8 And Val(Label1.Caption) = 8) Then
Label4.Caption = "恭喜中奖1000元"
Image1.Visible = True
ElseIf Val(Label1.Caption) = 8 And Val(Label2.Caption) = 8 Then
Label4.Caption = "恭喜中奖100元"
Image1.Visible = True
ElseIf Val(Label1.Caption) = 8 And Val(Label3.Caption) = 8 Then
Label4.Caption = "恭喜中奖100元"
Image1.Visible = True
ElseIf Val(Label2.Caption) = 8 And Val(Label3.Caption) = 8 Then
Label4.Caption = "恭喜中奖100元"
Image1.Visible = True
ElseIf Val(Label1.Caption) <> 8 And Val(Label2.Caption) <> 8 And Val(Label3.Caption) <> 8 Then
Label4.Caption = "再接再厉!"
Else
Label4.Caption = "恭喜中奖10元"
Image1.Visible = True
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Label4.Caption = "good luck !"
Image1.Visible = False
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Int(Rnd() * 10)
Label2.Caption = Int(Rnd() * 10)
Label3.Caption = Int(Rnd() * 10)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -