JVCL Help:TJvMTThreadToVCL.OnCanRead
From Project JEDI Wiki
Jump to navigationJump to searchJVCL Help: TJvMTThreadToVCL.OnCanRead Property
[+] TJvMTThreadToVCL Methods
[+] TJvMTThreadToVCL Properties
Search in JVCL Help
Search in all projectsSummary
Occurs when at least one object can be read from the buffer.
Pascal
propertyOnCanRead: TNotifyEvent;
Description
Called in the context of the main VCL thread. At least one object can be read from the buffer during this event. For each object in the buffer this event will fire exactly once.
The following example reads an TMsg object from the buffer and frees it after processing. type
TMsg = class
Msg: string;
end;
procedure TForm1.JvMTThreadToVCL1CanRead(Sender: TObject);
var
M: TMsg;
begin
M := TMsg(JvMTThreadToVCL1.Read);
try
// Process message M
ShowMessage(M.Msg);
finally
M.Free;
end;
end;
See Also
TJvMTThreadToVCL.Read, TJvMTThreadToVCL.Write
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page