|
|
От: |
Alex Dav
|
|
| Дата: | 22.10.10 10:27 | ||
| Оценка: | |||
GZ>public static class MyControlInvoker
GZ>{
GZ> public void Invoke(this Control ctrl, Action act)
GZ> {
GZ> if (ctrl.InvokeRequired)
GZ> ctrl.Invoke(act);
GZ> act();
GZ> }
GZ>....
GZ>}
GZ>//using
GZ>мyForm.Invoke(()=>MessageBox.Show(msg));
GZ>