SThreshold

Sets and returns the minimum number of characters allowable in the transmit buffer before the Comm control sets the CommEvent property to comEvSend and generates the OnComm event.

Syntax

object.SThreshold [ = value ]

The parts of the SThreshold property syntax are described in the following table.

Part Description
object An object expression that evaluates to an object.
value An integer expression representing the minimum number of characters in the transmit buffer before the OnComm event is generated.

Remarks

Setting the SThreshold property to 0 (the default) disables generating the OnComm event for data transmission events. Setting the SThreshold property to 1 causes the Comm control to generate the OnComm event when the transmit buffer is completely empty.

If the number of characters in the transmit buffer is less than value, the CommEvent property is set to comEvSend, and the OnComm event is generated. The comEvSend event is only fired once, when the number of characters crosses the SThreshold property. For example, if SThreshold equals five, the comEvSend event occurs only when the number of characters drops from five to four in the output queue. If there are never more than SThreshold characters in the output queue, the event is never fired.

Data Type

Integer