📄 form1.frm
字号:
TabIndex = 17
Top = 960
Visible = 0 'False
Width = 1695
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "排,第"
BeginProperty Font
Name = "华文琥珀"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3960
TabIndex = 16
Top = 960
Visible = 0 'False
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "位,恭喜!"
BeginProperty Font
Name = "华文琥珀"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 6600
TabIndex = 15
Top = 960
Visible = 0 'False
Width = 1695
End
End
Begin VB.PictureBox Picture1a
AutoSize = -1 'True
Height = 8400
Left = 0
Picture = "Form1.frx":BB5B
ScaleHeight = 8340
ScaleWidth = 9510
TabIndex = 0
Top = 0
Width = 9570
Begin VB.Timer Timer1a
Enabled = 0 'False
Interval = 600
Left = 8880
Top = 6360
End
Begin VB.CommandButton Command1a
BackColor = &H00C0FFC0&
Caption = "开始"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 8280
Style = 1 'Graphical
TabIndex = 1
Top = 7080
Width = 1215
End
Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1
Height = 615
Left = 0
TabIndex = 5
Top = 7800
Width = 9495
URL = ""
rate = 1
balance = 0
currentPosition = 0
defaultFrame = ""
playCount = 1
autoStart = -1 'True
currentMarker = 0
invokeURLs = -1 'True
baseURL = ""
volume = 50
mute = 0 'False
uiMode = "full"
stretchToFit = 0 'False
windowlessVideo = 0 'False
enabled = -1 'True
enableContextMenu= -1 'True
fullScreen = 0 'False
SAMIStyle = ""
SAMILang = ""
SAMIFilename = ""
captioningID = ""
enableErrorDialogs= 0 'False
_cx = 16748
_cy = 1085
End
Begin VB.Label Label1a
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = " 读书月"
BeginProperty Font
Name = "宋体"
Size = 42
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 1020
Left = 2280
TabIndex = 4
Top = 0
Width = 4980
End
Begin VB.Label Label2a
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = " 与经典同行"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 3900
Left = 0
TabIndex = 3
Top = 1680
Width = 420
End
Begin VB.Label Label3a
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = " 潤人生底色"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 3900
Left = 8880
TabIndex = 2
Top = 2040
Width = 420
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim n As Single
Dim a As Integer, b As Integer
Private Sub Form_Activate()
Timer1a.Enabled = True
Call UnRes(101, "CUSTOM", "c:\雨的印记.wma")
WindowsMediaPlayer1.URL = "c:\雨的印记.wma"
End Sub
Private Sub Timer1a_Timer()
If Command1a.Caption = "开始" Then
Command1a.Caption = "点这里"
Else
Command1a.Caption = "开始"
End If
End Sub
Private Sub Command1a_Click()
Picture1a.Visible = False
Picture1.Visible = True
End Sub
Function UnRes(ByVal ResID As Integer, ByVal ResName As String, ByVal UnResPath As String)
Dim Temp() As Byte
Temp = LoadResData(ResID, ResName)
Open UnResPath For Binary As #1
Put #1, , Temp()
Close #1
End Function
'参数设置好
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True
WindowsMediaPlayer1.Close
Else
a = Val(Text11.Text): b = Val(Text22.Text)
Text11.Visible = False: Text22.Visible = False
Label11.Visible = False: Label22.Visible = False: Label33.Visible = False: Label44.Visible = False
Label1.Visible = True: Label2.Visible = True: Label3.Visible = True:
Text1.Visible = True: Text2.Visible = True: Text1 = "*": Text2 = "*"
Command1.Caption = "开始": Command2.Visible = True: Command3.Visible = True: Command4.Visible = True
End If
End Sub
'幸运观众的抽取
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
'时钟激活时运行
Private Sub Timer1_Timer()
Text1 = Str(Int((a - 1 + 1) * Rnd + 1))
Text2 = Str(Int((b - 1 + 1) * Rnd + 1))
End Sub
'重新设置参数
Private Sub Command3_Click()
Text11.Visible = True: Text22.Visible = True: Text11 = "": Text22 = ""
Label11.Visible = True: Label22.Visible = True: Label33.Visible = True: Label44.Visible = True
Command1.Caption = "确定"
Label1.Visible = False: Label2.Visible = False: Label3.Visible = False
Text1.Visible = False: Text2.Visible = False
Command2.Visible = False: Command4.Visible = False: Command3.Visible = False
End Sub
'结束
Private Sub Command4_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -