rt
解决方案 »
- log4net相关 当晚解决再送200分
- 数据库获取图片怎么分页
- 字符串处理:100100 ,100110,两位两位一起的, 我想把右边出现的00 去掉,
- 请问C#2005中多表头怎么做啊?
- richtextbox的问题
- 为什么鼠标放到picturebox上后就会报错,打开图片后,鼠标再放上去就没事了?
- 关于如何把DATATABLE中的数据安一定格式打印的问题(最好能给个例子)谢谢
- 菜鸟问题:如何在VS中编写在IE中用的窗体控件
- VC基础不错,转C#应该看什么书?
- 非常有现实意义的一个简单问题,问过好几次了,各位高手的解答都不能实现要求
- c#基础以上的学习路线?? 包括接口的应用,程序的编写。
- 如何设置生成的word表格的线条的粗细?
web?你点个asp.net自带的按钮就刷新了!
-----------------------------
是windows的桌面,还是桌面上的所有窗口?
public static extern bool UpdateWindow(IntPtr hWnd);
public static extern IntPtr GetDesktopWindow();
我这样调用:
UpdateWindow(GetDesktopWindow());
没有反应,不见有刷新。
?
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern bool RedrawWindow(IntPtr hwnd, COMRECT rcUpdate, IntPtr hrgnUpdate, int flags);//调用示例如下:
RedrawWindow(GetDesktopWindow(), null, IntPtr.Zero, 0x85);
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern bool InvalidateRect(IntPtr hWnd, COMRECT rect, bool erase);这个方法及上一个方法RedrawWindow中的COMRECT 的声明如下:
public class COMRECT
{
public int left;
public int top;
public int right;
public int bottom;
public COMRECT()
{
}
public COMRECT(int left, int top, int right, int bottom)
{
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
}
用RedrawWindow成功了!