将表单隐藏到系统托盘
我将其发布在这里是因为当我尝试在系统托盘中隐藏表单时,我花了很多时间来理解整个事情是如何工作的。
我的问题基本上是:如何将正在运行的操作隐藏到系统托盘中?
金融理财师。
I'm posting this here since it took a lot of time for me to understand how the whole thing works when trying to hide a form in the systray.
My question basically was: How can I hide a windows form running operations to the system tray?
CFP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一步是显示您需要隐藏的内容。确保你没有将其设置为模态。
然后,创建一个通知图标,并将以下内容与其单击功能相关联:
不过要小心。如果您首先使用
ShowDialog
显示表单,则设置Visible = False
将关闭表单并销毁它(如果您使用与例如,表格)。The first step is to show the from that you will need to hide. Make sure you don't make it Modal.
Then, create a notification icon, and make associate the following with its click function:
Careful though. If you first showed the form using
ShowDialog
, then settingVisible = False
will close the form and destroy it (which can get nasty if you were using a separate thread which communicated with the form, for example).