Results 1 to 16 of 16

Thread: [RESOLVED] VB6.0 Program does not connect to serial ports on card.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Resolved [RESOLVED] VB6.0 Program does not connect to serial ports on card.

    Greetings to you and thanks for your HELP in the past!
    Operating system:
    Windows 10, home, 64 bit, version 1803.
    I install a serial port card, either ordinary PCI or PCI express.
    Device Manager declares the ports are working correctly.
    My VisualBASIC 6.0 computer program will not connect
    to the serial ports. The program reports "Invalid Port Number."

    Is VisualBASIC 6.0 incapable of connecting to serial port cards?

    Please reply at your convenience.


    Device Manager declares the ports to be COM3 and COM5.

    +++++++++++++++++++++++++++++++++++++++++++++++++++

    I will mark this item as RESOLVED.
    Our plans suddenly changed today. Programming is postponed until the week beginning
    June 24, 2018.

    Thank you for your replies. Re-assigning the COMPORT number is most likely to be
    successful. Device Manager declared that drivers were not installed or not required.

    Thank you for your help.
    Last edited by ProgrammerInVB6; Jun 11th, 2018 at 12:10 PM. Reason: Finalize and mark resolved.

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: VB6.0 Program does not connect to serial ports on card.

    In Device Manager, what port numbers are being assigned to the serial ports you installed? A screen capture of your Device Manager windows showing the ports would be most helpful.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: VB6.0 Program does not connect to serial ports on card.

    What port numbers are you trying to use?
    I have not tried to do any serial stuff under windows 10 but have did lots of it in the past with the older versions of Windows. Have had systems with up to 8 ports defined. Never really had any major issues getting them to work though I do seem to remember struggling a little when the port number was something unusual. Typically ports should be 1-X if you are getting something like port 16 that may be an issue.

  4. #4

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    Device Manager declares the ports to be COM3 and COM5.

  6. #6
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: VB6.0 Program does not connect to serial ports on card.


  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: VB6.0 Program does not connect to serial ports on card.

    Can we see the piece of code you use to set and open the port and the error number and message thrown? Also indicate which line throws the error.

  8. #8
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,055

    Re: VB6.0 Program does not connect to serial ports on card.

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:18 AM.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    Quote Originally Posted by DataMiser View Post
    Can we see the piece of code you use to set and open the port and the error number and message thrown? Also indicate which line throws the error.
    +++++++++++++++++++++++++++++++++++++++++++++++++++
    I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.

    The program aligns with COM3 using MSComm3.enable = true.
    However, no data is received when transmitting data from another computer.

    The programs does not align with COM5 using MSComm5.enable = true.
    The error message is "Invalid Port Number".

    Thank you for your reply.
    ProgrammerInVB6

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.

    The program aligns with COM3 using MSComm3.enable = true.
    However, no data is received when transmitting data from another computer.

    The programs does not align with COM5 using MSComm5.enable = true.
    The error message is "Invalid Port Number".

    Thank you for your reply.
    ProgrammerInVB6

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    I may decide to try this code.
    This is approaching the esoterica for me.

    Thank you.

  12. #12
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: VB6.0 Program does not connect to serial ports on card.

    Quote Originally Posted by ProgrammerInVB6 View Post
    I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.

    The program aligns with COM3 using MSComm3.enable = true.
    However, no data is received when transmitting data from another computer.

    The programs does not align with COM5 using MSComm5.enable = true.
    The error message is "Invalid Port Number".

    Thank you for your reply.
    ProgrammerInVB6
    Changing the name of the control doesn't change what Com port is associated with it. You have to change the CommPort property of one to 3 and the other to 5.
    If you added two controls, the given names would be MSComm1 and MSComm2 but both would be defaulted to open COM1, which is probably why you get an Invalid Port Number on the second one because you can't open the same Com port twice (you're trying to open COM1 twice).
    Last edited by passel; Jun 7th, 2018 at 09:28 AM.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Red face Re: VB6.0 Program does not connect to serial ports on card.

    Quote Originally Posted by passel View Post
    Changing the name of the control doesn't change what Com port is associated with it. You have to change the CommPort property of one to 3 and the other to 5.
    If you added two controls, the given names would be MSComm1 and MSComm2 but both would be defaulted to open COM1, which is probably why you get an Invalid Port Number on the second one because you can't open the same Com port twice (you're trying to open COM1 twice).
    +++++++++++++++++++++++++++++++++++++++++++++++

    I sincerely thank you for your reply.
    Yes, with egg on my face, I did not change the CommPort property
    to 3 and 5. And, CommPort assignment is immediately under the
    port name.

    I have not yet attempted to receive data. I encountered another
    problem:
    I downloaded the most recent drivers for the card from the Website of
    the manufacturer. The drivers apparently installed with no problem.
    I cannot confirm that the drivers installed - at all. Apps and Features
    does not show an entry for the drivers. Processes (Task Manager) does
    not show an entry for the drivers. I am waiting for a reply from the
    manufacturer.

    Also, I apologize. The offending code is MSComm5.portopen = true.

    I will close this Problem after I receive data via COM3 and COM5
    with full explanation. I will resume programming the week beginning
    June 10, 2018.

    Again, I sincerely thank you.
    ProgrammerInVB6
    Last edited by ProgrammerInVB6; Jun 7th, 2018 at 10:32 AM. Reason: Clarification

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    +++++++++++++++++++++++++++++++++++++++++++++++

    I sincerely thank you for your reply.
    Yes, with egg on my face, I did not change the CommPort property
    to 3 and 5. And, CommPort assignment is immediately under the
    port name.

    I have not yet attempted to receive data. I encountered another
    problem:
    I downloaded the most recent drivers for the card from the Website of
    the manufacturer. The drivers apparently installed with no problem.
    I cannot confirm that the drivers installed - at all. Apps and Features
    does not show an entry for the drivers. Processes (Task Manager) does
    not show an entry for the drivers. I am waiting for a reply from the
    manufacturer.

    Also, I apologize. The offending code is MSComm5.portopen = true.

    I will close this Problem after I receive data via COM3 and COM5
    with full explanation. I will resume programming the week beginning
    June 10, 2018.

    Again, I sincerely thank you.
    ProgrammerInVB6

  15. #15
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6.0 Program does not connect to serial ports on card.

    Check the device's Properties dialog in Device Manager. There is a Driver tab in this dialog that lists details such as driver maker and version.

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Jun 2011
    Location
    Nederland, Texas
    Posts
    68

    Re: VB6.0 Program does not connect to serial ports on card.

    Hi dilettante:

    Thank you for the suggestion.
    I will certainly review the Device Manager info.

    The manufacturer replied to me and indicated if Device Manager declares the comports are
    running satisfactorily, the manufacturer has nothing else to say.

    I will resume programming during the week beginning June 10, 2018.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width