trayicon

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

烈酒焚心 提交于 2019-12-08 03:52:22
问题 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,

Make a Java application invisible to a user

怎甘沉沦 提交于 2019-12-07 21:30:55
问题 I'm trying to figure out a way to make a Java application invisible to the user. Basically just trying to remove this <- Image How can this be done? public class TransparentWindow extends JFrame { public TransparentWindow() { initComponents(); } @SuppressWarnings("unchecked") private void initComponents() { setExtendedState(Frame.MAXIMIZED_BOTH); setResizable(false); setUndecorated(true); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setAlwaysOnTop(true); System.setProperty(

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()) {

SWT System Tray - Linux GTK Gnome Tray icons with “SWT” String on tray

孤街醉人 提交于 2019-12-07 14:24:53
问题 I am configuring the system tray icons with the following code: /** * Configura os ícones da shell principal */ protected void setDiplayIcons(Shell shell){ Display display = shell.getDisplay(); InputStream inputImgTray = getClass().getClassLoader().getResourceAsStream(ImagensNaNOffline.IMG_LOGO_SEBRAE.getPath()); Image image = new Image(display, inputImgTray); shell.setImage(image); Tray tray = display.getSystemTray(); final ToolTip tip = new ToolTip(shell, SWT.BALLOON | SWT.ICON_INFORMATION)

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

Windows 8 Distorts my TrayIcon

偶尔善良 提交于 2019-12-06 20:29:29
问题 Windows 8 appears to make tray icons be 20 x 20 pixels. It seems as though Java still thinks they should be 16 x 16 pixels. This is causing some bad distortion as Java scales things down, and then Windows scales things back up. The following example uses these three images to create three tray icons that look like this (note the distortion): . import java.awt.Image; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; public class TrayTest { public static void main

SystemTray based application without window on Mac OS X

不问归期 提交于 2019-12-06 15:13:41
问题 How do I do an application that runs only as a SystemTray TrayIcon on mac os x, (without an awt window and dock icon)? The code I'm using is this: public class App { public static void main( String[] args ) { final TrayIcon trayIcon; if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); Image image = Toolkit.getDefaultToolkit().getImage("tray.gif"); trayIcon = new TrayIcon(image, "Tray Demo"); trayIcon.setImageAutoSize(true); try { tray.add(trayIcon); } catch

Make a Java application invisible to a user

我与影子孤独终老i 提交于 2019-12-06 07:31:33
I'm trying to figure out a way to make a Java application invisible to the user. Basically just trying to remove this <- Image How can this be done? public class TransparentWindow extends JFrame { public TransparentWindow() { initComponents(); } @SuppressWarnings("unchecked") private void initComponents() { setExtendedState(Frame.MAXIMIZED_BOTH); setResizable(false); setUndecorated(true); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setAlwaysOnTop(true); System.setProperty("sun.java2d.noddraw", "true"); WindowUtils.setWindowTransparent(this, true); WindowUtils.setWindowAlpha