How to use Serial Port Component

  • Thread starter Thread starter bpsdgnews
  • Start date Start date
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.
 
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.
 
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?
 
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.
 
Back
Top