一些小技巧,持续更新[C#]
引爆你的博客,程序开发,源代码下载,.net,数据库,Access,SqlServer,Google博客优化,费空间免费域名
//防止窗口拖动 protected override void WndProc(ref Message m) { // WM_NCLBUTTONDOWN = 0xA1 // HTCAPTION = 2 if (m.Msg == 0x00A1 && m.WParam.ToInt32() == 2) return; base.WndProc(ref m); } //点击关闭按钮的时候最小化 protected override void OnClosing(CancelEventArgs e) { e.Cancel = true; this.WindowState = FormWindowState.Minimized; base.OnClosing(e); }
0 评论:
发表评论