Home Parallel Port Serial Port Serial Info Parallel Info USB .NET Webboard I/O Today API Project Directory

 Hardware Interfacing and TCP/IP interfacing in VB programming.

Communication Serial Port with Visual Basic Programming Part 1

Thai Page Click Here
In the section Visual Basic programming access I/O Serial Port, I presented about the form of interface and programming to control MSComm 6 control of Visual Basic. In this section, I will present programming in transfer data like Dial Up program in Windows with Visual Basic.
First step,New visual basic project after that add MSComm control to form thus as step by step below.

1. Next Step, Select menu bar on top of Visual basic program thus as picture below

2. Next Step,Select Control Name is "Microsoft Comm Control 6" thus as picture below

3. Next Step, Drag the Control "Microsoft MSComm 6" from ToolBox to Form thus as picture below

Next Step define name in Properties -->Name, Text-->Font,-->Color and anything like as picture below ,That each control ,you can see name at title bar of dialog box

Control's name for title bar dialog

This step is coding functin in procedures

  • This coding is Enable and disable for using Comm Port

  • This code is loading value,define parameter in start running of program such as baud rate,Com port ,Hardshaking as it should be read value from registor of Windows

  • This Coding is data receiver for events of Comm Port in case select mode Event-Driven

  • This code for show time and massage

  • This code is data respone that has 2 mode
    1. Event-driven
    2. Pooling
    We can change both 2 mode with codition "goto" for using in each mode.

  • This part is data sending to comport that sending used properties

  • Sub program for check charectors that show in text box.

  • This coding is change mode for Event driven or polling with codition select case

  • and picture show the program running


I'm sorry,you should be continue next part as it has many picture as page will be slow loading


Copyright (c) 2000-2008 thaiio.com all rights reserved.  Contact webmaster :webmaster@thaiio.com