This topic is now archived and is closed to further replies.


visual basic chat client

Recommended Posts

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

Share this post

Link to post
Share on other sites
Original post by Lord Hen
EDIT: In the code you posted, you never even try to connect...
mnuConnect_Click should have this line:

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."

Share this post

Link to post
Share on other sites