943,724 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 13152
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Feb 23rd, 2008
0

Visual Basic 2008, Chat ! Urgent help needed

Expand Post »
Hey people!

I have been using VB2008 since it came out now, and have also used the 2005 version, but I was just wondering, if there is ANY way to create a Chat Application, or any way to create an IM service.
Please help me

Thanks
x
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008
Feb 23rd, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

of course there is a way..
Reputation Points: 10
Solved Threads: 1
Light Poster
c++ prog is offline Offline
44 posts
since Nov 2007
Feb 23rd, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

how?
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008
Feb 23rd, 2008
2

Re: Visual Basic 2008, Chat ! Urgent help needed

Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Feb 23rd, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

thx, but im not eally sure how to fully understand this
i wil giv it a go
any other ideas?
x
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008
Feb 23rd, 2008
1

Re: Visual Basic 2008, Chat ! Urgent help needed

there are code for this....
sorry if it can't help you.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Feb 23rd, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

wel i am sure the code is very useful but I just don't know how to use it
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008
Feb 23rd, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

to do such thinks you must use sockets

try this

Imports System
Imports System.Net.Sockets
Imports System.IO
Public Class ServerSocket1
Public Shared Sub Main()
Try
Dim status As Boolean = True
Dim servermessage As String = ""
Dim clientmessage As String = ""
Dim tcpListener As New TcpListener(8100)
tcpListener.Start()
Console.WriteLine("Server Started")
Dim socketForClient As Socket = tcpListener.AcceptSocket()
Console.WriteLine("Client Connected")
Dim networkStream As New NetworkStream(socketForClient)
Dim streamwriter As New StreamWriter(networkStream)
Dim streamreader As New StreamReader(networkStream)
While status
If socketForClient.Connected Then
servermessage = streamreader.ReadLine()
Console.WriteLine("Client:" + servermessage)
If (servermessage = "bye") Then
status = False
streamreader.Close()
networkStream.Close()
streamwriter.Close()
Return
End If
Console.Write("Server:")
clientmessage = Console.ReadLine()
streamwriter.WriteLine(clientmessage)
streamwriter.Flush()
End If
End While
streamreader.Close()
networkStream.Close()
streamwriter.Close()
socketForClient.Close()
Console.WriteLine("Exiting")
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
End Sub
End Class

This is one of numerous manners to program with sockets of cahting based applications
Reputation Points: 11
Solved Threads: 16
Junior Poster
Jugortha is offline Offline
172 posts
since Oct 2007
Feb 24th, 2008
1

Re: Visual Basic 2008, Chat ! Urgent help needed

First of all the link that JX gave was perfect. Harry you should put on some effort to understand how the code works.. Good explanation Jugortha..

Try this link too
Reputation Points: 347
Solved Threads: 13
Practically a Posting Shark
arjunsasidharan is offline Offline
812 posts
since Aug 2006
Feb 24th, 2008
0

Re: Visual Basic 2008, Chat ! Urgent help needed

oh no , its not that I didnt think it was useful, I really aprichate the help, its just, well Im not the brightest of blubs
It just takes me a little time to understand and work things out, and after taking a good look at it, I have found out how it works, but considering I am only 15, I may not be as experianced as other profesional programmers here, but yes this is very helpful and I thank you.

With VB.NET I am starting to understand more all the time, although, there are a few things that I am highly confuzed with, one of these is 'sockets'
At the moment I am looking in how to make use of sockets.

Thanks anyway x
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: New to vba and vb.net. Need your expert advice.
Next Thread in VB.NET Forum Timeline: how to read a binary file holding floating-point values





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC