摘要:
c#桌面程序的窗口美化少不了自己重绘窗口,去掉标题栏自己添加元素是最简单的实现,不过没有了标题栏鼠标拖动窗体活动成了问题,百度搜到两种c#实现重绘的方法。一、重绘WndProc 1 protected override void WndProc(ref Message m) 2 { 3 if (m.Msg == 0x0201) //鼠标左键按下去的消息 4 { 5 m.Msg = 0x00A1; //更改消息为非客户区按下鼠标 6 m.LParam = IntPtr.Zero; //默认值 7 m.WParam = new IntPtr(2); //鼠标放在标题栏内 8 } 9 base.Wn 阅读全文
posted @ 2012-08-29 22:14
向上
阅读(350)
评论(0)
推荐(0)

浙公网安备 33010602011771号