Results 1 to 2 of 2

Thread: MSComm Control - Recieving text

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    225

    Post

    Can someone show me a quick way to receive text using the MSComm control. I can make the dialup connection but can not see any data being returned using outputfield.text=MSCommCtrl.input. Can anyone bail me out?

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    82
    If you are expecting to receive text, set the InputMode property to comInputModeText, else comInputModeBinary

    Also, ensure that your RThreshold property is set to 1, do NOT set a higher number for this property

    To check that you are indeed connected via Modem, check the CDHolding property with a Timer control.

    If CDHolding = True then test for any received serial data by testing the InBufferCount property. If the InBufferCount > 0 (Rx Serial data) then assign a string variable to the Input property. eg. RxBuf = MSComm1.Input

    If you are expecting binary data then you need to declare a binary array and assign the .Input data to that array.

    You can also have event-driven rx serial using the comEvReceive event via the OnComm event.

    HTH
    Adrian

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