Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB MSComm control

  • 02-02-2000 2:29pm
    #1
    Registered Users, Registered Users 2 Posts: 2,199 ✭✭✭


    I am 'trying' to write a simple rs232 comms program using the VB MSComm control but it doesn't seen to work. Every time i run the porgram i get an error at the MSComm control saying 'object required'.
    I have tried ueing the example program to see if that works but the same thing happens. I've even tried reinstalling VB.
    Do i need to configue something in VB or windows or what?
    Or is there another way to implement serial comms in VB?
    any help you be grateful


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    It's been ages since I used MSComm (prolly 3 years? smile.gif)

    But afair, it was pretty flakey and annoying to use. Ended up getting a third party tool instead.

    What exactly are you trying to do?


  • Registered Users, Registered Users 2 Posts: 2,199 ✭✭✭Keeks


    i am trying to create a simple Text tranfer program between two PCs i.e. send a text string from one PC to another.
    Nothing two complicated.
    I would prefer to write it in C but Vb allows me to make a quick GUI for the program rather than messing around in VC++


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Ok my second question. Your going out through the RS232?

    Your using a Null Modem Cable right? Not a Modem Cable.

    The following ports need to be switched for Null modem.
    TxD + RxD
    RTS + CTS
    GND goes to GND
    DSR + DTR (? Memory is flakey here smile.gif Might be wrong)

    Quickest way to check is open up direct connect networking and see if you can access the other machine (will have to share out drives and setup TCP).

    I found not using RTS+CTS to handshake but XON/XOFF easier.

    I also used VBDOS, not VB as DOS handles the COM port easier, where as you might have to fight for the port in windows.



  • Registered Users, Registered Users 2 Posts: 2,199 ✭✭✭Keeks


    Found the problem with my program. The MSComm object was missing from the Form and that wa why i was getting the error messages. Thanx anyway for the help Hobbes. The additional info was made good use of.

    Cheers

    Keeks


Advertisement