昨天的一个帖子,在界面上能实现动态修改控件的值,现在需要在线程里面修改。procedure TReadThread.Draw();
var
tmpFrm: Tfr_entry;
PropInfo: PPropInfo;
con:TComponent;
begin
tmpFrm := Tfr_entry.Create(con);//这个con没有初始化
try
con := tmpFrm.FindComponent('Label'+IntToStr(pindex));
if con = nil then
Exit;
PropInfo := GetPropInfo(con.ClassInfo, 'Caption');
if Assigned(PropInfo) then
SetStrProp(con, PropInfo, pvalue);
finally
tmpFrm.Destroy;
end;
end;
在多线程里面怎样修改
var
tmpFrm: Tfr_entry;
PropInfo: PPropInfo;
con:TComponent;
begin
tmpFrm := Tfr_entry.Create(con);//这个con没有初始化
try
con := tmpFrm.FindComponent('Label'+IntToStr(pindex));
if con = nil then
Exit;
PropInfo := GetPropInfo(con.ClassInfo, 'Caption');
if Assigned(PropInfo) then
SetStrProp(con, PropInfo, pvalue);
finally
tmpFrm.Destroy;
end;
end;
在多线程里面怎样修改
解决方案 »
- 菜单一般是在窗体的左上方的,能不能放在左边或右边,甚至下边呢?
- 多字段内容提取及统计?
- 请教:webservice如何实现身份验证?
- And 怎么不起作用le
- FastReport/ReportMachine全能报表编辑器!
- 怎么使dataset的一个field保存和显示的数据不同
- 指针数组的释放
- 为什么delphi xe 中DatasetProvider 的BeforeGetRecords的参数OwnerData: OleVariant总是空值?
- ADOTable1.Filter:=' (qydm >= ''01'') and (qydm <= ''01ZZ'') ' ????
- 求问COMBOBOX获取值的问题
- 在线等,fastreport报表问题。
- 关于软件更换皮肤
Tfr_entry是一个界面,窗体。我需要在多线程类里面修改Label的值上面的问题就是tmpFrm := Tfr_entry.Create(con);的时候异常。
应该是con没有初始化。