Open Comm Port? 
Author Message
 Open Comm Port?

I am using vb5, learners edition.
When I try to   Open "Comm1:4800,N,8,2,ASC" FOR RANDOM AS #1,  I get runtime
error #53.  File not found.
I use this in QB4 with no problems.  Have I forgot to Declare something?

Lee Snook



Sat, 19 May 2001 03:00:00 GMT  
 Open Comm Port?
Hi,

You have to use the Windows API serial communications functions.  This is a
non-trivial exercise.  I have complete example code for this in my book (see
below for information).

A better option is to use an ActiveX control.  MSComm comes with VB Pro and
Enterprise Editions.  Other alternatives are any one of several commercial
comms add-ons.  You can get information on most that are available from my
homepage.  Just click on the VBxpert button.

HOWEVER, an even more attractive option may be to download XMComm.ocx from
my homepage (free).  This ActiveX control wraps MSComm and adds XMODEM file
transfers as an additional function.  I would still suggest that you get a
copy of my book -- it has a number of working examples that you would find
to be of value.  BTW, the source code for XMComm is included in the book and
on the accompanying disk.

--
Richard Grier
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO  80228
303-986-2179 (voice)
303-986-3143 (fax)
Author of Visual Basic Programmer's Guide to Serial Communications, 2nd
Edition (355 pages).
For information look on my homepage at
http://ourworld.compuserve.com/homepages/richard_grier.
Use the Books link to order.  For faster service contact the publisher at
http://www.mabry.com.



Sat, 19 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Open comm port

2. How to detect an open comm port

3. How to open comm port in VB4.0?

4. monitor an already open comm port or NIC?

5. Getting an open COMM port Handle..Is it Possible???

6. API - Opening a Comm port -NT

7. opening and sending BINARY to a comm port.

8. Comm port freezes on open!

9. (Q) How to open a comm port.

10. Opening a comm port for input

11. Comm Port will not Open

12. Comm Port Open/Close question

 

 
Powered by phpBB® Forum Software