问题标签 [trayicon]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
480 浏览

c# - TrayIcon 菜单中的 Aero 边框和其他控件

我正在为 Windows 编写一个系统托盘应用程序(从这个线程收集了很多信息)。我有 ContextMenu 工作 - 你可以右键单击并以这种方式执行功能。

然而,我希望在左键单击时弹出一个现代、丰富的界面,就像大多数内置的 Windows 7(可能还有 Vista)托盘图标一样。我指的是 Aero 衬里,以及添加看似任意控件(例如音量滑块、网络选择器)的明显能力。

我不确定从哪里开始。是创建一个“正常”窗口并严格限制它的问题吗?如果是这样,怎么做?(如果归结为 Windows 窗体与 WPF,后者更可取)。

0 投票
2 回答
3869 浏览

c# - 气球提示文字必须有非空值异常

OnStateChange() 时出现“气球提示文本必须具有非空值”异常。当我的应用程序最小化时调用此方法。

我在 MainWindow 构造函数中初始化 TippuTrayNotify

请问有什么解决办法

0 投票
1 回答
1564 浏览

windows - 为什么托盘图标上下文菜单不适用于我的 RemoteApp?

我有一个应用程序,它使用Shell_NotifyIcon. 该图标有一个包含各种重要命令的上下文菜单。当应用程序在本地系统上运行时,上下文菜单可以正常工作。但是,当应用程序作为终端服务RemoteApp运行时,右键单击该图标不会显示上下文菜单。用于打开上下文菜单的各种基于键盘的方法也不起作用。

双击图标仍然按预期运行,所以我知道它并没有完全损坏。不过,我们需要上下文菜单也能正常工作。有人知道可能出了什么问题吗?

编辑:还有一条信息:如果我按 Ctrl+Alt+End 打开 Windows 安全屏幕(让您注销、锁定会话等),然后关闭该屏幕,上下文菜单开始工作。

0 投票
2 回答
782 浏览

delphi - Delphi - 如何找到重复出现的“幽灵”托盘气球弹出窗口的来源?

我有一个 D2006 应用程序,它通过托盘气球提示通知各种事件。每隔一段时间,但不是很频繁——比如应用程序的 10 次调用中有 1 次——其中一个提示决定它会一次又一次地弹出……永远。唯一阻止它的是关闭应用程序。

如果应用程序发出另一个气球 int,它会替换幻影提示,但在新提示超时后,幻影提示会返回。同样,如果我关闭幻影提示,它会立即返回。

我已经验证不会重复调用创建提示的代码。暗示源自内心深处的某个地方。

0 投票
2 回答
2125 浏览

gtk - pygtk 系统托盘图标不起作用

我正在尝试在我的程序中显示系统托盘图标。当我启动我的程序时,它显示窗口,当我关闭窗口时,它被隐藏。然后,如果我单击系统托盘图标,它会显示一个空白窗口,但不是窗口的内容。为什么会发生这种情况?这是我的代码:

当我点击系统托盘图标时,它显示我的窗口,但一个空白窗口。

所以请帮帮我。提前致谢。

0 投票
2 回答
1966 浏览

java - Java TrayIcon.displayMessage() 和换行符

我正在编写一个带有 SystemTray 图标的 Java 应用程序,我想将换行符放入 TrayIcon 的“显示消息”中,但普通的 html 技巧似乎不起作用(就像它在 JLabels 中一样)。

在下面的示例中,trayIcon 变量的类型为“java.awt.TrayIcon”。

trayIcon.displayMessage("Title", "<p>Blah</p> \r\n Blah <br> blah ... blah", TrayIcon.MessageType.INFO);

Java 忽略 \r\n,但显示 html 标记。

有任何想法吗?

如果没有,我将使用 JFrame 或其他东西。

更新:这似乎是一个特定于平台的问题,我应该在问题中指定我的操作系统:我需要它在 Windows 和 Linux 上工作。

Nishan 表明 \n 可以在 Windows 上运行,我用我现在旁边的 Vista 框确认。看起来我需要使用 JFrame 或消息框进行自定义

干杯伙计们

0 投票
1 回答
482 浏览

c# - 系统托盘图标的默认状态

在我的 WPF 应用程序中,我必须设置一个系统托盘图标。这是一个每天都会使用的商业应用程序。

在win 7(也许是vista,我不知道)中,有些图标可以隐藏,只在通知时显示,总是显示。是否可以直接指示我的系统托盘图标必须始终显示?否则,我的客户将不得不在它安装此程序的每个工作站上进行设置

谢谢!

0 投票
0 回答
628 浏览

linux - Notification Area Protocol does not work in GNOME or KDE (Ubuntu 10.10 attempted)

I cannot for the life of me get the freedesktop.xorg "system tray" protocol specification to work with GNOME or KDE, even though I think they both support it. Unfortunately, I have had the same frustrating failure trying to post this issue to the archaic freedesktop.xorg Gmane newsgroup archiver (allowing me only 80 characters to explain my problem). Based alone on that mentality, I'm not surprised the following fails.

These are the only two window/desktop managers I have attempted (both Ubuntu 10.10). I am using:

For GNOME, I get a little 2-pixel wide sliver next to my pandora "tray icon" when I execute the below program. For KDE, I get a gray icon. I would expect to see a non-uniform colored icon, or an all black icon, because I have only initialized the width and height of the buffer variable below, not the pixel values.

Unfortunately, after spending several hours on this, I have given up and decided not to support this feature. In case I'm just doing something stupid, I wanted to post this information here so others can learn from my mistake. Otherwise, if this is a bug, perhaps I will include this feature later when it is resolved. Regardless, I would be happy to try suggestions from others or attempt any lessons learned you may have.

I have referenced the following sites for guidance in resolving this (without solution):

http://kobelisk.de/files/doxygen/trayicon__x11_8cpp-source.html

http://libjdic-java.sourcearchive.com/documentation/0.9.5-6/Tray_8c-source.html

I have more hyperlinks, but since I'm new to this site I am un-allowed to post them.

I am well aware there are other libraries to accomplish this such as gtk. For my scenario, that is not in the domain of acceptable solutions.

Here is the command I used:

And here is a generic program to re-create the problem (Ubuntu 10.10):

0 投票
5 回答
8003 浏览

.net - 如何以编程方式关闭 BalloonTip?

我的应用程序中有一个托盘图标。当我在后台加载某些内容时,我将显示气球提示 20 秒。但是,如果后台加载提前完成,比如说在 10 秒内,我想隐藏气球提示。目前隐藏气球提示的唯一方法是单击气球提示中的关闭图标。

是否可以在达到指定时间之前以编程方式隐藏气球提示?

0 投票
1 回答
367 浏览

c# - 将 WPF XBAP 最小化到托盘:可以做到吗?

我现在已经看到了一些托盘定位应用程序的实现。尽管有开发自己的东西的冲动,我想我想试一试:http: //www.codeproject.com/KB/WPF/wpf_notifyicon.aspx

无论如何,我真的很想知道是否可以从 XBAP 应用程序中获取和控制窗口状态。我认为可能不是,因为它们在 PresentationHost 中运行,但我不太确定。

我想做的事情:当浏览器关闭/最小化时,显示一个托盘图标。通常的托盘行为,但适用于 XBAP。

另请注意,XBAP 正在运行提升到完全信任(它是一个仅供内部使用的应用程序),也许这会改变一些事情。

以前有人试过吗?

干杯,

塞比