Visual Basic
  Home arrow Visual Basic arrow Page 2 - Two Person Chat With The Winsock Control A...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC

Two Person Chat With The Winsock Control And Visual Basic
By: Jason Brimblecombe
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 253
    2002-01-12

    Table of Contents:
  • Two Person Chat With The Winsock Control And Visual Basic
  • Creating the chat form
  • Code from the clients point of view
  • Code from the clients point of view (contd.)
  • Code from the servers point of view
  • Using our chat application
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Two Person Chat With The Winsock Control And Visual Basic - Creating the chat form


    (Page 2 of 7 )

    Start by loading Visual Basic and creating a new standard exe application. Rename form1 to frmMain. To allow our chat application to communicate over the Internet, we need access to the Microsoft Winsock library. We can access this library in two ways. Firstly, by adding a reference to the library from the Project -> References menu option. Secondly, we can add the Microsoft Winsock ActiveX component into our application. The second way allows us to easily create an instantiation of the Winsock library in the form of a control, so we will use this method.

    Click on the Projects menu, and then the Components menu item. Scroll down the list of available components and check the "Microsoft Winsock Control 6.0" option:

    Selecting the Winsock library as a component

    Click Apply and then the OK button. We've just made the Winsock ActiveX control available to our application. The Winsock control is now part of the controls toolbar and is represented like this:

    The Winsock control

    Now that we have access to the Winsock library, let's create the layout and controls that make up our chat form. In the Visual Basic form designer, our chat form looks like this:

    Our chat application in Visual Basic

    Basically, our chat form is composed of one image, four text boxes and four buttons. The details of each of these controls are shown below:

    Each control and its descriptions

    Don't worry too much about the design and layout of the chat form. The complete source code and a compiled version of the chat application are included with the support material for this article, which is available from the last page.

    I will concentrate on describing the most important methods of our application from here on in.

    More Visual Basic Articles
    More By Jason Brimblecombe


       · You say you can download it @ the last page ...No download or what so ever
       · dude the point of coding isn't to just download people's full program then change...
       · LIAR...On the first page of the tut, you SAID that the download is at the last page....
     

    VISUAL BASIC ARTICLES

    - Developing an XML Web Service Using Visual S...
    - Creating an HTML File List with VB
    - Fun with Email: VB6, CDO, MAPI, and a Remote...
    - Extranet/Intranet Dictionary Cracker in VB
    - Finding Default App Icons With Visual Basic
    - Registry Fever With Visual Basic
    - Implementing An ADO Data Control With VB6
    - Printing With Visual Basic
    - MSMQ Part 1/2: Architecture and Simple Imple...
    - Magnifying The Desktop With Visual Basic
    - Sending Email With MAPI Components in Visual...
    - Two Person Chat With The Winsock Control And...
    - A Real-Time ActiveX News Control
    - Accessing the Windows API in Visual Basic


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway