开发者

What methods are available in the WinAPI for accessing programs in the system tray?

开发者 https://www.devze.com 2022-12-30 04:58 出处:网络
What DLLs would have functions for accessing things in the System Tray? Do I even need the winapi, or are there classes already available in the Class Library for this? I\'m hoping to find a way to em

What DLLs would have functions for accessing things in the System Tray? Do I even need the winapi, or are there classes already available in the Class Library for this? I'm hoping to find a way to emulate all the functionality of the system tray, i.e. the icons,开发者_StackOverflow中文版 the mouseover text, and the capability to display the context menu.


You can enumerate tray icons, retrieve tooltips, emulate single click, double and right click. See this article which explains how to do it with winapi: Shell Tray Info - Arrange your system tray icons


There is the Shell_NotifyIcon function to work with tray icons natively. With .NET there is NotifyIcon class you can use, which does the job.

0

精彩评论

暂无评论...
验证码 换一张
取 消