Results 1 to 4 of 4

Thread: Winsock in VB.NET

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Winsock in VB.NET

    Hi every body
    I am new in vb2005, and need some help.
    In order ro connect two applications with each other,I used to use Winsock control in vb6.
    So my questions are:
    1-Can I use Winsock in vb2005?and how?
    2-what is the class responsible for making connection between two applications?and how I can use it?(I found a lot of information in MSDN about sockets class but didn't understand a lot of things?

    Thanks in advance

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Winsock in VB.NET

    Welcome to the forums.

    You can not use a VB6 control in VB.NET

    Here is an alternative.

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Winsock in VB.NET

    Altough the class that Hack showed will work, I would actually recommend learning how TCP connectivity in .Net works rather than using pre-made components.

    The two main classes you will use are System.Net.Sockets.TcpListener and System.Net.Sockets.TcpClient, the first one provides the server functionallity, listening to a specified port. The second one provides the client functionally, that is connecting to a remote IP.

    Heres a good thread to read through.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Re: Winsock in VB.NET

    Thaks you Hack and Atheist for your helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width