T
TomTom
In my C# WinForm program, I create a new thread to do a long process of
inserting data from Access files to SQL DB. The problem is that some parts
of the MainForm pertially disappear while the new thread is doing its task.
I found many articles on this on the Internet and followed the example from
http://www.codeproject.com/csharp/workerthread.asp. Still some parts of the
MainForm (buttons) disappear and it appears that the code is not updating
the label on the MainForm properly. Are there any areas that I might be
overlooking?
The code looks like this, although this partial code may not make much
sense..
mainForm.BeginInvoke(mainForm.delegateUpdateMainUi, new Object[] {"Number of
records inserted: " + numberOfRecordsProcessed.ToString()} );
Thanks,
TomTom
inserting data from Access files to SQL DB. The problem is that some parts
of the MainForm pertially disappear while the new thread is doing its task.
I found many articles on this on the Internet and followed the example from
http://www.codeproject.com/csharp/workerthread.asp. Still some parts of the
MainForm (buttons) disappear and it appears that the code is not updating
the label on the MainForm properly. Are there any areas that I might be
overlooking?
The code looks like this, although this partial code may not make much
sense..
mainForm.BeginInvoke(mainForm.delegateUpdateMainUi, new Object[] {"Number of
records inserted: " + numberOfRecordsProcessed.ToString()} );
Thanks,
TomTom