Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:27:44+00:00 2026-05-26T03:27:44+00:00

Basically my server sends a client a string which is then broken down on

  • 0

Basically my server sends a client a string which is then broken down on the client side using Dim data() As String = receivedString.Split("|"c) an example of a string would be MESSAGE|TestUser|This Is The Message what i want to do when this string is received is firstly check to see if this user has already sent a message to this client before(should already have a window up with the current ‘chat’) if the user has sent a message before append the text to say a rich text box. if the user hasn’t sent a message before a new instance of ‘chat window’ is created and then any future messages from the server goes to this instance of the window.

thanks,
Houlahan

Dim data() As String = message.Split("|"c)
    Select Case data(0)
        Case "MESSAGE"
            Try
                If conversations.ContainsKey(data(1)) Then
                    Dim convoWindow As ChatWindow
                    convoWindow = conversations.Item(data(1))
                    convoWindow.RichTextBox1.AppendText(data(2))
                Else
                    conversations.Add(data(1), New ChatWindow())
                    Dim convoWindow As ChatWindow
                    convoWindow = conversations.Item(data(1))
                    convoWindow.Show()
                    convoWindow.RichTextBox1.AppendText(data(2))
                End If
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:27:44+00:00Added an answer on May 26, 2026 at 3:27 am

    You could accomplish this in a slew of ways. The first that pops into my head would be to create a Dictionary object that associates your TestUser as the key in association with a Form that represents a conversation. e.g.

    conversations.Add(testUser, new FormConversation(...))
    

    When a message is received, you would reference the dictionary that kept track of all your ongoing conversations.

    If no key exists with the user name, create a new form and add the user to the dictionary along with a reference to the form. If one does exist, which can be extracted from the dictionary based on the user name, simply bring that one to the front and pass the message to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically my question is the exact same one as this: Simple client/server, TCP/IP encrypting
My code basically needs to start up a simple chat server with a client.
Code for server: http://stikked.com/view/64826511 Network Code for client: http://stikked.com/view/38974838 Basically, the client connects to
i am creating a bluetooth based server program in Bluez which basically handles connections
I'm writing a program that will have both a server side and a client
I am trying to make a simple client-server chat program. On the client side
I've got a client/server setup that I am implementing using a WCF Service (
This is basically the picture: I have a server and a client (operating through
I'm programming an Android multi-player game, which basically consist of a server where the
I'm implementing a network client that sends messages to a server. The messages are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.