摘要: 前段时间需要用窗体来实现消息弹窗,没办法Form实在太丑了,得把它隐藏掉,可隐藏掉之后就没有办法拖动了,到网上搜索了一下资料,实现拖动方法还是挺简单的,通过api来实现即可: [DllImport("user32")] private static extern bool ReleaseCapture(); [DllImport("user32")] private static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public const int 阅读全文
posted @ 2011-03-15 20:05 freeman_rain 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 今天做个提示信息,需要控制文字显示的行间距,原本是想用label来做,后来发现并没有相关的属性可以设置,到网上搜索了一下,唯一的方法似乎只能是自己控制重绘,不想使用这么麻烦的处理,于是又尝试了其它的控件richtextbox,发现还是没有可以直接设置的属性,不过却可以通过api来实现,实现方法如下: //定义常量: //具体是干什么用的我自己也不清楚 public const int WM_USER = 0x0400; public const int EM_GETPARAFORMAT = WM_USER+61; public const int EM_SETPARAFORMAT = WM_U 阅读全文
posted @ 2011-03-15 19:33 freeman_rain 阅读(1516) 评论(1) 推荐(0) 编辑