zoukankan
html css js c++ java
无闪烁的listview
Q:http://topic.csdn.net/u/20071205/15/116fa433-69bc-418d-a31c-3c279abc8007.html
A:
public
partial
class
Form1 : Form
...
{
class
DoubleBufferListView : ListView
...
{
public
DoubleBufferListView()
...
{
SetStyle(ControlStyles.DoubleBuffer
|
ControlStyles.OptimizedDoubleBuffer
|
ControlStyles.AllPaintingInWmPaint,
true
);
UpdateStyles();
}
}
public
Form1()
...
{
InitializeComponent();
}
DoubleBufferListView lv
=
new
DoubleBufferListView();
private
void
Form1_Load(
object
sender, EventArgs e)
...
{
this
.Controls.Add(lv);
lv.Height
=
300
;
lv.Width
=
300
;
new
System.Threading.Thread(
new
System.Threading.ParameterizedThreadStart(doAdd)).Start();
}
void
doAdd(
object
obj)
...
{
if
(
this
.InvokeRequired)
...
{
this
.Invoke(
new
System.Action
<
object
>
(doAdd),
new
object
[]
...
{ obj }
);
}
else
...
{
for
(
int
i
=
0
; i
<
100
; i
++
)
...
{
this
.lv.Items.Add(
new
ListViewItem(
"
jinjazz
"
+
this
.lv.Items.Count.ToString()));
System.Threading.Thread.Sleep(
10
);
Application.DoEvents();
}
}
}
}
查看全文
相关阅读:
【转】几种现代GPS测量方法和技术
【转】GPS连续运行单参考站解决方案
【转】IGS相关
【转】时标与历法
【转】matlab针对不同格式文件的读写
matlab判断文件或文件夹是否存在
matlab获取文件夹中的所有文件名(dir)
fopen fclose feof fgets fetl
结合find和cp批量查找文件并复制到指定文件夹中
Android开发--环境配置
原文地址:https://www.cnblogs.com/cl1024cl/p/6204980.html
最新文章
某游戏公司面试题
c++笔试题贪吃蛇问题
字符串取地址
输入数字个数以及要找的位置,输出以字典序为准的那个数
delete[] p与 delete p
友元函数友元类
c++ sizeof,strlen, length
一个数是否为2的次幂
C++旅馆问题。
每天一个linux命令(11):nl命令
热门文章
每天一个linux命令(10):cat 命令
每天一个linux命令(9):touch 命令
每天一个linux命令(8):cp 命令
每天一个linux命令(6):rmdir 命令
每天一个linux命令(7):mv命令
每天一个linux命令(5):rm 命令
每天一个linux命令(3):pwd
每天一个linux命令(2):cd命令
每天一个linux命令(1):ls命令
【转】GPS定位原理
Copyright © 2011-2022 走看看