|
-
Oct 18th, 2001, 04:55 AM
#1
Thread Starter
Fanatic Member
winsock
Hi i'm trying to make a simple chat application for me and a mate in the office.
my pc name = "Orleans05"
my mates pc name "orleans11"
now i have been trying to use the winsock control useing the UDP method as described in MSDN. I can get it ro work on my machine ( but that is pointless fro a chat app) I wounder if any one can help.
Below is the code.
code on my machine:
Option Explicit
Private Sub Form_Load()
With udpPeerA
.RemoteHost = "Orleans11"
.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
code I placed on my mates machine:
Option Explicit
Private Sub Form_Load()
With udpPeerB
.RemoteHost = "Orleans05"
.RemotePort = 1002
.Bind 1001
End With
End Sub
Private Sub txtSend_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
hope some one can help.
p.s for once one of Karl moores tut's was little help( sorry Karl , I do love your tuts)
Useful Links
.Net
#Develop, GhostDoc, CodeKeep , be.PINVOKE, Good Code Snippet Site
Krypton Toolkit, XPCC / XP Common Controls, QSS Windows Forms Components
VB.COM
VB.Classic Help File, MB Controls, MZTools, ADO Stored Procedure Generator add-in,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|