helpdesk98 Posted April 17, 2009 Share Posted April 17, 2009 I have been trying to create a basic instant messenger for a Local Area Network, but I can not figure out ware to start I found a method that work for VB 6 but I am using VB 2008 so the setup is not the same.Private Sub cmdclose_Click()sckMain.Closetxtlog = txtlog.Text & "Connection closed!" & vbCrLfEnd SubPrivate Sub cmdConnect_Click()sckMain.RemoteHost = txtip.TextsckMain.RemotePort = txtport.TextsckMain.ConnectEnd SubPrivate Sub cmdHost_Click()sckMain.LocalPort = txtport.TextsckMain.ListenEnd SubPrivate Sub cmdsend_Click()sckMain.SendData "[" & txtname.Text & "] " & txtsend.Texttxtlog = txtlog.Text & "[" & txtname & "] " & txtsend.Text & vbCrLftxtsend.Text = ""End SubPrivate Sub Command1_Click()MsgBox ("Enter the host IP to connect Only 2 Peers can Talk at one time")End SubPrivate Sub sckMain_ConnectionRequest(ByVal requestID As Long)If sckMain.State <> sckClose ThensckMain.CloseEnd IfsckMain.Accept requestIDtxtlog = txtlog.Text & "Connected to: " & sckMain.RemoteHostIP & vbCrLfEnd SubPrivate Sub sckMain_DataArrival(ByVal bytesTotal As Long)Dim Data As StringsckMain.GetData Data, vbStringtxtlog = txtlog.Text & Data & vbCrLfEnd SubI there any way I can do this in VB Express 08? Link to comment Share on other sites More sharing options...
jcarle Posted April 21, 2009 Share Posted April 21, 2009 You need to look into VB.NET sockets. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now