码迷,mamicode.com
首页 > Windows程序 > 详细

Winform启动时隐藏不显示

时间:2018-09-04 13:43:40      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:启动   event   winform   task   info   ide   bar   component   pretty   

我最终用了这个方法:
1.MainForm的构造方法中添加:

public MainForm()
{
    InitializeComponent();

    this.ShowInTaskbar = false;
    this.Opacity = 0;
}

 

2.MainForm的Shown事件中添加:

private void MainForm_Shown(object sender, EventArgs e)
{
    this.Hide();

    this.ShowInTaskbar = true;
    this.Opacity = 1;
}

Winform启动时隐藏不显示

标签:启动   event   winform   task   info   ide   bar   component   pretty   

原文地址:https://www.cnblogs.com/lehoho/p/9583460.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!