DrizztTheDrow
New member
- Joined
- Jan 27, 2007
- Messages
- 3
- Programming Experience
- 1-3
I programmed alot in VB, but never anything in VB.net i need help with a simple message displaying thing.i just want, one person types something into a textbox, and antoher person can click refresh and a msg goes up (same as the one in host). i really suck right now, so all i have is.. and i dont even know if it is right.
Host/person who types in message
Client/receiving message
Host/person who types in message
Imports System.Threading
Imports System.Net
Imports System.Net.Sockets
Imports System.IO
PublicClass Form1
Dim client As System.Net.Sockets.TcpListener
PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim msg AsString
msg = TextBox1.Text
EndSub
EndClass
Client/receiving message
Imports System.Threading
Imports System.Net
Imports System.Net.Sockets
Imports System.IO
PublicClass Form1
Dim host As System.Net.Sockets.TcpClient
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim host AsNew System.Net.Sockets.TcpClient("192.168.1.152", "5555")
host.GetStream()
EndSub
PrivateSub Form1_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
EndSub
EndClass