Serial port com in Visual Basic

Serial port communications for Visual Basic and RS232 with PortController

RS232 and Visual Basic - serial port communication made easy with PortController

Visual Basic and RS232 are familiar to many developers who have had to build an application to communicate with a computer peripheral or hardware device. Separately, they function well and are easy to understand, but problems often arise when the two are used together for serial port communications. With the help of PortController, these issues can be avoided.

Within the last ten years, Visual Basic has become one of the most popular languages for developing business and enterprise applications. In large part, the success of Visual Basic is due to its ability to hide technical complexity and allow developers to focus on the big picture. With Visual Basic, developers can create software that meets the need of their business or their customers without getting bogged down in low-level details like memory management and communications interface implementation.

For decades, RS232 (Recommended Standard number 232, or sometimes more accurately referred to as RS232C or EIA232) has been the standard interface by which serial ports on personal computers connect to modems and other devices. Although essentially simple and universally supported, it is not uncommon for problems to arise when RS232 is used for serial communications for GUI applications on a Windows platform. This is especially true when developing RS232 applications in Visual Basic.

When developing applications which write to and read from the serial port, the strength of Visual Basic works against developers. It is precisely because Visual Basic is so good at abstracting the low level details that it becomes so difficult to perform serial port communication. Because RS232 is a low-level interface, Visual Basic offers no built in support for it. Instead, the Visual Basic developers have to resort to digging into one of the deepest, most technical and confusing parts of the Win32 API, or be forced to work with the slow, dated MSCOMM control in order to fulfill the requirements of their application.

Even after figuring out how to write data to the serial port using the Win32 API or MSCOMM, Visual Basic developers tend to find that reading data from the serial port can be a tremendously difficult task. Without the proper threading design and management, an application will lock up while waiting for data to arrive over the serial port, degrading user experience and potentially causing a full blown application freeze.

Furthermore, when trying to use Visual Basic.NET or another .NET language to perform RS232 serial communications, matters get even more complex. Because the .NET framework offers no native support for serial port communications, it is up to the developer to marshal his or her managed .NET code to interact with unmanaged Win32 functions. The same problems will arise when performing serial communications in C# or C++ with Managed Extensions.

Fortunately, all of these problems can be avoided with the help of PortController. PortController.NET is a powerful, easy to use .NET component that makes RS232 serial port communications simple, while PortController ActiveX simplifies serial port communications in Visual Basic 6 or Visual C++ projects. Whether .NET or ActiveX, PortController gives you full serial port control in your Visual Basic, C#, or C++ project with just a few lines of code!

Learn more about PortController.NET
Download PortController.NET Trial

Learn more about PortController ActiveX
Download PortController ActiveX Trial

PortController.NET Screenshots
PortController ActiveX Screenshots
   2010 © Copyright Scientific Component. All rights reserved. Site Map