Can someone tell me how to use Synchronize method within IdTCPServer.OnExecute event. I want to access some component on a main form and I read that you cannot
access it directly from OnExecute event safely. But when I call Synchronize method where I access main form's component I get Access violation error.
access it directly from OnExecute event safely. But when I call Synchronize method where I access main form's component I get Access violation error.
解决方案 »
- I/O错误
- RichEdit问题
- 请教:函数定义之 read / write
- 我的D7怎么运行不了abort; ?????????
- 如何动态的将BDE的TDATABASE控件和mssqlserver连接起来.
- (送分)从视频扑捉卡上扑捉图像
- 请问:write('x=',x:20:10)如何解释?
- 用QuickRep控件在Delphi6里做打印欲览的时候,欲览完毕后,在最上工具栏上(有next page、print等按钮)。。看里面吧:
- Table使用中常报的3个错.
- 你会不会呢?如果会的话,能不能告诉我?
- 关于from.create、form.activate和form.close的问题
- qrlabel的visiable怎么用?
// This example shows how to call a button抯 click method in a thread-safe manner:
procedure TMyThread.PushTheButton;begin
Button1.Click();
end;procedure TMyThread.Execute;
begin
...
Synchronize(PushTheButton);
...
end;
procedure TServerFrmMain.ServerExecute(AThread: TIdPeerThread);
begin
.
.
.
AThread.Synchronize(test);
.
.
.
end;