Can anyone tell me what is wrong with this?? I got the exact code from microsoft. All i am trying to do is a simple chat, for my network at my house. thanks
Form 1:
Form 2:Code:Private Sub Form_Load() With udpPeerA .RemoteHost = "PeerB" .RemotePort = 1001 .Bind 1002 End With frmPeerB.Show End Sub Private Sub txtSend_Change() 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
thanksCode:Private Sub Form_Load() With udpPeerB .RemoteHost = "PeerA" .RemotePort = 1002 .Bind 1001 End With End Sub Private Sub Text1_Change() 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




Reply With Quote