system-tray

Qt QSystemTrayIcon change menu items

天大地大妈咪最大 提交于 2019-12-24 10:20:26
问题 I am using Pyqt however c++ code is fine. I am trying to change a menu item in QSystemTrayIcon using the QT framework in Linux (Ubuntu 11.10). Currently I have tried to reset the QMenu that I initially set: self.tray = QSystemTrayIcon() m = QMenu() m.addAction('First') m.addAction('Second') tray.setContextMenu(m) I place this in my class and make tray a class variable. I was thinking that if I just change the tray to set a new menu it would update: new_m = QMenu() new_m.addAction('First') new

My exe runs fine by itself, but does nothing when loaded by a service

风格不统一 提交于 2019-12-24 08:37:04
问题 Simple exe for a tray icon, that works fine independently I call it using a windows service, and it seems to run(in task manager) but it dosnt seem to exec any code. ie no tray icon etc. 回答1: On Vista and Windows 2008, services run in a different session than the user -- any EXE that a service runs will run in the same session as the service. Before Vista, you need to check the "Allow Service to interact with desktop" box, otherwise the same thing applies. This means that your tray icon EXE

SWT SystemTray in OSX

吃可爱长大的小学妹 提交于 2019-12-24 07:26:11
问题 I'm trying to add a system tray icon to my Snow Leopard java application, which seems to work fairly well. Unfortunately, it seems like SWT does not align the systemtray icon with the top menubar, but instead aligns it with where my mouse clicked (e.g. http://kobyleha.com/files/azureus_2_250.png instead of http://kobyleha.com/files/power_250.png ... I am borrowing the images since this site describes similar problems) It seems to have been a problem with SWT since 3.3. I'm wondering if there

Large items in the notification area (AKA system tray)?

[亡魂溺海] 提交于 2019-12-24 04:40:22
问题 I would like to place some large items in the XP system tray. (the one next to the clock) By this i mean items that take up more than the standard icon space. I know it can be done because I have seen several weather and time applications with this functionality. For example http://www.respectsoft.com/weather-clock-screenshots.php (see the clock screen shots) But I cannot find any doco on how to do this. While .net code would be preferred instructions in other technologies would also be

Having gradient background of system tray context menu

守給你的承諾、 提交于 2019-12-24 01:49:05
问题 I am developing desktop application in java.On start up my application runs from system tray.But the system tray's context menu is having standard look and feel according to OS.I want to customize the context menu.I want to give gradient background to it , want to change fonts,borders etc.Let me know is this possible ? If there are some examples for that please provide links for the same.. Thanks in advance.. 回答1: hmmm only this blog by one of SwingGuru's can hepl you with that import java

Disappearing System Tray icons

狂风中的少年 提交于 2019-12-22 20:28:30
问题 Im creating a system tray application in visual studio 2010, using C#. When the application starts i create my thread and a system tray icon. THe icon shows, however whenever i mouse over the icon, it disappears ( the application is still running ), and even if i click the button to show all hidden icons, it doesnt display. However, if i dont try to mouse over on it, then it stays their in the system tray. Any Thoughts or experience? Thanks in advance Thanks for the answers guys. Uhh,

Send to tray on Close

江枫思渺然 提交于 2019-12-21 12:08:27
问题 How can I send the window minimized to tray when on click close button? Also how to show icon in tray when application start? 回答1: There is nothing that comes embedded with WPF. From implementations that you can find on the net, there is an "easy" one, that uses WinForms: http://msdn.microsoft.com/en-us/library/aa972170.aspx But I like this one more (can be used for balloon tips too) http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx 回答2: WinForm: One approach is to set the Cancel property

A way to ensure that a system tray icon is removed… guaranteed

江枫思渺然 提交于 2019-12-21 09:17:45
问题 Is there a way to guarantee that your system tray icon is removed? To add the system tray icon you do: Shell_NotifyIcon(NIM_ADD, &m_tnd); To remove the system tray icon you do: Shell_NotifyIcon(NIM_DELETE, &m_tnd); What I want to know: what if you application crashes? The icon stays in your system tray until you mouse over. Is there a way to guarantee that the icon will be removed, even when the application crashes? I would prefer not to use structured exception handling for various reasons.

Is there a way to have (animated)GIF image as system tray icon with pyqt?

蹲街弑〆低调 提交于 2019-12-21 06:15:16
问题 I have created static(PNG) image as tray icon with pyqt. Did the same with GIF image results in static tray icon. Can it animated in system tray with pyqt? QtGui.QSystemTrayIcon.__init__(self, parent) self.setIcon(QtGui.QIcon("Image.gif")) 回答1: Use QMovie to play the animated gif, and update the tray icon on each new frame event: m_icon = new QSystemTrayIcon(); m_icon->show(); m_gif = new QMovie(":/animated.gif"); connect(m_gif, SIGNAL(frameChanged(int)), this, SLOT(updateIcon())); m_gif-

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