(错误)以系统托盘中的简单格式代码显示 [英] (error) in simple form code which goes in system tray

查看:80
本文介绍了(错误)以系统托盘中的简单格式代码显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我将一个notifyicon从工具箱拖动到窗体中,然后在属性中设置图标.然后,将您的代码粘贴到以下表单中:

First I drag a notifyicon from toolbox to form, and set the icon in property. Then I paste your code to the form as below:

private void TrayMinimizerForm_Resize(object sender, EventArgs e)
{
   notifyIcon1.BalloonTipTitle = "Minimize to Tray App";
   notifyIcon1.BalloonTipText = "You have successfully minimized your form.";
 
   if (FormWindowState.Minimized == this.WindowState)
   {
      notifyIcon1.Visible = true; 
      notifyIcon1.ShowBalloonTip(500);
      this.Hide();
   }
   else if (FormWindowState.Normal == this.WindowState)
   {
      notifyIcon1.Visible = false;
   }
}
 
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
   this.Show();
   this.WindowState = FormWindowState.Normal;
}

有什么问题吗?它进入系统托盘,但没有气泡显示.因此,单击缩小"后,我无法在系统托盘中找到任何表格.

Is there any problem? It goes in system tray but no bubble form is show. So after clicking in minize i cant find any form in system tray.

推荐答案

1.无需重新发布,请在一个地方进行:如何浏览本文 a> [ ^ ]
您可以使用改善问题"链接来编辑/更新您的问题.

2.您似乎想向与其文章相关的作者提出这个问题.我建议您使用本文结尾处的论坛,以联系作者并快速获得答复.很少您会找到阅读此论坛的作者.因此,请在文章的消息论坛中发布相同的内容.

3.您是否下载了本文中提供的示例代码附件并进行了尝试(而不是粘贴粘贴代码并进行尝试)?也许您会看到那里的整个工作和实现本身可以澄清您的疑问.
1. No need to repost, follow at one place: how to go through this article[^]
You can use ''Improve Question'' link to edit/update your question.

2. It looks like you want to ask this question to an author related to his/her article. I would suggest you to please use the forum present at the end of the article in order to reach author and get quick response. Rarely you will find authors reading this forum. So, please post the same at the article''s message forum.

3. Did you download the sample code attachment present on the article and tried out (instead of copy-pasting code and trying)? May be you get to see the whole working and implementation there itself clarifying your doubts.


这篇关于(错误)以系统托盘中的简单格式代码显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆