![]() ![]() On of the MSCommLib.InputModeConstants constants to specify either sending/receiving text strings or byte arrays. Set to 1 to fire OnComm every time a character is received. Sets how many characters should be received before firing the OnComm event. Sets or gets the computer's serial port to be used. Here is a quick overview of some important properties of the MSComm control. Draw the new control onto your form (Telephone icon).Select and add the "Microsoft Communications Control".Add the MSComm COM/OCX Control to your "Windows Forms".By drawing it onto a form, VS.NET handles these for you. You must add the control to a form instead of just instantiating the control straight from code because it requires special OCX state information and a developing license be included in your program's assembly. Note: To obtain MSComm.ocx and it's associated licensing, you can do a custom install of Visual Studio 6 and just install the ActiveX components (about 5MB). Required: MSComm.ocx installed with Visual Studio 6. You must have at least the ActiveX components of VS6 installed in order to use MSComm because it is a licensed control. So this tutorial explains how to easily communicate through a serial port using the MSComm OCX that is included with VB in Visual Studio 6 (and previous versions). Unfortunately VS.NET does not have a serial communications framework in place. Ever since I was 15 I was writing code to communicate with electronics my Dad or I made. Serial COM port communications has always been one of my favorite topics.
0 Comments
Leave a Reply. |