visual basic chat client

Started by
3 comments, last by aceofjokerz 20 years, 8 months ago
ok, i''m trying to make a chat thing in VB, but it won''t work (why else would i be posting here) i basically used the code from Microsoft''s website, with a few modifications. here it is: 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. .RemotePort = 1001 '' Port to connect to. .Bind 1002 '' Bind to the local port. End With End Sub Private Sub mnuConnect_Click() udpPeerA.RemoteHost = InputBox("enter IP address for computer you wish to chat with:", "make connection") 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 ''i get an error here txtOutput.Text = strData End Sub
Advertisement
winsockvb.com


=)
Lord Hen

EDIT: In the code you posted, you never even try to connect...
mnuConnect_Click should have this line:
udpPeerA.connect 

or something...

[edited by - Lord Hen on July 28, 2003 4:08:46 PM]
quote:Original post by Lord Hen
EDIT: In the code you posted, you never even try to connect...
mnuConnect_Click should have this line:
udpPeerA.connect  

or something...
Seeing as he''s using UDP, no.

"For crying out loud, she has fishes coming out of her head on either side. How can you find this hot?!"
"If anyone sees a suspicious, camouflaged factory being carried across the desert, they should report it immediately."
Oh, crap....what was I thinking? ahahaha
Well, just check out that site...

=)
Lord Hen
thanks, guys.

This topic is closed to new replies.

Advertisement