Home > Software engineering >  What is the meaning of this sentence?? Please explain MSComm1. The Output="e#"
What is the meaning of this sentence?? Please explain MSComm1. The Output="e#"

Time:12-23

Ask as shown in the title, explanation thank you

CodePudding user response:

MSComm1 control data is transmitted or received through the serial port of the control, the Output attribute is to write the data flow transmission buffer, then=behind data is the data flow, data flow can be a binary data stream, also can be a string data, then "e#" this is the string data transmission,

CodePudding user response:


The Output attribute


To write the data flow transmission buffer, this attribute is invalid, when the design is read-only at run time,

Syntax

Object. The Output value] [=

The Output attribute syntax consists of the following parts:

Part of the description
Object expression, and its value is "applied" in the list of objects,
The value to write a string of transmission buffer,


Description

Output properties can transmit text data or binary data, using the Output property transfer text data, must define a contains a string of Variant, send binary data, must pass a Variant containing an array of bytes to the Output properties,

Under normal circumstances, if an ANSI string sent to the application, can be in the form of text data to send, if send include embedded control characters, Null character, and so on, to be transmitted in binary form,

Data type

The Variant
 Output attributes sample 
The following example shows how the user typed each character to the serial port:

Private Sub Form_KeyPress (KeyAscii As Integer)
Dim Buffer as the Variant

'
Settings and open the windowMPort=1
MSComm1.ComMSComm1. PortOpen=True

Buffer=CRH $(KeyAscii)
MSComm1. The Output=Buffer
End Sub

  • Related