简体   繁体   English

使用C#在任务栏中设置时钟小工具

[英]Clock Gadget in taskbar using C#

How can I add my clock gadget using C# like in below image 如何使用C#添加我的时钟小工具,如下图所示

时钟图像

I am making clock in Windows Form using C#. 我正在使用C#在Windows窗体中制作时钟。

How can I place my clock in taskbar and at the place where time is displayed in Notification area? 如何将时钟放在任务栏和通知区域中显示时间的位置?

Update: Is this can be done by notifyIcon ? 更新:这可以通过notifyIcon完成吗?

Poking around with Spy++ (installed by default with Visual Studio) you will find that the name of this window is TrayClockWClass. 使用Spy ++(默认使用Visual Studio安装),你会发现这个窗口的名称是TrayClockWClass。 You can then get a handle to it with some basic Pinvoke calls outlined in this blog post: 然后,您可以通过此博客文章中概述的一些基本Pinvoke调用来获取它的句柄:

http://vladimir-kurka.blogspot.com/2009/09/using-pinvoke.html http://vladimir-kurka.blogspot.com/2009/09/using-pinvoke.html

If what you are attempting is possible this should at least point you in the right direction. 如果您尝试的是可能的话,至少应该指向正确的方向。

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

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