![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
winform
Tonny8711
这个作者很懒,什么都没留下…
展开
-
winform禁用右上角的退出按钮
将一下代码放入Form.cs中 #region 禁用关闭按钮需要 [DllImport("USER32.DLL")] public static extern int GetSystemMenu(int hwnd, int bRevert); [DllImport("USER32.DLL")] public static extern int Remov...翻译 2019-07-29 10:11:44 · 223 阅读 · 0 评论 -
winform重写右上角退出按钮事件
重写OnClosing点击右上角的退出按钮会最小化 protected override void OnClosing(CancelEventArgs e) { this.ShowInTaskbar = false; this.WindowState = FormWindowState.Minimized; e.Cancel = t...翻译 2019-07-29 10:15:57 · 1614 阅读 · 0 评论