system-tray

Hide Java application from command-tab application switcher and dock in OSX

假如想象 提交于 2019-11-30 13:53:13
I have a java application which has a tray icon in the top menu bar of OSX. When I minimize the application I would like it to disappear from the dock and the command-tab application switcher and only be in the tray. I've seen other OSX applications do this, so I do believe it is possible, but as a newbie to OSX I have no idea how to achieve it. Any help would be appreciated! As it turns out, SWT 3.5 had a bug which prevented it from properly reacting to the Info.plist that OSX requires to hide the application. This bug is fixed in SWT 3.6, and with Eclipse Helios being released today, I

How do I ask Windows for the size of system tray icons?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 12:59:45
I noticed that my app sends icons to the Windows tray with a size of 16x16 pixels--and my Vista PC I've got a doublewide taskbar that appears to show icons at 18x18. The resizing artifacts on my app's icon look awful. How can I ask Windows what size the icons should be? edit: I'm generating the icon dynamically, with a pixel font text overlay. It seems wasteful to generate a bunch of icon sizes dynamically, so it would be nice to avoid building an icon with all the "possible" sizes (not that I'm even sure what those are). GetSystemMetrics(SM_CXSMICON) returns 16--the incorrect value.

C# Minimize to system tray on close

孤者浪人 提交于 2019-11-30 12:12:30
问题 Hi In my c# application I am trying to minimize application to systems tray, when the form is closed. Here is the code I have tried. public void MinimizeToTray() { try { notifyIcon1.BalloonTipTitle = "Sample text"; notifyIcon1.BalloonTipText = "Form is minimized"; if (FormWindowState.Minimized == this.WindowState) { notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(500); this.Hide(); } else if (FormWindowState.Normal == this.WindowState) { notifyIcon1.Visible = false; } } catch(Exception

Adding JPopupMenu to the TrayIcon

醉酒当歌 提交于 2019-11-30 11:32:06
I want to add JPopupMenu to the task bar as a TrayIcon ( i.e systemTray.add(trayIcon) ) but I haven't found a way to do so.From the docs the constructor of TrayIcon looks like : public TrayIcon(Image image, String tooltip, PopupMenu popup) Is there any way I can do this ? This is a known problem. There is a bug report , which contains the outline of a workaround. I've adapted that below: // Build your popup menu final JPopupMenu trayPopup = new JPopupMenu(); // I'm using actions, there are other ways of doing this. trayPopup.add(someFantaticAction); // Get your tray icon trayIcon = new

Spring Boot use SystemTray Icons

元气小坏坏 提交于 2019-11-30 10:06:28
I am setting up a Spring Boot Application and would like to have the host have access to a System Tray Icon with access to some bean Information. I currently Tried to Create a Bean for my SystemTrayIcon with the @Autowired details. However When I try to add the SystemTrayIcon I get the following Exception: Caused by: java.awt.HeadlessException at java.awt.TrayIcon.<init>(Unknown Source) at java.awt.TrayIcon.<init>(Unknown Source) at java.awt.TrayIcon.<init>(Unknown Source) at hermes.subsrciber.systemTray.HermesTrayIcon.<init>(HermesTrayIcon.java:36) at hermes.subscriber.boot.AppStarter

C# Minimize to system tray on close

人盡茶涼 提交于 2019-11-30 02:06:52
Hi In my c# application I am trying to minimize application to systems tray, when the form is closed. Here is the code I have tried. public void MinimizeToTray() { try { notifyIcon1.BalloonTipTitle = "Sample text"; notifyIcon1.BalloonTipText = "Form is minimized"; if (FormWindowState.Minimized == this.WindowState) { notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(500); this.Hide(); } else if (FormWindowState.Normal == this.WindowState) { notifyIcon1.Visible = false; } } catch(Exception ex) { MessageBox.Show(ex.Message); } } and I am calling the method to form closing event. But the

System tray icon with c# Console Application won't show menu

拈花ヽ惹草 提交于 2019-11-29 20:48:46
问题 I've got a small C# (.NET 4.0) Console Application that I'd like the user to be able to interact by showing a menu when they right-click the System Tray icon. I can add an icon to the Tray with no problems, but I just cannot get the menu to appear. I'm using the following code: NotifyIcon trayIcon = new NotifyIcon(); trayIcon.Text = "TestApp"; trayIcon.Icon = new Icon(SystemIcons.Application, 40, 40); ContextMenu trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("Blah", item1_Click);

To Hide JavaFx fxml or JavaFx swing application to System Tray

て烟熏妆下的殇ゞ 提交于 2019-11-29 20:21:04
I want to develop a client app for website . I want the app to reside in system tray when minimised. I dont know how to accomplish this task . Is their any example for this type of operation. alscu The key here is to set the implicit exit to false Platform.setImplicitExit(false); Also is important to show and hide the stage in a new thread. Platform.runLater(new Runnable() { @Override public void run() { stage.show(); } }); Platform.runLater(new Runnable() { @Override public void run() { stage.hide(); } }); Next, the whole code: import java.awt.AWTException; import java.awt.MenuItem; import

Hide Java application from command-tab application switcher and dock in OSX

此生再无相见时 提交于 2019-11-29 19:54:09
问题 I have a java application which has a tray icon in the top menu bar of OSX. When I minimize the application I would like it to disappear from the dock and the command-tab application switcher and only be in the tray. I've seen other OSX applications do this, so I do believe it is possible, but as a newbie to OSX I have no idea how to achieve it. Any help would be appreciated! 回答1: As it turns out, SWT 3.5 had a bug which prevented it from properly reacting to the Info.plist that OSX requires

System Tray (Menu Extras) icon in Mac Os using Java

醉酒当歌 提交于 2019-11-29 19:28:16
I'm developing a desktop application using Java. I want to put an icon (with a contextual menu) on the system tray (called Menu Extras in Mac Os). Java 6 comes with support for doing this in Windows and Linux, but it doesn't work in Mac Os. I have seen some applications doing what I want in all three operating systems (e.g. DropBox), but I don't know if they are made with Java. How can I achieve this? If it's not possible in Java, is there any other cross-platform language able to do that? Thanks. Powerlord AWT / Swing According to documentation , OSX 10.5 update 1 and newer support TrayIcon s