Windows 11 - Systray Icon disappears after a while

Windows specific forum
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Windows 11 - Systray Icon disappears after a while

Post by blueznl »

Stupid Windows 11 makes my systray icon disappear after a while. Anyone who knows why that happens?

(Same app runs fine on Windows 10.)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Windows 11 - Systray Icon disappears after a while

Post by idle »

Does it disappear or just move to the ^ menu? I just woke up machine and my systray icon was moved into the ^ menu with a few others like nvidia, bluetooth...
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Windows 11 - Systray Icon disappears after a while

Post by BarryG »

You probably just need to set it to always be shown (in the Taskbar settings).
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Windows 11 - Systray Icon disappears after a while

Post by ChrisR »

If your Systray icon just move to the overflow ^ menu, you can use the tutorial here
Hide or Show Icons in Taskbar Corner Overflow Menu in Windows 11

Otherwise, extract from stackoverflow stop auto hiding tray notification icon
Whenever my windows forms application runs for the first time, the tray icon stays visible for about less than a minute, and then it autohides, what can i do to make it stick and not auto hide ?
There is no supported programmatic way to override the system's default show/hide notification icon behavior. MSDN:
When an icon is added to the notification area on Windows 7, it is added to the overflow section of the notification area by default. This area contains notification area icons that are active, but not visible in the notification area. Only the user can promote an icon from the overflow to the notification area, although in certain circumstances the system can temporarily promote an icon into the notification area as a short preview (under one minute).
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Windows 11 - Systray Icon disappears after a while

Post by blueznl »

No no, not the overflow menu. I know about that :-) And no, 'always show' doesn't exist in Windows 11. Well, kinda. 'Taskbar Corner Overflow' exists :D

But that's not the problem. It literally disappears, from both the systray and the overflow panel, though I might have found a work around which doesn't make sense...

Further clarification: this is an application that auto-starts on Windows login, and is located in the (still functional) Startup folder.

If I wait a couple of seconds before creating the systray icon it seems to stay... Needs further testing and makes no sense, but lots of things in Windows 11 make no sense :(
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: Windows 11 - Systray Icon disappears after a while

Post by chi »

blueznl wrote: Tue Sep 06, 2022 11:21 am Further clarification: this is an application that auto-starts on Windows login, and is located in the (still functional) Startup folder.
It might be unrelated, but I had problems with Windows 7 and the Startup folder. Shortcuts created by right clicking on the exe -> drag -> "create shortcut here" were not visible in AutoRuns and could not be turned on/off. But if you create the shortcut (RMB -> New -> Shortcut -> Select Exe) in the Startup folder, it works. I know you have a different problem, but maybe double check anyway.
Et cetera is my worst enemy
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: Windows 11 - Systray Icon disappears after a while

Post by RASHAD »

Most probably you added a new device lately (USB for example) which made a conflict with Windows
- Run msconfig.exe
- Activate Safe boot
- Restart your machine

Again
- Run msconfig.exe
- Deactivate Safe boot
- Restart your machine

It may let Windows solve the problem by itself
Egypt my love
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Windows 11 - Systray Icon disappears after a while

Post by blueznl »

It's weird. I have been trying different approaches. It all seems to depend on timing, the number of apps starting up in the background, etc.

I tried it now on different Win 11 configs / machines, and on some machines it's not a problem, and on some others it doesn't work properly. However, if I delay a few seconds after having my app launched via de startup folder (Windows 11 still has it) BEFORE creating the systray icon, it works fine.

It seems however that it's not just my app that's suffering. I found a few references of other apps that did have some issues bringing up their icon in the systray, and for example the 'autolauncher' component of PhotoImpact (very old paint program, and its launcher is useless) does suffer the same 'disappear after a while' behavior.

Note: it only happens to stuff launched via the startup menu. I haven't seen it happen when using the registry. (Still testing that.)

It might just be a Windows quirck...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply