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();
}
}
}
}
查看全文
相关阅读:
【BZOJ4637】期望 Kruskal+矩阵树定理
IEnumerable是什么
(转)IIS windows认证
使用pgrouting进行最短路径搜索
Nginx设置防止IP及非配置域名访问
java 调用c# web api 代码
一台机器部署多个tomcat服务 nginx反向代理多个服务 笔记
利用Kettle 从Excel中抽取数据写入SQLite
sql server 统计信息
sql server 索引碎片相关问题
原文地址:https://www.cnblogs.com/cl1024cl/p/6204980.html
最新文章
WebMisCentral-Client 适配MySql数据库
EntityFramework 多数据库链接,MySql,SqlServer,Oracel等
MSSQL 2012 修改所有表的架构Schame
WebMisSharp更新了,最新版本1.5.2,WebMisCentral-Client最新版
WebMisSharp,WebMisCentral,企业框架正则表达式规则共享专版
compass Errno::EACCES on line ["897"] of C: Permission denied
【CF506E】Mr. Kitayuta's Gift dp转有限状态自动机+矩阵乘法
【CF526F】Pudding Monsters cdq分治
【CF553E】Kyoya and Train 最短路+cdq分治+FFT
【CF566C】Logistical Questions 点分
热门文章
【CF573D】Bear and Cavalry 线段树
【CF576E】Painting Edges 线段树按时间分治+并查集
【CF582E】Boolean Function 树形DP+FWT
【CF587F】Duff is Mad AC自动机+分块
【CF587D】Duff in Mafia 二分+前缀优化建图+2-SAT
【BZOJ5210】最大连通子块和 树剖线段树+动态DP
【CF944G】Coins Exhibition DP+队列
【CF717G】Underfail 费用流
【CF679D】Bear and Chase 最短路+乱搞
【BZOJ2671】Calc 数学
Copyright © 2011-2022 走看看