المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : ListView annoying



C# Programming
11-12-2009, 04:01 AM
Im doing some operations in BackgroundWorker's DoWork event. So when I call the following line, it works good but when I call second one it shows "Cross-thread operation not valid" error.

backgroundWorker1.ReportProgress(((b + 1) * 100) / listView1.Groups[a].Items.Count, new object[] { 1, listView1.Groups[a].Items[b].SubItems[0].Text });

backgroundWorker1.ReportProgress(((b + 1) * 100) / listView1.Groups[a].Items.Count, new object[] { 1, listView1.Groups[a].Items[b].Index });


I know how to fix this error. But my question is why its not raising with first line ??

I tried with DGV and it works good.



TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87?‘6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8?mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y


-----------------------------------------------
128 bit encrypted signature, crack if you can