Problem While receiving events from a thread
<p>I'm Doing a project on FileTransfer in which i have a listview , i will get events from one of my class file for updating the percentage of the file sent so far,after receiving it i will place the percentage in my listview ,while doing that the listview got
a flickering effect how to avoid it.i used application.doevents() but it doesnt works.     i have seen in torrents while updating the percent the list doesnt get flickered
how to achieve this .</p>

<pre><code>void Sender_Progress(int CurrentValue, string Ip) // here im receiving Events
    {
        try
        {
            //if (CurrentValue == 1)
            //    UpdateTimer.Enabled = true;
            //list_send.Items[CurrentValue].SubItems[4].Text = Ip.ToString();
            //Application.DoEvents();
            obj = new object[] {CurrentValue,   Ip };
            list_send.Invoke(new UpdateList(UpList), obj);

        }
        catch(Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
    public void UpList(int Val, string ind) // here im updating the listview
    {
        Application.DoEvents();
        int index = 0;
        index = Convert.ToInt32(ind);
        index = index - 1;
        list_send.Items[index].SubItems[4].Text = Val.ToString();
        if (Val == 100)
        {
            list_send.Items[index].SubItems[2].Text = "Completed.";
            //UpdateTimer.Enabled = false;
        }
        //Application.DoEvents();
    }
</code></pre>
