Questions tagged [trayicon]

for questions about creating a tray icon for a software application, customising the behaviour of a tray icon, and adding application control or monitoring to a tray icon. For questions which relate the system notification area or system tray in general, use the notification-area or system-tray tag instead.

About

A tray icon is a small, graphical, interactive icon which remains available in the of a graphical desktop environment such as , , , and , to allow for convenient control, monitoring and/or termination of a running software application.

In desktop environments that support a notification area, the area is easily accessible and always visible, so that tray icons and important notices can be seen immediately. For example, in Windows XP and in KDE 4, the system notification area is nestled alongside the clock on the main taskbar. The system notification area is often known as the system tray, though this is a misnomer.

Tray icons may be permanently visible in the system notification area, or the desktop environment may allow automatic or manual hiding of tray icons which belong to applications which are currently inactive or rarely used.

289 questions
0
votes
0 answers

System.Windows.Forms.Application.Exit() not terminating System.Windows.Forms.Application.Run()

I'm using the NotifyIcon control in a console application, so I have to call the blocking System.Windows.Forms.Application.Run() function in order to get the NotifyIcon to work correctly(according to this). I am calling that function on a background…
None
  • 609
  • 7
  • 22
0
votes
1 answer

How to show image/icon in taskbar context menu

I'm using Hardcodet NotifyIcon, and I want to display images next to my context menu items. But for some reason they don't appear. This is the code
Maverick Meerkat
  • 5,737
  • 3
  • 47
  • 66
0
votes
0 answers

C# Add png icon to system tray

I've got some png icons with lots of transparent pixels, which I want to add to tray. I used NotifyIcon, and I had to convert my .pngs to .ico format. Here you can see two icons with numbers. Left one is added with C# as a .ico, right one -- with…
gn Fur
  • 1
  • 1
0
votes
2 answers

window.maximize() fails when window is minimized electron

I have created an electron app with a tray Icon. When I right click the tray icon I show a menu with 4 options: Minimize Maximize Restart Exit Here is the code that creates the tray Icon: trayIcon = new Tray('icons/foo.png'); const…
Manos Kounelakis
  • 2,848
  • 5
  • 31
  • 55
0
votes
1 answer

Minimize to tray on MacOSX

Good morning, in my application on MacOSX I want to give the user the option "minimize to tray". I use Qt5 and I rewrote the changeEvent(QEvent *event) function. There I do something like switch( event->type() ) { case QEvent::WindowStateChange: …
n3mo
  • 663
  • 8
  • 23
0
votes
0 answers

How to show SystemTray Message when Frame is not iconified

Is there a way to display a TrayIcon Message tray.displayMessage("Warning", "Array index out of range", TrayIcon.MessageType.INFO); when a JFrame is not iconified? MadProgrammer brought me the idea. I had the code if(e.getNewState()==NORMAL){ …
0
votes
1 answer

WPF: Image Path doesn't work after publishing

I have a trayicon in my WPF App. When I was debugging in Visual Studio, it works well: System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon(); ni.Icon = new Icon("../../logo,ico"); But after I published it, the App threw an…
randomcat
  • 413
  • 1
  • 4
  • 16
0
votes
1 answer

Clicking QSystemTrayIcon brings up an empty context menu on Mate desktop

I'd like to create a tray icon for my application for showing the main window on clicking on it after the former was minimized. Here's the implementation: TrayIcon.h: class TrayIcon_t : public QSystemTrayIcon { Q_OBJECT public: …
Kuklin István
  • 315
  • 3
  • 14
0
votes
0 answers

OnActivated not called when restoring from system tray

I use the following code to restore a WinForms app from the system tray: this.WindowState = FormWindowState.Normal; this.Show(); this.BringToFront(); I need to set the focus on a textbox when the window is shown. I do this in the OnActivated…
user1908746
0
votes
1 answer

Proper way of activating my MainForm from a NotifyIcon if it wasn't focused already

I just want to replace the task bar button of my winforms application by a tray notification icon. That means, if the user left-clicks the icon, the form should be activated if it wasn't focused, otherwise minimized or hidden. I read lots and lots…
maf-soft
  • 2,335
  • 3
  • 26
  • 49
0
votes
1 answer

(C#, WMI) Tray App Displaying CPU Temp only updates value when SpeedFan App is running

I've made a simple tray app that displays the CPU Temperature and updates every second using a timer. The tray icon displays the "CurrentTemperature" parameter retrieved from the ManagementObjectSearcher query, which is then used to create a Bitmap…
Innat3
  • 3,561
  • 2
  • 11
  • 29
0
votes
1 answer

Can't call method of parent class from child class using tray icon

A newbie here so forgive me. This is my code: Parent/main/JFrame: public class Home extends javax.swing.JFrame { public Home() { initComponents(); setIcon("icon"); // set the taskbar icon } public static void main(String…
Pengiuns
  • 131
  • 2
  • 9
0
votes
1 answer

PyQt4 tray icon application context menu items don't work

I've got a simple tray icon application, but "About" context menu item doesn't work at all. I'm definitly mising something simple, but important here. The question is what should i fix to see "About" menu item working? import sys from PyQt4 import…
PocketSam
  • 368
  • 4
  • 14
0
votes
3 answers

Tray icon application in Python, icon is gone

I whipped up a little wallpaper-changing application for myself in Python. It makes an icon in the notification tray, which can be used to switch modes between "nice" and "naughty" depending on who's around :P and to force a wallpaper change. If…
Caleb
  • 11
  • 2
0
votes
1 answer

WaitForStatus marks application as "Not Responding"

I have simple application, with hidden form and not displaying on taskbar (settings of form), with one purpose - show tray icon, when service is running. Service is implemented by me as well, and uses duplex callback to send message to this…
lentinant
  • 792
  • 1
  • 10
  • 36