G
Guogang
Hi,
According to documentation, windows forms are single threaded.
I tried to call a Windows Forms method from a new thread as following. Seems
there is no problem update control across thread. I can see my list view
updated while the function "Update" is still running.
Is there something will go wrong potentially without using "BeginInvoke"?
//C# code, .Net Framework 1.1
Thread t = new Thread(new ThreadStart(Update));
....
private void Update()
{
ListViewItem item;
...
myListView.Items.Add(item);
Thread.Sleep(10000);
}
Thanks,
Guogang
According to documentation, windows forms are single threaded.
I tried to call a Windows Forms method from a new thread as following. Seems
there is no problem update control across thread. I can see my list view
updated while the function "Update" is still running.
Is there something will go wrong potentially without using "BeginInvoke"?
//C# code, .Net Framework 1.1
Thread t = new Thread(new ThreadStart(Update));
....
private void Update()
{
ListViewItem item;
...
myListView.Items.Add(item);
Thread.Sleep(10000);
}
Thanks,
Guogang