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 545797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:47:59+00:00 2026-05-13T10:47:59+00:00

I imported the Winsock feature in my vb.net application, so I can make a

  • 0

I imported the Winsock feature in my vb.net application, so I can make a Chat System. I just have one little problem with my program. In the GetData method of my program,

CLIENT SIDE:

*Dim strData As String*

    AxWinsock1.GetData(strData, vbString)
    TextBox1.Text = TextBox1.Text & _
    strData & vbCrLf

It will underline the whole first line, unless have an maxLen as Object in. So I plugged in Nothing, since I thought it was optional. Now when I debug, and I send a message from the server, it won’t display anything. I put in vbByte as the maxLen object, and now it only shows part of the message. Can anyone tell me how to fix this. This works in VB6…

PS: I am not going to use the System.Namespaces function of VB.NET since, I find the Winsock feature much easier.

Thanks

  • 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-13T10:47:59+00:00Added an answer on May 13, 2026 at 10:47 am

    vbByte is a constant with a value of 17, so you actually send a max length of 17 😉

    You will want to send a bigger number as the max length. If what you want to send as a max length is the upper bound of the Byte data type you could send Byte.MaxValue (which is 255).

    Edit:

    I don’t know what is the upper bound, but you can try Integer.MaxValue, or some arbitrary big value like 1000000…

    Looking at the documentation, I noticed two things:

    1. maxLen should be optional, I don’t know why it would flag an error when you don’t specify it, what kind of error is it?

    2. It’s mentioned that it’s common to use GetData with a DataArrival event, is that your case? If it is, you could pass the totalBytes argument as the maxLen.

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

Sidebar

Related Questions

I have just imported a database table from a previous site, and one of
I have just imported a huge MySQL database. Most fields are latin1_swedish_ci, and they
I've just imported a Flex component into my project. I have a theory question
I have imported the ShockWave flash Activex Control in my Delphi project. I can
I have successfully imported ActionbarSherlock library to my own project, and I can already
I've just imported a bunch of data to a MySQL table and I have
I have imported maven project in eclipse and configured properly. Its a web application,
I imported net.sf.json package to use the feature of JSON in my jsp apge
I imported system.web into my class lib project. Trying to find: system.web.httpserverutility.server.mappath But I
I have imported the kernel32 library. So, I have the createMutex function available but

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.