📄 st1.frm
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{22D6F304-B0F6-11D0-94AB-0080C74C7E95}#1.0#0"; "MSDXM.OCX"
Begin VB.Form frmS1
AutoRedraw = -1 'True
BorderStyle = 3 'Fixed Dialog
ClientHeight = 10065
ClientLeft = 11130
ClientTop = 1005
ClientWidth = 15270
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
Picture = "st1.frx":0000
ScaleHeight = 671
ScaleMode = 3 'Pixel
ScaleWidth = 1018
WindowState = 2 'Maximized
Begin MSWinsockLib.Winsock udpClient
Left = 14040
Top = 0
_ExtentX = 741
_ExtentY = 741
_Version = 393216
Protocol = 1
End
Begin MediaPlayerCtl.MediaPlayer MediaPlayer1
Height = 495
Left = 10080
TabIndex = 2
Top = 600
Visible = 0 'False
Width = 495
AudioStream = -1
AutoSize = 0 'False
AutoStart = 0 'False
AnimationAtStart= -1 'True
AllowScan = -1 'True
AllowChangeDisplaySize= -1 'True
AutoRewind = 0 'False
Balance = 0
BaseURL = ""
BufferingTime = 5
CaptioningID = ""
ClickToPlay = -1 'True
CursorType = 0
CurrentPosition = -1
CurrentMarker = 0
DefaultFrame = ""
DisplayBackColor= 0
DisplayForeColor= 16777215
DisplayMode = 0
DisplaySize = 4
Enabled = -1 'True
EnableContextMenu= -1 'True
EnablePositionControls= -1 'True
EnableFullScreenControls= 0 'False
EnableTracker = -1 'True
Filename = "DRUMROLL.WAV"
InvokeURLs = -1 'True
Language = -1
Mute = 0 'False
PlayCount = 1
PreviewMode = 0 'False
Rate = 1
SAMILang = ""
SAMIStyle = ""
SAMIFileName = ""
SelectionStart = -1
SelectionEnd = -1
SendOpenStateChangeEvents= -1 'True
SendWarningEvents= -1 'True
SendErrorEvents = -1 'True
SendKeyboardEvents= 0 'False
SendMouseClickEvents= 0 'False
SendMouseMoveEvents= 0 'False
SendPlayStateChangeEvents= -1 'True
ShowCaptioning = 0 'False
ShowControls = -1 'True
ShowAudioControls= -1 'True
ShowDisplay = 0 'False
ShowGotoBar = 0 'False
ShowPositionControls= -1 'True
ShowStatusBar = 0 'False
ShowTracker = -1 'True
TransparentAtStart= 0 'False
VideoBorderWidth= 0
VideoBorderColor= 0
VideoBorder3D = 0 'False
Volume = -600
WindowlessVideo = 0 'False
End
Begin VB.Shape Shape3
FillColor = &H000000FF&
FillStyle = 0 'Solid
Height = 1095
Left = 9000
Top = 120
Visible = 0 'False
Width = 735
End
Begin VB.Shape Shape2
FillColor = &H0000FFFF&
FillStyle = 0 'Solid
Height = 1095
Left = 8040
Top = 120
Visible = 0 'False
Width = 735
End
Begin VB.Line Line4
X1 = 24
X2 = 40
Y1 = 88
Y2 = 104
End
Begin VB.Line Line3
X1 = 992
X2 = 1008
Y1 = 104
Y2 = 88
End
Begin VB.Line Line2
X1 = 992
X2 = 1008
Y1 = 696
Y2 = 712
End
Begin VB.Line Line1
X1 = 40
X2 = 24
Y1 = 696
Y2 = 712
End
Begin VB.Label Label1
BackColor = &H00FF0000&
Caption = "100"
BeginProperty Font
Name = "楷体_GB2312"
Size = 480
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 8895
Left = 600
TabIndex = 0
Top = 1560
Width = 14295
End
Begin VB.Shape Shape1
BackStyle = 1 'Opaque
BorderColor = &H00000000&
BorderWidth = 2
FillColor = &H00C0C0C0&
FillStyle = 0 'Solid
Height = 9375
Left = 360
Top = 1320
Width = 14775
End
Begin VB.Label Label2
BeginProperty Font
Name = "楷体_GB2312"
Size = 63.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 360
TabIndex = 1
Top = 0
Width = 7335
End
End
Attribute VB_Name = "frmS1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
udpClient.SendData "click"
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
udpClient.SendData "click"
End Sub
Private Sub Form_Load()
'控件的名字为 udpPeerB。
With udpClient
'重点:必须将 RemoteHost 的值改为
'计算机的名字。
.RemoteHost = "192.168.0.7"
.RemotePort = 2006 '要连接的端口。
.Bind 1006 '绑定到本地的端口上。
End With
udpClient.SendData "click"
End Sub
Private Sub Label1_Click()
udpClient.SendData "click"
End Sub
Private Sub Label2_Click()
udpClient.SendData "click"
End Sub
Private Sub udpClient_DataArrival _
(ByVal bytesTotal As Long)
Dim strData As String
udpClient.GetData strData
Dim aaa As String
If Left(strData, 1) = "1" Then
aaa = Mid(strData, 2, 20)
If Label1.Caption > aaa Then
MediaPlayer1.FileName = "DRIVEBY.WAV" '减分声音
MediaPlayer1.Play
Else
MediaPlayer1.FileName = "LOGOFF.WAV"
MediaPlayer1.Play
End If
Label1.Caption = Mid(strData, 2, 20)
End If
If Left(strData, 1) = "2" Then
Label2.Caption = Mid(strData, 2, 20)
End If
If Left(strData, 1) = "3" Then
If strData = "31" Then
Shape2.Visible = True
MediaPlayer1.FileName = "REDCARD.WAV" '减分声音
MediaPlayer1.Play
Else
Shape2.Visible = False
End If
End If
If Left(strData, 1) = "4" Then
If strData = "41" Then
Shape3.Visible = True
MediaPlayer1.FileName = "REDCARD.WAV" '减分声音
MediaPlayer1.Play
Else
Shape3.Visible = False
End If
End If
If Left(strData, 1) = "5" Then
MediaPlayer1.FileName = "START.WAV" '减分声音
MediaPlayer1.Play
End If
If Left(strData, 1) = "6" Then
MediaPlayer1.FileName = "REDCARD.WAV" '减分声音
MediaPlayer1.Play
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -