Serial Port Interface 
Author Message
 Serial Port Interface

I an using Visual Basic 5, and can anyone advise me on how to read serial
interface with visual basic??...

thanks a million

-Kenneth Wang



Tue, 03 Apr 2001 03:00:00 GMT  
 Serial Port Interface
Use the MSCOMM OCX. (Add this OCX to your project, add one instance to one
of your forms and add some simple code.)
Quick example:

in FORM_LOAD:
MSCOMM1.Commport=1'use COM1:
MSCOMM1.settings="9600,n,8,1"  'set baudrate, parity, databits, stopbits
MSCOMM1.portopen=true ' open com-port

in FORM_UNLOAD:
MSCOMM1.portopen=false

To send data to port:
MSCOMM1.output = "Data to be sent"

For more help, see the help-files.
Jacco.

Quote:

>I an using Visual Basic 5, and can anyone advise me on how to read serial
>interface with visual basic??...

>thanks a million

>-Kenneth Wang



Tue, 03 Apr 2001 03:00:00 GMT  
 Serial Port Interface
MSComm is a control, just like the buttons, boxes, etc. You'll have to add
the control to your ToolBar, then VB will include the reference to the OCX
for you. Right-click on the ToolBar, select Components, then scroll down to
see "Microsoft Comm Control"

John Tegelaar

Quote:

>thanks..
>but I couldn't find that file.. and how to I go about adding that OCX to my
>project?? thanks..



Tue, 03 Apr 2001 03:00:00 GMT  
 Serial Port Interface
thanks..
but I couldn't find that file.. and how to I go about adding that OCX to my
project?? thanks..


Wed, 04 Apr 2001 03:00:00 GMT  
 Serial Port Interface
I tried using your sample code and look into the help file as well..
but i got an error message as "Undefined variable"...

pls pardon me.. cos I am very new in VB programming enviroment...
thanks for your help..



Wed, 04 Apr 2001 03:00:00 GMT  
 Serial Port Interface
I go this message "License informtion for this component not found. You do
no have an appropriate license to use this functionality in the design
environment" when I add the MSCOMM to my form.. what does that means? any
way to solve it?

and "runtime error 424, object required".. when I run a project with MSCOMM
inside..

thanks..



Wed, 04 Apr 2001 03:00:00 GMT  
 Serial Port Interface

Quote:

> I go this message "License informtion for this component not found. You do
> no have an appropriate license to use this functionality in the design
> environment" when I add the MSCOMM to my form.. what does that means? any
> way to solve it?

> and "runtime error 424, object required".. when I run a project with MSCOMM
> inside..

> thanks..

There's a way to un/re-register controls, but it escapes me
at the moment.. For a semi-quick and dirty fix, re-install
VB5 over the top of itself.  It should leave everything in
place, while fixing your problem.  

HTH,
Anonymous VB User



Wed, 04 Apr 2001 03:00:00 GMT  
 Serial Port Interface
I can't even uninstall now...... oops..


Sat, 07 Apr 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. REQ: Serial Port Interface

2. SERIAL PORT INTERFACE

3. Serial Port Interface

4. Serial port interfacing

5. VBA interface to serial RS232 port

6. I/O port, Parallel port, Serial port

7. qb45 and SERIAL strange SERIAL port protocol

8. serial printer on serial port

9. serial printer on serial port

10. Future of Serial Ports vs USB Ports

11. How to loop comm port control to read text files through serial port in VB3

12. Serial port/parallel port

 

 
Powered by phpBB® Forum Software