SThreshold Property

       

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

Syntax

object.SThreshold [ = value ]

The SThreshold property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
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 MSComm 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. 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