CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Posts
    10

    Sending '1's and '0's...

    Does anyone know how to send a string of '1's and '0's throught the serial port using VB? Is there any functions in VB which is similar to the outp function in C??? Urgent...Thanks!!!


  2. #2
    Join Date
    Dec 1999
    Location
    Israel
    Posts
    101

    Re: Sending '1's and '0's...

    I don't know which version of VB you use. If it is 5.0 or 6.0 it is very easy:
    MSComm1.InputMode = 1

    Dim bOutput(0 To 10) As Byte ' Output Binary Array

    bOutput(0) = 0
    bOutput(1) = 1
    MSComm1.Output = bOutput

    But if you use VB 4 or less, you'd better use API functions CreateFile(), ReadFile(), WriteFile().

    Good Luck!


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

Featured