我试图从非线程以外的线程上创建它的读取combobox.Text但我得到的错误:如何从线程以外的线程读取组合框?
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
Additional information: Cross-thread operation not valid: Control 'levelsComboBox' accessed from a thread other than the thread it was created on.
我用.Invoke之前,但只设置属性,怎么能我用它来阅读combobox.Text?因为.Invoke返回void,我需要一个字符串。或者还有另一种方法可以在没有调用的情况下执行它?
我认为这是对[如何获得返回值时的BeginInvoke /调用被称为重复C#](http://stackoverflow.com/questions/2214002/how-to-get-return-value-when-begininvoke-invoke-is-called-in-c) – 2011-04-01 16:30:49