systray

Delphi “Tray” icon (NotifyIcon) context-menu does not disappear when clicking outside it

微笑、不失礼 提交于 2019-12-02 11:05:53
I'm trying to show a popup menu when right clicking my Notification Icon, which works fine; But I want the menu to disappear when the user clicks outside of that menu. It's supposedly by design as per KB135788 - PRB: Menus for Notification Icons Do Not Work Correctly ( archive ) . But no decent app I know of behaves like this. I've tried calling SetForegroundWindow using the popup menu's handle to no avail. I'm sure it's possible to work around this, as I've done it years ago but don't remember how. Anyone know how to achieve the expected behaviour? I've found a solution! I was calling

How can I show a systray tooltip longer than 63 chars?

為{幸葍}努か 提交于 2019-11-30 03:23:52
How can I show a systray tooltip longer than 63 chars? NotifyIcon.Text has a 63 chars limit, but I've seen that VNC Server has a longer tooltip. How can I do what VNC Server does? Actually, it is a bug in the property setter for the Text property. The P/Invoke declaration for NOTIFYICONDATA inside Windows Forms uses the 128 char limit. You can hack around it with Reflection: using System; using System.Windows.Forms; using System.Reflection; public class Fixes { public static void SetNotifyIconText(NotifyIcon ni, string text) { if (text.Length >= 128) throw new ArgumentOutOfRangeException("Text

Can you send a signal to Windows Explorer to make it refresh the systray icons?

我怕爱的太早我们不能终老 提交于 2019-11-27 12:30:42
This problem has been afflicting me for quite a while and it's been really annoying. Every time I login after a reboot/power cycle the explorer takes some time to show up. I've taken the step of waiting for all the services to boot up and then I login, but it doesn't make any difference. The result is always the same: Some of the icons do not show up even if the applications have started. I've dug a bit on the code that makes one application "stick" an icon in there, but is there an API call that one can perform so explorer re-reads all that icon info? Like invalidate or redraw or something of

Quick and easy: trayicon with python?

假如想象 提交于 2019-11-26 21:39:53
I'd just need a quick example on how to easily put an icon with python on my systray. This means: I run the program, no window shows up, just a tray icon (I've got a png file) shows up in the systray and when I right-click on it a menu appears with some options (and when I click on an option, a function is run). Is that possible? I don't need any window at all... Examples / code snippets are REALLY appreciated! :D FogleBird For Windows & Gnome Here ya go! wxPython is the bomb. Adapted from the source of my Feed Notifier application. import wx TRAY_TOOLTIP = 'System Tray Demo' TRAY_ICON = 'icon

How to make a Windows Forms .NET application display as tray icon?

三世轮回 提交于 2019-11-26 16:34:08
问题 What needs to be done to have your .NET application show up in Window's system tray as icon? And how do you handle mousebutton clicks on said icon? 回答1: First, add a NotifyIcon control to the Form. Then wire up the Notify Icon to do what you want. If you want it to hide to tray on minimize, try this. Private Sub frmMain_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize If Me.WindowState = FormWindowState.Minimized Then Me.ShowInTaskbar = False Else Me

JavaFX app in System Tray

孤街醉人 提交于 2019-11-26 16:16:02
问题 I am Making a Simple App using JavaFX UI, The app simply just do that: has a systray icon, which when clicked shows a window, when clicked again hides it, on rightclick shows a menu with 1 "exit" item I already Made the UI and put the App in the Sys Tray, but i can't show/hide it using Normal Actionlistener method, but i got this error: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Not on FX application thread; currentThread = AWT-EventQueue-0 here is the Code:

Quick and easy: trayicon with python?

扶醉桌前 提交于 2019-11-26 08:00:20
问题 I\'d just need a quick example on how to easily put an icon with python on my systray. This means: I run the program, no window shows up, just a tray icon (I\'ve got a png file) shows up in the systray and when I right-click on it a menu appears with some options (and when I click on an option, a function is run). Is that possible? I don\'t need any window at all... Examples / code snippets are REALLY appreciated! :D 回答1: For Windows & Gnome Here ya go! wxPython is the bomb. Adapted from the

How to start WinForm app minimized to tray?

ぐ巨炮叔叔 提交于 2019-11-25 21:48:15
I've successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs when trying to start with the app minimized. At first the problem was that the app would be minimized but would still appear in the alt-tab dialog. Changing the FormBorderStyle to one of the ToolWindow options (from the "None" option) fixed this, but introduced another problem. When the app first starts the titlebar of the minimized window is visible just above the start menu: Opening the form and