Acces To Serial Ports Using Visual Basic 2005

While serial port programming was absent in .NET version 1.1, Visual Basic developers who grew accustomed to the MSCOMM control in VB6 will be glad to know that this functionality is supported again in .NET 2.0. Learn to use the SerialPort class to make two computers talk to one another or even to manipulate a mobile device from your computer using Bluetooth.

HOW TO ACCES SERIAL PORTS USING VISUAL BASIC 2005
Visual Basic programmers who do networking programming will no doubt be familiar with the MSCOMM control in VB6. For those of us who followed VB's progression to VB.NET, it was a big surprise to find that control missing in .NET 1.x. What we had instead was Platform Invoke (P/Invoke), which was the only way to access the unmanaged Win32 APIs from your managed application. Fortunately, the situation has been rectified: In .NET 2.0, the functionality of the MSCOMM control is restored in the form of the SerialPort control (located under the Components tab in the Toolbox).
Hardware Needed.
Unless you have two computers, you won't be able to test serial communications. However, you can use a null modem cable to connect two serial ports on the same computer to simulate two computers communicating over serial ports. But most computers today come with at most one serial port (and some notebooks do not even have one). One good solution is to use a USB-to-serial port adapter to convert an USB connection into a serial port. Hence, if you computer does not have any serial ports, you would need a pair of USB-to-serial port adapters, and a null modem cable . Then, connect each USB-to-serial port adapters to a USB connection.

Postingan populer dari blog ini

vb6 msflexgrid

Tutorial Visual Basic 6.0 : Listbox in VB6

Select Single Cell in MSHFlexgrid