有没有方法将Form放到系统托盘里,并且在使用alt+tab切换任务时,该Form不显示在其中?
解决方案 »
- c#使用Webbrowser如何禁止javascript脚本运行或过滤掉所有脚本?
- 0开始,想用c#写个小软件
- 这样的XML如何读取和写入
- websrvice和webconfig问题
- 父页面使用showModalDialog方法弹出子页面时,如何使父页面的内容正常显示,而不是空白
- 求C#的练习题,大散分50
- contextMenuStrip1问题,急!!!!!
- 我想 从一个文件的 102400字节处开始读取流 写入一个byte[],怎么实现?
- 请问如何往ACCESS数据库插入一条记录啊??我的代码哪里有问题??
- 图片Image a_image
- C#中SmtpMail.Send()运行没有报错,但是邮箱没有收到邮件
- 关于层被遮住的问题
然后使用如下语句隐藏窗体就可以了:
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
问题1 是你的新要求而已.
2 Alt+Tab Form 没有显示在其中...显然是你自己的问题.
================
private void showFormNormal(object sender , System.EventArgs e ){
//this.TrayIcon.Visible = false;
this.TrayIcon.Click -= new System.EventHandler ( this.showFormNormal );
this.TrayIcon.Click += new System.EventHandler ( this.miniSizeForm );
this.Show();
this.WindowState = System.Windows.Forms.FormWindowState.Normal;
} private void miniSizeForm(object sender , System.EventArgs e ){
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.TrayIcon.Click -= new System.EventHandler ( this.miniSizeForm );
this.TrayIcon.Click += new System.EventHandler ( this.showFormNormal );
}