How to use Serial Port Component

B

bpsdgnews

Hi,

In my old VB6 program I am controlling the shutter of a Digital camera
through the serial port.

I only needed this line to open the shutter:

Open "COM1:9600,n,8,1,cd0,cs0,op0" For Random As #1

I am rewriting the program in vb.net (2010) and want to use the Serial
Port Component.

But I can't get it to work.

All the hardware is okay, since from the VB6 program it still works.

Any suggestions?

Bas.
 
B

bpsdgnews

Hi,

In my old VB6 program I am controlling the shutter of a Digital camera
through the serial port.

I only needed this line to open the shutter:

Open "COM1:9600,n,8,1,cd0,cs0,op0" For Random As #1

I am rewriting the program in vb.net (2010) and want to use the Serial
Port Component.

But I can't get it to work.

All the hardware is okay, since from the VB6 program it still works.

Any suggestions?

Bas.


This was so easy in VB6.

I am searching for days already to do it in VB.net. So frustrating.
 
A

Armin Zingler

Am 31.05.2010 20:57, schrieb bpsdgnews:
Why can't you get it to work? Not compilable? Exception? Unexpected
behavior? What do the values in "COM1:9600,n,8,1,cd0,cs0,op0" mean?
 
D

DickGrier

I have examples on my homepage (Software Downloads). Even under VB6, your
method is not really supported, though it would work in some situations
(internal serial ports) -- not with USB serial adapters, for example.

You should use the SerialPort object, which is in the Toolbox
(System.IO.Ports.SerialPort).

Dick

--
Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue
Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July
2006.
 

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