我的程序里有线程处理部分,为什么关闭时候总出错呢?》
unit xc01;interfaceuses
Classes;type
Thread01 = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;implementationuses Refreshdata,menu,fbxx;{ Important: Methods and properties of objects in visual components can only be
used in a method called using Synchronize, for example, Synchronize(UpdateCaption); and UpdateCaption could look like, procedure Thread01.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }{ Thread01 }procedure Thread01.Execute;
begin
FreeOnTerminate:=true;
if bl_xc='gxdata' then
Refreshdata_w.bjdx
else
if bl_xc='fbxx' then
fbxx_w.appendsave;
end;end.
unit xc01;interfaceuses
Classes;type
Thread01 = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;implementationuses Refreshdata,menu,fbxx;{ Important: Methods and properties of objects in visual components can only be
used in a method called using Synchronize, for example, Synchronize(UpdateCaption); and UpdateCaption could look like, procedure Thread01.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }{ Thread01 }procedure Thread01.Execute;
begin
FreeOnTerminate:=true;
if bl_xc='gxdata' then
Refreshdata_w.bjdx
else
if bl_xc='fbxx' then
fbxx_w.appendsave;
end;end.
解决方案 »
- delphi 急
- 如果让控件的事件调用自己编写的过程或者函数?
- 很简单 的一段代码,就是不知道哪有错误,帮帮忙了
- 我修改了DBCtrl.pas的 BtnTypeName: array[TNavigateBtn] of PChar的内容,结果变成了这样。如何解决?谢谢
- 请问关于adotable的刷新问题
- 怎么解决ado连接sql失败前不卡死的问题
- 谁愿意帮帮菜鸟???
- 往另一个程序的文本框输入数据?
- 假如设置Edit编辑框的最大长度为20,正常输入超长可以提示,但是Paste的内容超长,则有什么办法也可以提示?
- 求助:delphi 用uni连的mysql,怎么批量新增数据类是ado的locktype
- 如何保存字典的实际值?
- 程序里有子线程如果在不知道子线程是否执行完毕前提下要强行关闭主程序要注意什么?为什么子线程里的代码不执行呢
你没有再手动释放吧?