About PortController
Introduction
Purchasing PortController
Redistributing PortController
License Agreement
Support
Getting Started
How to Use PortController
PortController Sample Projects
Handling PortController Errors
Reference
Properties
AvailableSystemPorts
BaudRate Property
Break Property
BytesUsedRQ Property
BytesUsedTQ Property
Cd Property
Cts Property
DataBits Property
Dsr Property
Dtr Property
DtrDsr Property
EnableReadOnEventChar Property
EventChar Property
ForceBeginInvokeEventFiring Property
IsOpen Property
IsFileTransferInProgress Property
Parity Property
PortHandle Property
PortName Property
ReceiveBufferSize Property
Ring Property
Rts Property
RtsCts Property
StopBits Property
SystemPorts Property
TraceOutput Property
TransmitBufferSize
XoffByte Property
XonByte Property
XonXoff Property
Methods
CancelFileTransfer Method
ClearRQ Method
ClearTQ Method
Close Method
GetErrorStatus Method
Open Method
Read Method
ReadBinary Method
ReceiveFileXModem Method
ReceiveFileXModemCRC Method
ReceiveFileYModem Method
ReceiveFileZModem Method
SendFileXModem Method
SendFileXModem1k Method
SendFileYModem Method
SendFileZModem Method
SimulateReceivedXoff Method
SimulateReceivedXon Method
Write Method
WriteBinary Method
Events
OnBreakSignal Event
OnCdToggle Event
OnCtsToggle Event
OnDataReceived Event
OnDsrToggle Event
OnError Event
OnEventCharReceived Event
OnFileTransferComplete Event
OnFileTransferStatusUpdate Event
OnRing Event
OnTQEmpty Event

ForceBeginInvokeEventFiring Property (Advanced)

Forces the use of EventHandler.BeginInvoke when firing events. This allows the handling function to examine the sender object to determine which instance of PortController fired an event, but requires the handling function to use Invoke() when accessing UI properties or methods.

Syntax

[Visual Basic]
object.ForceBeginInvokeEventFiring [ = value ]

[C#]
object.ForceBeginInvokeEventFiring [ = value ]

[C++]
object->ForceBeginInvokeEventFiring [ = value ]

Parameters

object

An object expression that evaluates to a PortController object.

value

A boolean value indicating whether PortController should fire events using EventHandler.BeginInvoke()

Return Value

A boolean value indicating whether PortController should fire events using EventHandler.BeginInvoke().

Default

False

Remarks

ForceBeginInvokeEventFiring is an advanced property that most applications can safely ignore. Normally, PortController invokes the container form to fire PortController events so that handling functions can access UI properties and methods without having to call Invoke(). This results in the sender object being the container form instead of a PortController object. When dealing with multiple instances of PortController, sometimes it is important to be able to determine the particular PortController instance firing an event. This can be done by setting ForceBeginInvokeEventFiring to true, but when doing so, be sure that all handler functions access UI components using Invoke().

Errors

None

Example

[Visual Basic]
'Set ForceBeginInvokeEventFiring
myPortController.ForceBeginInvokeEventFiring = True

'Get ForceBeginInvokeEventFiring
Dim forceBeginInvoke As Boolean
forceBeginInvoke = myPortController.ForceBeginInvokeEventFiring


[C#]
// Set ForceBeginInvokeEventFiring
myPortController.ForceBeginInvokeEventFiring = true;

// Get ForceBeginInvokeEventFiring
Boolean forceBeginInvoke = myPortController.ForceBeginInvokeEventFiring;


[C++]
// Set ForceBeginInvokeEventFiring
myPortController->ForceBeginInvokeEventFiring = true;

// Get ForceBeginInvokeEventFiring
Boolean forceBeginInvoke = myPortController->ForceBeginInvokeEventFiring;