Sunday, July 22, 2012

Control Invoke

Control calls without Invoke (with delegate) from other thread sometimes works but throws exception in Visual Studio

For example modifying the example from http://msdn.microsoft.com/en-US/library/a1hetckb(v=vs.80) to read
expand collapse
public void Run()

        {

            myFormControl1.myListBox.Items.Add("test from thread");

...
works in non-debug mode:

Full Code: expand collapse

1 comment:

  1. Just when I thought the group couldn’t get greater, you detect ways to make it happen!This article is a good one !!! Thanks so much for all you have put into it.
    http://www.dapfor.com/en/net-suite/net-grid/features/performance

    ReplyDelete