Paul Spain wrote:
> VCL components should only be manipulated from the main
> thread context.
> TThread.Synchronize() provides this service for thread methods.
>
> >From your thread, call Synchronize(DisplayResponse) rather than
> DisplayResponse on its own.
Thank you Paul.
Yes, Synchronize is good for resolving conflicting thread issues, and I did
try it first using:
Synchronize(DisplayResponse) //DisplayResponse is a thread method
>From DisplayResponse I'd call a DisplayResponse method of the component,
which would add a string to a memo.
But, the problem was the same. The execution would go to:
function SendMessage; external user32 name 'SendMessageA';
in Windows unit before it got into synchronised method, and it wouldn't
return.
I can't use a form's method since I can't have form's unit in component's
uses clause, because the form is already using the component (can I?).
Best regards,
Sergei
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/