About PortController
Introduction
Purchasing PortController
Redistributing PortController
License Agreement
Support
Getting Started
How to Use PortController
Using PortController with Visual Basic
Using PortController with Visual C++
Using PortController with Delphi
How to Use Events
Handling Events in Visual Basic
Handling Events in Visual C++
Handling Events in Delphi
PortController Sample Projects
Reading and Writing Binary Data
Handling PortController Errors
Reference
Properties
BaudRate Property
Break Property
BytesUsedRQ Property
BytesUsedTQ Property
Cd Property
Cts Property
DataBits Property
Dsr Property
Dtr Property
DtrDsr Property
EnableReadOnEventChar Property
EventChar Property
Parity Property
PortHandle Property
PortName Property
Ring Property
Rts Property
RtsCts Property
StopBits Property
XonXoff Property
Methods
ClearRQ Method
ClearTQ Method
Close Method
GetErrorStatus Method
Open Method
Read Method
ReadBinary Method
Write Method
WriteBinary Method
SendXoff Method
SendXon Method
Events
BreakSignal Event
CdToggle Event
CtsToggle Event
DataReceived Event
DsrToggle Event
Error Event
EvtCharReceived Event
Ring Event
TQEmpty Event

EventChar Property

Sets and returns the character which, upon entry into the receive queue, will fire an EvtCharReceived event.

Syntax

Visual Basic

object.EventChar [ = value ]

Visual C++

object.GetEventChar()

object.SetEventChar(value)

Delphi

object.EventChar [ := value ]

Part Description
object An object expression that evaluates to a PortController object.
value The character (in string form) which, upon arrival in the receive queue, will cause an EvtCharReceived event to be fired.

Example

Visual Basic

' Set event character
myPortController.EventChar = ";"

' Get event character
Dim eventChar As String
eventChar = myPortController.EventChar

Visual C++

// Set EventChar
m_myPortController.SetEventChar(";");

// Get EventChar
CString eventChar = m_myPortController.GetEventChar();

Delphi

// Set event character
myPortController.EventChar := ';';

// Get event character
var eventChar: WideString;    // declare variable in the proper place. String type is also possible.
eventChar := myPortController.EventChar;

Remarks

While it is possible to supply a string for this property, only the first character of the string will be used for the event character.

Default

Newline character (0xA).

Returns

A string containing the event character in the first position.

Errors

None

See Also

EnableReadOnEventChar, EvtCharReceived Event