ASP.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a ASP.NET Expert!

Join 307,035 ASP.NET Programmers for FREE! Get instant access to thousands of ASP.NET experts, tutorials, code snippets, and more! There are 2,260 people online right now. Registration is fast and FREE... Join Now!




How do i create a chat application?

 

How do i create a chat application?, Using only VB language and doing it by visual studio

sya

22 Jun, 2009 - 04:21 AM
Post #1

New D.I.C Head
*

Joined: 18 Jun, 2009
Posts: 1

Ive been trying to search for codes that are plainly using VB to create a chat application using Visual Studio



CODE
   Private Sub GetMessages()  1
         Dim db As LinqChatDataContext = New LinqChatDataContext()  
  
         Dim messages = (From m In db.Messages _  
                         Where m.RoomID = Convert.ToInt32(lblRoomId.Text) _  
                         Order By m.TimeStamp Descending _  
                        Select m).Take(20).OrderBy(Function(m As Message) m.TimeStamp)  
  
  
  
         If Not messages Is Nothing Then  
             Dim sb As StringBuilder = New StringBuilder()  
             Dim ctr As Integer = 0    ' toggle counter for alternating color  
  
             For Each message In messages  
                 ' alternate background color on messages  
                 If ctr = 0 Then                       sb.Append("<div style='padding: 10px;'>")  
                     ctr = 1  
                 Else  
                     sb.Append("<div style='background-color: #EFEFEF; padding: 10px;'>")  
                     ctr = 0  
                 End If  
  
                 If message.User.Sex.ToString().ToLower() = "m" Then  
                     sb.Append("<img src='Images/manIcon.gif' style='vertical-align:middle' alt=''>  " + message.Text + "</div>")  
                 Else  
                     sb.Append("<img src='Images/womanIcon.gif' style='vertical-align:middle' alt=''>  " + message.Text + "</div>")  
                 End If  
             Next  

  
             litMessages.Text = sb.ToString()  
         End If  
     End Sub


User is offlineProfile CardPM
+Quote Post


joezim007

RE: How Do I Create A Chat Application?

22 Jun, 2009 - 05:30 AM
Post #2

D.I.C Head
Group Icon

Joined: 13 Sep, 2008
Posts: 83



Thanked: 4 times
Dream Kudos: 100
My Contributions
I personally can't see how anyone could post a solution to a chat application in a thread. I'm sure that someone could post some starter points to help you figure out the connections or the display or something, but asking for someone to help with an entire chat app is a bit absurd.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 08:44AM

Live ASP.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

ASP.NET Tutorials

Reference Sheets

ASP.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month