📄 frmpeerb.frm
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmPeerB
Caption = "UDP Application(2)"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox txtOutput
Height = 495
Left = 960
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 1320
Width = 2415
End
Begin MSWinsockLib.Winsock udpPeerB
Left = 360
Top = 240
_ExtentX = 741
_ExtentY = 741
_Version = 393216
Protocol = 1
End
End
Attribute VB_Name = "frmPeerB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
With udpPeerB
.RemoteHost = "10.0.0.251" '要连接到计算机的IP地址
.RemotePort = 1011 '要连接到的端口号
.LocalPort = 1010 '该Winsock控制将使用的本地端口号,便于其它方与之通讯
.Bind 1010 '将该Winsock控制绑定到该本地端口
End With
End Sub
Private Sub udpPeerB_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
udpPeerB.GetData strData, vbString
txtOutput.Text = strData
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -