简体   繁体   English

如何在标题栏中添加“最小化系统托盘”按钮?

[英]How to add a “minimize to systray” button in the TitleBar?

How I can add a "minimize to systray" near the "minimize" button in the form's TitleBar? 如何在窗体的TitleBar中的“最小化”按钮附近添加“最小化到系统托盘”?

Is easy or hard for a beginner? 对初学者来说容易还是困难? I need to do it with the WinAPI? 我需要使用WinAPI吗?

I can't find any info or full example about this. 我找不到有关此的任何信息或完整示例。

PS: I'm using VB.NET on Win7 PS:我在Win7上使用VB.NET

On the nView menu there is something like this, or else you could set the formborderstyle to none, add a button, and add this code: 在nView菜单上有类似这样的内容,否则您可以将formborderstyle设置为none,添加一个按钮,然后添加以下代码:

Dim i As New NotifyIcon With {Set properties here}
Me.Hide()

Then add an event to the notify icon to make the form show. 然后将事件添加到通知图标,以使表单显示。

EDIT: I just found this link: Adding Custom title bar buttons . 编辑:我刚刚找到此链接: 添加自定义标题栏按钮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM