system-tray

SystemTray not supported on Windows 10

家住魔仙堡 提交于 2019-12-02 02:25:45
问题 With Java 8 sdk, when I do if (SystemTray.isSupported()) { logger.error("SystemTray IS supported"); } else { logger.error("SystemTray IS NOT supported"); } Why SystemTray is not supported on Windows 10 ? And what can I do to make it supported ? Thanks 回答1: You can set headless property from code too: System.setProperty("java.awt.headless", "false"); 回答2: I found the problem! My JVM was just starting in HeadLess mode! I do not understand why... maybe because I do not have any GUI excepted this

javafx NullPointerException with controlsfx Notifications componnets

£可爱£侵袭症+ 提交于 2019-12-01 20:39:19
I want to develop an application that uses controlsfx Notifications to show some notifications in system tray mode. In normal mode my application works well and notification can be shown successfully.but when I hide stage in system tray , NullPointerException occurs. I don't know how i can fix this problem. import java.awt.AWTException; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.event.ActionListener; import javafx.application.Application; import javafx.application.Platform; import javafx

Create a background process with system tray icon

∥☆過路亽.° 提交于 2019-12-01 08:35:55
I'm trying to make a Windows app that checks some things in the background, and inform the user via a systray icon. The app is made with Not managed C++ and there is no option to switch to .net or Java. If the user wants to stop the app, he will use the tray icon. The app can't be a Service because of the systray side and because it must run without installing anything on the user computer ( it's a single .exe ) Using the typical Win32 program structure ( RegisterClass, WndProc and so on ) i dont know how can i place some code to run apart the window message loop. Maybe i have to use

Finding and simulating a click on a system tray icon?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 07:27:06
问题 I need to figure out how to programmatically find and select a context menu item from a separate application's system tray icon. The only way I could imagine accomplishing this was to use mouse_event() with some hard-coded x/y values, and set the icon to always be shown. Aside from the hacky use of hard-coding in general, the problem here is the assumption that the icon will retain it's position (which is likely to break any time another application loads/unloads). I was wondering if anybody

What is the best way to get tray area clock visual theme?

半城伤御伤魂 提交于 2019-12-01 06:37:19
System's tray area clock visual theme is documented in MSDN, so I suppose Microsoft expects us to be able to use it. I'd like to use it to draw my taskbar band's background, in order to blend better with the tray area. When I try to OpenThemeData (NULL, L"CLOCK"); It always fails . The only way I found to get that theme, is locate the actual clock window, and to request its theme: Use FindWindowEx to locate a window with Shell_TrayWnd class, then locate its child with class TrayNotifyWnd , then this window's child with TrayClockWClass class. Call OpenThemeData and pass the actual clock's

What is the best way to get tray area clock visual theme?

谁说我不能喝 提交于 2019-12-01 05:40:39
问题 System's tray area clock visual theme is documented in MSDN, so I suppose Microsoft expects us to be able to use it. I'd like to use it to draw my taskbar band's background, in order to blend better with the tray area. When I try to OpenThemeData(NULL, L"CLOCK"); It always fails . The only way I found to get that theme, is locate the actual clock window, and to request its theme: Use FindWindowEx to locate a window with Shell_TrayWnd class, then locate its child with class TrayNotifyWnd ,

java 1.6 SystemTray icon does not appear on windows startup

拟墨画扇 提交于 2019-12-01 01:55:17
I have a Java 1.6 desktop application, started with javaw from a batch file on Windows XP. There is a .lnk link to this batch file, which is placed to windows Startup folder in order to start this application on every system boot. The application uses SystemTray class to display an icon on the system tray in case it is running. Starting this application manually there is no problem. If it is started by windows startup process, there is no icon displayed (not even a blank icon), however the application is running. The startup process is also slowed down. How can I overcome this? Thank you! Are

Windows System Tray icons - controlling position

霸气de小男生 提交于 2019-12-01 01:26:54
I have a few old apps I've written (in Delphi) which for various reasons use a system tray icon. Most are using AppControls TacTrayIcon or some other similar component. Here's my question: How does one control the position of a tray icon? (i.e. where it is, say, relative to the system time -- 1st position/"slot", 2nd position/"slot", etc). I recall seeing a demo (C#, if memory serves) that allowed the user to "shift icon to the left" and "shift icon to the right", but don't recall how it was done. I'd like to allow the user to select what position they want to icon to appear in, for Windows

Multiple WindowsBaloonTip / TrayTip Notifications?

前提是你 提交于 2019-11-30 19:43:39
问题 If you were to use this code below to create TrayTips (BaloonTips) in the Notification Area you will notice that it only allows one message and then gets stuck and errors out. The code was taken from here: # -- coding: utf-8 -- from win32api import * from win32gui import * import win32con import sys, os import struct import time class WindowsBalloonTip: def __init__(self, title, msg): message_map = { win32con.WM_DESTROY: self.OnDestroy, } # Register the Window class. wc = WNDCLASS() hinst =

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

你。 提交于 2019-11-30 14:30:19
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); trayMenu.MenuItems.Add("Blah2", item1_Click); trayMenu.MenuItems.Add("Blah3", item1_Click); trayIcon