home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_2 / VBCOMM20 / VBCOMM.TXT < prev    next >
Encoding:
Text File  |  1992-09-03  |  2.8 KB  |  77 lines

  1.  
  2.      Communications Control for Visual Basic by Mark Gamber   August 1992
  3.                                   Version 2.0
  4.  
  5. Changes:
  6.       VBCOMM is now Windows 3.1 specific. It uses the WM_COMMNOTIFY message as
  7.    well as regular polling for receiving characters, notifying the Visual Basic
  8.    application when at least one character is received.
  9.  
  10.  
  11.    VBCOMM provides a communcations module for Visual Basic. TO begin using the
  12. control, copy VBCOMM.VBX to your Visual Basic directory and select the
  13. "File_AddFile" menu item to display a litbox of files. Select VBCOMM.VBX to add
  14. the file to the toolbox.
  15.  
  16.    VBCOMM only uses Windows communications calls and is thus subject to
  17. policing of ports by Windows. In any given Windows session, anything can and
  18. usually go wrong with communications, so no guarentees are implied. That out of
  19. the way...
  20.  
  21.    First step in using VBCOMM is to set up the port by setting property values.
  22. Once a port is open, the properties should not be altered until the port is
  23. closed again. You may initialize the port by setting the following properties:
  24.  
  25.    Comport: Select from the following values:
  26.          0 - COM1:
  27.          1 - COM2:
  28.          2 - COM3:
  29.          3 - COM4:
  30.  
  31.    Baud: Select from the following values:
  32.          0 - 300
  33.          1 - 1200
  34.          2 - 2400
  35.          3 - 9600
  36.          4 = 19200
  37.  
  38.    Parity: Select from the following values:
  39.          0 - Parity off
  40.          1 - Parity even
  41.          2 - Parity odd
  42.  
  43.    Data: Select from the following values:
  44.          0 - 6 bits
  45.          1 - 7 bits
  46.          2 - 8 bits
  47.  
  48.    Stop: Select from the following values:
  49.          0 - 1 bits
  50.          1 - 2 bits
  51.  
  52. To open the port, set the "Enable" property to a non-zero number. The number
  53. should remain non-zero until the port is closed by setting "Enable" to zero.
  54. When the port is open, incoming characters will cause the "InQueue" routine to
  55. be executed. Within this routine you can use DataChr and DataStr to retrieve
  56. characters from the receiving queue.
  57.  
  58.    Enable: 0 to close port, non-zero to open port.
  59.  
  60.    DataChr: Sends and receives byte data values (0-255)
  61.  
  62.    DataStr: Sends and receives data strings.
  63.  
  64.  
  65.    The zipfile contains Visual Basic example code using the VBCOMM module. For
  66. more information on actual use, please look at the source code.
  67.    This software is public domain and may be freely distrbuted. As public
  68. domain, the software is not officially supported. In using the software, the
  69. user assumes responsibility for proper use of the software and the author is
  70. not liable. Period. If the user is unable to comply, the user should destroy
  71. the software immediately. The author may be reached on the following services:
  72.  
  73.    America Online E-Mail: PCA MarkG
  74.    Compuserve Mail:       76450,2754
  75.    Internet Mail:         pcamarkg@aol.com
  76.  
  77.