| 发表于:2007-03-28 10:52:49 楼主 |
大家好 我做这样一个程序 从数据库读出数据,动态生成控件,tabpage控件从数据库读出后生成,listview控件也是,然后listview控件加到tabpage控件上, 最后把tabpage控件放到本来就有的tabcontorl控件上, 我的listview控件是继承来的 并加了几个事件,就是有消息来的时候,listview控件就更新相应项的内容, 但每次都会提示 :exception has been thrown by the target of an invocation (编译时没有错误,也没有引用com组件) 每个listview控件上的每一项都是一个线程在控制,就是说当有消息来时 ,就更新相应tabpage控件上的相应listview控件上的相应item项, 我的listview上的事件 : delegate void refreshhand(string group,string name, string msg); void refresh(string group,string name,string msg) { if(this.name==group) //这个用来判断是不是该接收这个消息 { if(this.invokerequerd) { refreshhand h=new refreshhand(refresh); this.begininvoke(h,new object[]{group,name,msg}); } else { this.item[name].subitem[ "status "].text=msg; } } } 帮帮看看 应该怎么做 弄了好久了 还没得到解决 |
|
|
|
|