system-tray

The system tray is not supported on the current platform?

久未见 提交于 2019-12-07 18:04:29
问题 I'm trying to make a System Tray application on Ubuntu 18.04 using Java. This is the code that I'm executing: import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class App { static{ System.setProperty("java.awt.headless", "false"); } public static void main(String[] args) { // if(!SystemTray.isSupported()){ // System.out.println("System Tray is not supported."); // return; // } final PopupMenu popup = new PopupMenu(); Image img = Toolkit

Changing System Tray Icon Image

这一生的挚爱 提交于 2019-12-07 16:55:53
问题 I have built a Tray Application in .Net which works fine. However, users want to change Tray Icon image at runtime on certain conditions. To make it simple, let us say, something is not working - Tray Icon should show Red image; if everything is fine, it should show green. I'm not sure how to achieve this in .Net. Please provide some inputs on this. Thanks I built CustomApplicationContent for Tray. Some snippets below: Program.cs [STAThread] static void Main() { if (!SingleInstance.Start()) {

How to Shell_NotifyIcon WITHOUT adding an icon in the notification area

…衆ロ難τιáo~ 提交于 2019-12-07 03:14:52
问题 MSDN's documentation about Notifications and the Notification Area is pretty clear in the requirement for having an icon in the notification area in order to display a notification: To display a notification, you must have an icon in the notification area . In certain cases, such as Microsoft Communicator or battery level, that icon will already be present. In many other cases, however, you will add an icon to the notification area only as long as is needed to show the notification. Since I

Why doesn't the tray icon context menu work for my RemoteApp?

只谈情不闲聊 提交于 2019-12-07 02:14:25
I have an application which adds an icon to the notification area (aka the "system tray") using Shell_NotifyIcon . The icon has a context menu with various important commands. When the app runs on the local system, the context menu works fine. However, when the app is run as a Terminal Services RemoteApp , right-clicking the icon does not display the context menu. The various keyboard-based methods for opening the context menu also don't work. Double-clicking the icon still behaves as expected, so I know it's not totally broken. We need the context menu to work as well, though. Does anybody

How to close BalloonTip programmatically?

孤者浪人 提交于 2019-12-06 21:41:18
问题 I have a Tray icon in my application. I am showing the balloon tip for 20 seconds, when I am loading something in the background. But, if the background load gets completed early, say in 10 seconds, I would like to hide the balloon tip. Currently the only way to hide the balloon tip is to click the close icon in the balloon tip. Public Tray As NotifyIcon Tray = New NotifyIcon Tray.BalloonTipIcon = ToolTipIcon.Info Tray.BalloonTipText = "Loading" Tray.BalloonTipTitle = "Please Wait" Tray

Disappearing System Tray icons

萝らか妹 提交于 2019-12-06 12:54:43
Im creating a system tray application in visual studio 2010, using C#. When the application starts i create my thread and a system tray icon. THe icon shows, however whenever i mouse over the icon, it disappears ( the application is still running ), and even if i click the button to show all hidden icons, it doesnt display. However, if i dont try to mouse over on it, then it stays their in the system tray. Any Thoughts or experience? Thanks in advance Thanks for the answers guys. Uhh, something i did to fix before so although for those who are perhaps curious. I initially wasnt using a windows

Java attach JFrame to a running application window?

自闭症网瘾萝莉.ら 提交于 2019-12-06 08:19:08
How can I attach a JFrame in the top right to another applications open window and stay with it while resizing? Is it possible? Here is a diagram of what i would like to accomplish: Thanks for the help! If this is not possible, are there alternatives ? Ways to get window size/location and set my own jframe accordingly? You are asking Java to modify an already running non-Java program, and for these types of problems, Java is not the best tool. Please understand that one of Java's main strengths is its ability to run compiled code unchanged on multiple platforms. With this strength comes a

FMX - Trayicon message handling

帅比萌擦擦* 提交于 2019-12-06 07:31:21
问题 I'm having trouble setting up a tray icon with FMX (XE3, Windows). I'm using the same code that can be found in countless threads but I did not get the message handling for the icon to work. To ilustrate I've created a testapp that sets up the TrayIcon data in the FormCreate and creates it with a button. It will show the correct icon and the correct tooltip, the TrayMessage procedure will never get called though. unit Unit2; interface uses System.SysUtils, System.Types, System.UITypes, System

Can I create a wxPython tray icon application without the Python icon appearing in the Dock?

自闭症网瘾萝莉.ら 提交于 2019-12-06 06:28:40
Here is the slightly modified source code for an example tray icon application I found on SO: import wx TRAY_TOOLTIP = 'System Tray Demo' TRAY_ICON = 'icon.png' def create_menu_item(menu, label, func): item = wx.MenuItem(menu, -1, label) menu.Bind(wx.EVT_MENU, func, id=item.GetId()) menu.AppendItem(item) return item class TaskBarIcon(wx.TaskBarIcon): def __init__(self): super(TaskBarIcon, self).__init__() self.set_icon(TRAY_ICON) self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.on_left_down) def CreatePopupMenu(self): menu = wx.Menu() create_menu_item(menu, 'Say Hello', self.on_hello) menu

NOTIFYICONDATA - GUID problem

痞子三分冷 提交于 2019-12-06 03:29:35
问题 According to the description for the guidItem member of the NOTIFYICONDATA structure at http://msdn.microsoft.com/en-us/library/bb773352(v=vs.85).aspx programs that make use of the Windows system tray need to identify their icon with a valid GUID on Windows 7. I did this, but I'm running into a problem. If my application is running in directory A and then the user at some point decides to move it and run it in directory B, when the program makes the call to Shell_NotifyIcon it fails (returns