多线程间操作控件出错,用这个方法

                this.Invoke((EventHandler)(delegate
                {
                   
// pictureBox1.Image = img;
                    txtCode.Text =getPicStr(img);
                }));
不要再用Control.CheckForIllegalCrossThreadCalls = false;这种方法了,会有莫名其妙的错误
posted @ 2011-06-20 17:55  拼博之路  阅读(201)  评论(0编辑  收藏  举报