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();
}
}
}
}
查看全文
相关阅读:
ps4 如何导出切片 单个图片
测试webservice的时候,如果出现这个错误:"The test form is only available for requests from the local machine"
js jquery 按钮点击后 60秒之后才能点击 60秒倒计时
有空研究一下 superwebsocket (底层是 supersocket) 用来实现 web聊天什么的
Vue学习笔记一:初识Vue
被爬虫了,嘻嘻嘻
Mybatis-generator自动生成器
SpringCloud笔记五:Feign
SpringCloud笔记四:Ribbon
SpringCloud笔记三:Eureka服务注册与发现
原文地址:https://www.cnblogs.com/cl1024cl/p/6204980.html
最新文章
【c++】标准模板库STL入门简介与常见用法
【Linux程序设计】之Linux库函数的使用,多文件程序开发,静态与共享函数
python IDLE 改变窗口背景颜色
【随笔】游戏程序开发必知的10大基础实用算法及其讲解
【转载】Linux下makefile详解--跟我一起写 Makefile
【LINUX/UNIX网络编程】之使用SOCKET进行UDP编程
iOS
iOS
iOS
iOS
热门文章
Xcode
iOS
iOS
iOS
iOS
iOS
让不支持MVC3的服务器/空间/虚拟主机 支持MVC3 (前提是必须支持 .net 4.0才可以)
MVC2 ,MVC3 ,MVC4,MVC5的区别,EF的各个版本的区别;LocalDB是个啥
转:关于VS2012连接MySql数据库时无法选择数据源
文字超过字符长度 显示… 点点点 jquery
Copyright © 2011-2022 走看看