扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:佚名 来源:BLOG 2007年10月14日
关键字:
在本页阅读全文(共4页)
Private Sub Form_Load() ' The control's name is udpPeerA With udpPeerA ' IMPORTANT: be sure to change the RemoteHost ' value to the name of your computer. .RemoteHost= "PeerB" .RemotePort = 1001 ' Port to connect to. .Bind 1002 ' Bind to the local port. End With frmPeerB.Show ' Show the second form. End Sub Private Sub txtSend_Change() ' Send text as soon as it's typed. udpPeerA.SendData txtSend.Text End Sub Private Sub udpPeerA_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String udpPeerA.GetData strData txtOutput.Text = strData End Sub |
Private Sub Form_Load() ' The control's name is udpPeerB. With udpPeerB ' IMPORTANT: be sure to change the RemoteHost ' value to the name of your computer. .RemoteHost= "PeerA" .RemotePort = 1002 ' Port to connect to. .Bind 1001 ' Bind to the local port. End With End Sub Private Sub txtSend_Change() ' Send text as soon as it's typed. udpPeerB.SendData txtSend.Text End Sub Private Sub udpPeerB_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String udpPeerB.GetData strData txtOutput.Text = strData End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。