隐藏窗口遇到的问题... 你是不是这样写的?this.WindowState=FormWindowState.Minimized;这样有时确实会“最小化后就跑到窗口的左下脚”。这样就可以了:this.Visible=false; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 怪有可能问题出现在你的sendmessage方法中 我从closing方法中加入了个MessageBox,确实把消息发送了...this.Visible=false;没加最后我调用的是this.Hide(); 在窗口的大小变化时作如下操作,不知道行不行啊?private void Form_Sizechang(object sender, System.EventArgs e){ if ( this.WindowState == System.Windows.Forms.FormWindowState.Minimized) this.Hide();} //将notifyicon1 设置Visible为 false,然后:private void Form1_Resize(object sender, System.EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { this.Visible = false; this.notifyIcon1.Visible = true; }}private void notifyIcon1_Click(object sender, System.EventArgs e) { this.Visible = true; this.WindowState = FormWindowState.Normal; this.notifyIcon1.Visible = false;}//你也可以在之前为notifyicon1 设置它的icon 和contextmenu 小弟做的一个OCR程序,用try catch 为何捕捉不到异常?? 调用动态库图片处理 怎么把外部excel数据源编译到exe中 界面框架和配置文件 Directory.CreateDirectory夸服务器调用问题?急 ~~XML的一个问题,在线等 今天中午台湾地震,我住这都晃了,这要是震了,我不就灭了吗,给大家散点分!!!拿去花吧。 我发现一个很奇怪的问题.关于 asp.net的DropdownList控件值的问题. 关于窗体显示问题 推荐有奖! 请问.NET中的SESSION该怎么设置超时时间? 这里有人做过用c#开发即时消息软件吗?
有可能问题出现在你的sendmessage方法中
没加
最后我调用的是this.Hide();
private void Form_Sizechang(object sender, System.EventArgs e)
{
if ( this.WindowState == System.Windows.Forms.FormWindowState.Minimized)
this.Hide();
}
if (this.WindowState == FormWindowState.Minimized) {
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}private void notifyIcon1_Click(object sender, System.EventArgs e) {
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.notifyIcon1.Visible = false;
}//你也可以在之前为notifyicon1 设置它的icon 和contextmenu