vb MSCOMM Control works in VB 5 and not VB 6 
Author Message
 vb MSCOMM Control works in VB 5 and not VB 6

I have a simple VB comm program designed to interface to a custom piece of
hardware over a modem or direct connect.  Everything worked reasonably well
with VB 5 and then I switched to VB 6 on one development machine.  The VB 5
machine a laptop with a PCMCIA modem, connects to the custom hardware with
no problem and sends binary commands to the unit and receives the
appropriate responses.  When attempting the same thing with the same
program, now compiled in VB 6 service pack 4 ( or just VB 6 without the
service pack), the program operates by initializing the modem, sending a
command,  but erratically receives (most of the time it doesn't receive)
data.  The hardware device receives the command and properly replies for
every command, however the VB 6 version either does not receive the data, or
receives only some of the messages sent.  Breakpointing in the receive
section indicates that the MSCOMM control does not appear to respond to most
data sent.

This is a perplexing problem as the original VB 5 system worked just fine.
Does anyone have experience with MSCOMM not properly receiving data while
properly sending in either VB 5 or 6?  The VB 5 MSCOMM32.ocx is Version
5.01.4319 July 19, 1997 and the VB 6 ocx is version 6.00.8169 June 18, 1998.

Any help in resolving this problem would be appreciated.



Sun, 05 Jan 2003 03:00:00 GMT  
 vb MSCOMM Control works in VB 5 and not VB 6
Hi,

The version that you are using should be fine.  Most often problems with
PCMCIA modems tend to be timing related.  Make sure that you have disabled
any power saving modes in the modem (these are real trouble-makers, and are
of no measurable benefit -- IMO).  I use the current MSComm with no trouble.
You may find some good advice in my book (see below).  It has a chapter on
debugging and optimization, along with quite a bit of advice about modems.

--
Richard Grier (Microsoft Visual Basic MVP)
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 ISBN 1-890422-25-8 (355 pages).
For information look on my homepage at http://www.hardandsoftware.net.
Use the Books link to order.  For faster service contact the publisher at
http://www.mabry.com.



Sun, 05 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. From VB 6 to VB 5 would not work

2. From VB 6 to VB 5 would not work

3. Help: ActiveX control works in VB6 but not in VB.Net

4. ActiveX Control works in VB not in browser

5. VB 5.0 style eventing does not work with controls

6. VB 5.0 style eventing does not work with controls

7. VB INET CONTROL NOT WORKING ON UNIX HOST

8. ActiveX not working with MSAccess97, works with VB

9. OpenFile Not work in exe but works in VB run

10. SQL string not works in VB and works in Access 2000

11. MSCOMM control not working as expected

12. RaiseEvent Does Not Work with MSComm But Works with Timer

 

 
Powered by phpBB® Forum Software