怎样将窗体隐藏? >>shuker(秋风儿)、 cafecai(入门新手㊣) 在其他的类中是不能用Form这个类的啊,它还未创建!编译通不过!>>CMIC(大象)这样是可以,但是这样做后,怎样把它调出来呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在main中如果需要显示的时候application.run(form()) Form2 ob = new Form2();private void button1_Click(object sender, System.EventArgs e) { MessageBox.Show("显示"); ob.Show(); MessageBox.Show("隐藏"); ob.Hide(); MessageBox.Show("显示"); ob.Show();} 补充本窗体隐藏+NotifyIcon,本例为最小化时隐藏到通知盒private void Form1_Resize(object sender, System.EventArgs e) { if (this.WindowState == FormWindowState.Minimized){ //隐藏窗体 this.Visible = false; this.notifyIcon1.Icon = this.Icon; //显示通知盒图标 this.notifyIcon1.Visible = true; }}private void notifyIcon1_Click(object sender, System.EventArgs e) { //显示窗体 this.Visible = true; this.WindowState = FormWindowState.Normal; //隐藏通知盒图标 this.notifyIcon1.Visible = false;} 如何用C++实现人机语音交流? 求程序解释。。 急!大家帮忙推荐一本书(本人现在在书店) SQL delete 简单算法问题 格式化的字符串如何转化成数组或ArrayList winform线程中创建窗体卡死 程序问题 C#中数字字符串转换成int类型的问题 另外一台电脑的工程加到这一台电脑怎么加? 请问各位:用C#开发,用PrintDocument打印在98下出现异常怎样解决? 怎样启动“默认WEB站点”? 怎样得到和设置一个已经打开的Excel文件中的单元格的值
如果需要显示的时候application.run(form())
MessageBox.Show("显示");
ob.Show();
MessageBox.Show("隐藏");
ob.Hide();
MessageBox.Show("显示");
ob.Show();
}
if (this.WindowState == FormWindowState.Minimized){
//隐藏窗体
this.Visible = false;
this.notifyIcon1.Icon = this.Icon;
//显示通知盒图标
this.notifyIcon1.Visible = true;
}
}private void notifyIcon1_Click(object sender, System.EventArgs e) {
//显示窗体
this.Visible = true;
this.WindowState = FormWindowState.Normal;
//隐藏通知盒图标
this.notifyIcon1.Visible = false;
}