property Active : Boolean
Default: True
Determines whether the terminal is accepting serial events.
Setting Active to True causes the terminal to start processing serial and keyboard data and to display this information in the terminal window. At run time, if an attempt is made to set Active to True without a serial port component being assigned to the ComPort property, or without an emulator component being assigned to the Emulator property, the attempt is ignored. It is acceptable to set Active to True at design time; this causes the terminal to start processing events automatically when the form is created at run time.
You must set Active to False if the terminal is being used in combination with another component, such as a file transfer component, that needs exclusive access to some or all of the data stream. During a file transfer, set Active to False for the duration of the transfer and to True when the transfer is over and data should appear in the terminal window again.
The following example sets Active to False as it starts receiving a file to prevent the terminal from displaying the received data. An OnProtocolFinish event re-enables the terminal window once the protocol informs the application that the transfer is complete.
ApxTerminal1.Active := False;
ApxProtocol1.StartReceive;
...
procedure TMyForm.ProtocolFinish(CP : TObject;
ErrorCode : Integer);
begin
ApxTerminal1.SetFocus;
ApxTerminal1.Active := True;
end;