i have created a code for log. it is intended to provide the user with a recent
history of various events, primarily used in data-gathering applications where one
might be curious how a particular transaction completed. In this case, the log
need not be permanent nor saved to a file.
*i have to show the status of a running process in the same line of listbox.*
for this i used the below code inside the for loop.the problem is that each time it
enters for loop list box get updated and there is flickering in listbox.i need to
avoid this flickering and also i cant include any delay in for loop since
process shouldn't be delayed. here listbox1 is the list box.
namespace WindowsFormsApplication1
{
class sample
{
int frame_cnt=0;
int sl =listBox1.Items.Count;
for(int i=0;i<928;i++)
{
int percent = (int)(((double)(frame_cnt) /
(double)(928)) * 100) + 0;
listbox1.Items.Add(percent.ToString());
listBox1.Items.RemoveAt(sl-1);
frame_cnt++;
}
}
}