Access COM port

J

James Wong

Hi everybody,

I'm planning to upgrade a VB6 application to VB.NET 2003. In which, some
modules need to communicate with COM port to detect high/low bit signal and
also send signal to COM port. In VB6 application, MSComm control is used.
However, I can't find it or other related control in VB.NET 2003. I would
like to know how I can do that in VB.NET 2003.

Thanks for your attention and kindly help!

Regards,
James Wong
 
T

Thomas Wenning

James Wong said:
Hi everybody,

I'm planning to upgrade a VB6 application to VB.NET 2003. In which, some
modules need to communicate with COM port to detect high/low bit signal and
also send signal to COM port. In VB6 application, MSComm control is used.
However, I can't find it or other related control in VB.NET 2003. I would
like to know how I can do that in VB.NET 2003.

Thanks for your attention and kindly help!

Regards,
James Wong
Hi James,

in the http://msdn.microsoft.com/vbasic/vbrkit/ ResourceKit is an Control
from Sax.

Greeting

Thomas
 
H

Herfried K. Wagner [MVP]

James Wong said:
I'm planning to upgrade a VB6 application to VB.NET 2003. In which, some
modules need to communicate with COM port to detect high/low bit signal
and
also send signal to COM port. In VB6 application, MSComm control is used.

You can still use MSComm...

Thomas Scheidegger's Serial Port FAQ (in German)
<URL:http://groups.google.com/[email protected]>

..NET 2.0 will provide support for accessing the serial port:

'SerialPort' Class
<URL:http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.io.ports/c/serialport/serialport.aspx>
 
D

Dick Grier

Hi,

The simple way is to download NETComm.ocx from my homepage. The semantics
are identical to those that you would have used in your previous
application.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
J

James Wong

Hi Thomas,

Thanks for your reply! I've installed serial communication control from
Sax. However, I found that there is no CTSHolding property which I use
before to determine the status of an external device. Do you have any idea
on this issue?

Thanks again for your kindly advice!

Regards,
James Wong
 
T

Thomas Lutz

Hi James:

The MSComm ActiveX control should still work in a VB.NET application
however you may run into a licensing issue with it.
You can find a .NET compatible ActiveX control at the following web
site:
www.hardandsoftware.com

After you go to the above site, click on "Software Downloads" and
select the NETComm.OCX link to get the the download page for it.
Basically the NETComm.OCX tool is a wrapper around the MSComm32.OCX
activex control and I believe that it should have all the same
properties, methods and events that are in the MSComm32.OCX activex
control.

For more serial I/O tools, tips and free utilities, visit
www.taltech.com
 
J

James Wong

Hi Thomas,

Thanks for your reply!

I have a license of VB6, does it mean I can use MSComm directly? However,
I'd heard that interop with COM object will affect the performance. Will it
be serious or minor?

Regards,
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top