如何点最小化后,让软件成为小图标,然后停发在系统任务栏中运行? 我找到了个用button的,点后触发事件为:this.Visible=false;this.notifyIcon.Visible=true;最小化应该也会触发一个事件,只要能做找到就好了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用C#做的是winform要让用户最小化后在系统任务栏中运行,而不是普通任务栏顶! private void Form1_Resize(object sender, System.EventArgs e) { if(this.WindowState==FormWindowState.Minimized) { this.ShowInTaskbar=false; this.Visible=true; this.notifyIcon1.Visible=true; } } private void contextMenu1_Popup(object sender, System.EventArgs e) { //退出程序 this.notifyIcon1.Visible=false; this.Close(); Application.Exit(); } private void notifyIcon1_DoubleClick(object sender, System.EventArgs e) { //显示窗体 this.Visible=true; } private void TimerComputerShutdown_Closing(object sender, System.ComponentModel.CancelEventArgs e) { //指定取消关闭事件 e.Cancel=true; this.Visible=false; //使得notify控件显示在任务栏上 this.notifyIcon1.Visible=true; } private void Form1_Resize(object sender, System.EventArgs e) { if(this.WindowState==FormWindowState.Minimized) { this.ShowInTaskbar=false; this.Visible=true; this.notifyIcon1.Visible=true; } }-------------------------------------------------------------------设置的这一大堆代码都没起效,真是郁闷 http://www.daima.com.cn/Info/28/Info29511/ 错误在那 C#设计查询系统问题 菜鸟一只。。真心求解。。 请问有没有人做过菜单抓图? 现金悬赏,价格你开:c#系统调试运行时会僵死,连同Microsoft Visual Studio 一并失去响应?另附100分 请教CRC校验算法 方法里面的那两个参数是什么意思啊 请假功能的设计 紧急请C#高手看看,一个错误.不知道怎么修改下!!! 急!急!ToInt64(num, type) 我的分怎么一下少了200 构造函数应该什么情况下用到?有什么优势和作用? 关于数据库输出的问题
要让用户最小化后在系统任务栏中运行,而不是普通任务栏
顶!
{
if(this.WindowState==FormWindowState.Minimized)
{
this.ShowInTaskbar=false;
this.Visible=true;
this.notifyIcon1.Visible=true;
}
}
{
//退出程序
this.notifyIcon1.Visible=false;
this.Close();
Application.Exit(); } private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
{
//显示窗体
this.Visible=true; } private void TimerComputerShutdown_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//指定取消关闭事件
e.Cancel=true;
this.Visible=false;
//使得notify控件显示在任务栏上
this.notifyIcon1.Visible=true;
}
private void Form1_Resize(object sender, System.EventArgs e)
{
if(this.WindowState==FormWindowState.Minimized)
{
this.ShowInTaskbar=false;
this.Visible=true;
this.notifyIcon1.Visible=true;
}
}
-------------------------------------------------------------------
设置的这一大堆代码都没起效,真是郁闷