Click to See Complete Forum and Search --> : PocketPC Listview filled from trhead lockups app??? Any solutions?


Tadango
November 14th, 2005, 04:10 AM
I have a simple plain listview in detail view. I fill the listview from a thread. Works ok until i touch the screen. Then it completely freezes... What could be the problem? A listbox has no problem....

I created a new pocket pc project en only added 1 listview en created 3 columns en changed the view to detail.

My code:
private void Form1_Load(object sender, System.EventArgs e)
{
System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(test));
t.Start();
}

private void test()
{
while(true)
{
ListViewItem lvi = new ListViewItem("ok");
lvi.SubItems.Add("bla");
lvi.SubItems.Add("bla");
this.listView1.Items.Add(lvi);
System.Threading.Thread.Sleep(200);
}
}