trayicon

Refreshing system tray icons programmatically

别来无恙 提交于 2019-12-21 04:49:19
问题 I've an application which has a system tray icon. While uninstalling I'm killing the process if its running. So, as am not gracefully stopping the app, the icon remains in the system tray and will remove only if we hover the mouse on it. I wrote a code that would run the cursor along the tray and get the cursor back in its initial position. This is what I have done: [DllImport("user32.dll")] static extern IntPtr FindWindow(string className, string windowName); [DllImport("user32.dll")] static

How to hide the Java SWT program icon in the Dock when the application is in the tray

家住魔仙堡 提交于 2019-12-17 20:18:49
问题 I know there are a lot of questions similar to mine, but I actually couldn't solve my problem even after reading all of them. I have a Java application that as soon as it starts it goes on tray. The problem is on Mac, because only there the icon is in the tray bar AND in the Dock. I want to get rid of the Dock icon. I did already a number of trials: try to wrap my jar in a ".app" folder and writing an Info.plist file. I inserted the LSUIElement and set it to "1" or to "true". This hides the

C# trayicon using wpf

自作多情 提交于 2019-12-17 15:53:07
问题 I'm very new to programming C#, though I've scripted C# in unity3D for a few years. I'm currently trying to make a WPF tray icon, all the sources I've found on the net tell me to use System.Windows.Forms However .Forms is not available in System.Windows for me, and I have no idea why not. Can anyone help me with this? 回答1: You need to add references to the System.Window.Forms and System.Drawing assemblies and then you use it like this. Suppose you try to minimize the Window to tray icon and

Java Textfield in PopupMenu

那年仲夏 提交于 2019-12-14 02:46:54
问题 I am trying to add a TextField to a PopupMenu in Java. (similar to Spotlight Feature in Mac OS X) But i can't add it to as an item because the PopupMenu only accepts MenuItem. Please help me. That's the code I currently have: import java.awt.AWTException; import java.awt.CheckboxMenuItem; import java.awt.Frame; import java.awt.Menu; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.event

gtkmm statusicon quits after creation

南笙酒味 提交于 2019-12-11 10:58:19
问题 I have to create a simple application that displays an icon in the systray and a menu from which you can do some operations. the problem is that statusicon is closed immediately after creation. What's missing? I put the sleep to make sure it was created. for 3 seconds something appears in systray, even if it is not the icon that I set. Init.cc #include <gtkmm/main.h> #include "Tray.h" int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); printf("Statuicon starting\n"); Tray tray;

How do I remove tray icon on application uninstall in C#

只愿长相守 提交于 2019-12-11 08:25:33
问题 I have an application with tray icon. I am using notifyicon to do this job. I have created its setup in Visual Studio which installs and uninstall the application. Problem is when I uninstall the program, its tray icon is not removed and even after the program has been uninstalled, I can click on the icon and start the app even though its .exe file from back end has been deleted by the uninstaller. 回答1: The usual approach is to create in your tray application a background thread which will

How do I position a notification (tray) icon context menu on Windows XP?

删除回忆录丶 提交于 2019-12-11 04:46:58
问题 I'm using C++ and Win32. I want my context menu and settings dialog to show up near the tray icon. I think I need the icon's coordinates to do that. Shell_NotifyIconGetRect wasn't available until Windows 7. WM_CONTEXTMENU is available starting in Win2k, but only provides coordinates in wParam as of Vista (and when specifying NOTIFYICON_VERSION_4). 回答1: The correct way of solving this is to either use the mouse message coordinates, or GetMessagePos for other messages. 回答2: Retrieving the click

tray component for Delphi

泪湿孤枕 提交于 2019-12-11 03:47:34
问题 Please advice some modern tray component for Delphi. The more functionality it has is better. It should support Delphi 2010. I just need to place an icon to tray and handle clicking on it and show popup when mouse cursor is over it. 回答1: What about TTrayIcon. It's been in Delphi since Delphi2006. 回答2: If you have a very old delphi version (older than 2006) then try the free TJvTrayIcon in the JEDI VCL. 回答3: I'm pretty sure that the Raize suite has a tray icon component. The suite isn't free,

System Tray icon looks distorted

旧时模样 提交于 2019-12-08 15:48:42
问题 I'm trying to have an icon be added and displayed to the system tray using Java. However the icon is always either too small, or its cut off in areas. Its the second one from left in case you couldn't tell. What am I doing wrong here? How can I get this icon to be displayed fully? What's the standard icon size to be used for system tray? Edit: I am using AWT SystemTray and TrayIcon 回答1: After you've retrieved the actual image resource from disk, you can resize it to the size you need by

Why TrayIcon doesn't appear?

我怕爱的太早我们不能终老 提交于 2019-12-08 11:52:46
问题 I'm trying to add a TrayIcon inside a Tray that already appears. I'm new in Java so i can be calling wrong methods. Could someone help me please? The code i use is: if (!SystemTray.isSupported()) { System.out.println("SystemTray is not supported"); return; } final SystemTray tray = SystemTray.getSystemTray(); Image image = Toolkit.getDefaultToolkit().getImage("systemtray.png"); PopupMenu popup = new PopupMenu(); final TrayIcon trayIcon = new TrayIcon(image, "The Tip Text", popup); trayIcon