c#新手 请教。Winform 中 notifyIcon 的问题
在窗体 myorder 中 有
在myorder 中 menu 可以打开 其他窗体 print
但是问题出来了.. 当我关闭 print 窗体时.. 居然 启动了 notifyIcon 窗体缩去右下角的任务栏那里去了。
而且点击 他也不会 弹回来. 也不报错误!
请问是什么问题呢? 谢谢...
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.ShowInTaskbar = true; //显示在系统任务栏
this.WindowState = FormWindowState.Normal; //还原窗体
notifyIcon1.Visible = false; //托盘图标隐藏
}
}
private void Myorder_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) //判断是否最小化
{
this.ShowInTaskbar = false; //不显示在系统任务栏
notifyIcon1.Visible = true; //托盘图标可见
}
}
在myorder 中 menu 可以打开 其他窗体 print
private void printToolStripMenuItem_Click(object sender, EventArgs e)
{
Printer printr = new Printer();
printr.Owner = this;
printr.ShowDialog();
this.Hide();
}
但是问题出来了.. 当我关闭 print 窗体时.. 居然 启动了 notifyIcon 窗体缩去右下角的任务栏那里去了。
而且点击 他也不会 弹回来. 也不报错误!
请问是什么问题呢? 谢谢...
...全文
相关推荐
C#新手入门图文教程---基于winform的一个小例子
基于winform的一个小例子 从一个小例子熟悉C#的winform应用,从零学起,步步提升.废话不多说,直接上图。
Winform从入门到精通(14)——NotifyIcon(史上最全)
本文介绍NotifyIcon气泡通知控件的详细用法,包含所有属性和事件,绝对史上最全!
C# winForm实现的气泡提示窗口功能示例
主要介绍了C# winForm实现的气泡提示窗口功能,涉及C# winForm窗口属性与设置相关操作技巧,需要的朋友可以参考下
C# WinForm窗口最小化到系统托盘
C#编写最小化时隐藏为任务栏图标的 Window appllication.
C# WinForm调用Shell_NotifyIcon的示例代码
public class InnerClass: Form { private Shell_NotifyIconEx servicesClass = null; // 接受主CLASS 的实例句柄 internal InnerClass(Shell_NotifyIconEx _servicesClass) { servicesClass = _servicesClass; } private const int WM_LBUTTONDOWN = 0x0201; // 左键 private const int WM_RBUTTONDOWN = 0x204; //


