通过本文主要向大家介绍了c#winform,c#winform窗体美化,c#winform教程,c#winform视频教程,c#winform开发框架等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
一种方法是可以在窗体的属性面板将窗体的 ControlBox属性设置为false,或者在窗体的构造函数中这样写:
{
e.Cancel = true;
}
// 重写OnClosing使点击关闭按键时窗体能够缩进托盘
protected override void OnClosing(CancelEventArgs e)
{
this.ShowInTaskbar = false;
this.WindowState = FormWindowState.Minimized;
e.Cancel = true;
}
</div>