Assuming you have VB6, find the MsComm control in the
Project\Components\Controls and check the box to add to your project.
In the tool box you will find a "Phone" which is the MsComm control.
Add this to your Form.
Set up the Settings Property string to match your device. Then call
Open to Open this port somewhere early in your program.
Your InputMode property should most likely be set to comInputModeBinary
for a device like a Bar Code Scanner unless you know that it will be
reporting only text strings.
View the MS help on the InputMode property to see how to receive a
binary array from the com port. You use a Variant to receive the
initial data (in Binary mode, not text) then copy this to a Byte Array
for further processing.
Use the OnComm event to "find" the data you receive within the
comEVReceive event. See OnComm example in MS.
Deerhunter - 28 Feb 2005 08:06 GMT
Thanks a lot!
Mike
> Assuming you have VB6, find the MsComm control in the
> Project\Components\Controls and check the box to add to your project.
[quoted text clipped - 15 lines]
> Use the OnComm event to "find" the data you receive within the
> comEVReceive event. See OnComm example in MS.