📄 frmserver.frm
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmServer
Caption = "Server"
ClientHeight = 3105
ClientLeft = 60
ClientTop = 450
ClientWidth = 8775
LinkTopic = "Form1"
ScaleHeight = 3105
ScaleWidth = 8775
StartUpPosition = 3 'Windows Default
Begin MSWinsockLib.Winsock sckServerCommunication
Left = 9120
Top = 1680
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.TextBox Text1
Height = 1215
Left = 750
TabIndex = 1
Text = "Text1"
Top = 1080
Width = 7095
End
Begin VB.Label Label1
Caption = "Received Message"
Height = 255
Left = 720
TabIndex = 0
Top = 480
Width = 3015
End
End
Attribute VB_Name = "frmServer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Init.Init
sckServerCommunication.LocalPort = objServerInfo.sCommunicationPort
sckServerCommunication.Listen
End Sub
Private Sub sckServerCommunication_ConnectionRequest(ByVal requestID As Long)
If sckServerCommunication.State <> sckClosed Then
sckServerCommunication.Close
End If
sckServerCommunication.Accept requestID
End Sub
Private Sub sckServerCommunication_DataArrival(ByVal bytesTotal As Long)
' the recieved data
Dim sData As String
Static count As Integer
sckServerCommunication.GetData sData, vbString
'MsgBox "Get Data"
Text1.Text = sData
Select Case GetCommand(sData)
Case COMMAND_GETUPDATEFILE
sckServerCommunication.SendData GenerateUpdateXml(GetLocalFileInfo(LOCAL_FOLDER))
End Select
End Sub
Private Sub sckServerCommunication_SendComplete()
If sckServerCommunication.State <> sckClosed Then
sckServerCommunication.Close
End If
sckServerCommunication.Listen
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -