日期:2014-05-17 浏览次数:20953 次
private void Form1_Load(object sender, EventArgs e)
{
ListViewLoad();
listView1.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance
------解决方案--------------------
System.Reflection.BindingFlags.NonPublic).SetValue(listView1, true, null);//这句有注释和没注释效果很明显
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
listadd();
}
public void listadd()
{
ListViewItem lvi;
listView1.Items.Clear();
for (int i = 0; i < 20; i++)
{
lvi = new ListViewItem((listView1.Items.Count + 1).ToString());
lvi.SubItems.Add(i.ToString());
lvi.SubItems.Add((i + 1).ToString());
lvi.SubItems.Add((i + 2).ToString());
listView1.Items.Add(lvi);