
c#学习笔记
assuper
这个作者很懒,什么都没留下…
展开
-
C#中实现窗口拖动
const int WM_NCLBUTTONDOWN = 0xA1;const int HT_CAPTION = 0x2;[DllImport("user32.dll")]static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);private void Form2_MouseDown(object sender, MouseEventArgs e){ if (e.Button =原创 2011-02-20 14:42:00 · 1344 阅读 · 0 评论 -
c#捕获窗口最小化和还原的事件
<br />下面的代码演示了当前窗口最小化、还原的时候另一个窗口f2也最小化、还原的功能,参考了http://topic.youkuaiyun.com/t/20020717/09/879937.html 中wistaria的回答<br /> [DllImport("user32.dll", EntryPoint = "SendMessage")] private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam,原创 2011-02-20 14:59:00 · 4079 阅读 · 0 评论 -
c#使用系统ImageList显示文件图标
今天在百度知道上看到一个提问,要做个简单的文件浏览器,于是拿出以前写的半成品修改了一下,中间碰到了一点小麻烦。主要是如何在c#里面给ListView控件设置图标时使用系统的ImageList,而不是自己创建ImageList对象。先把封装了提取图标等API的FileIcon类贴出来。 class FileIcon { [StructLayout(Layou原创 2012-03-05 13:45:35 · 6114 阅读 · 0 评论