1

I have an issue with a software I wrote (Delphi) that is minimized to Windows 10 tray icon locations. There are two possible locations, one at the end of arrow #1 and another into arrow #2. When a new application is installed, by default when minimized (and code written to take care of this), it goes to location #2 by default, and some user are confused and thinks the software has crashed (because this is hidden). My question is simple, is there a piece of code that forcefully put the minimized app icon into location #1 directly without any action from the user ? C++ code is OK, or Delphi would be very nice.

Image with location #1 and #2 to explain my question

Yksisarvinen
  • 18,008
  • 2
  • 24
  • 52
  • 2
    This has been asked many times, and the answer is that you cannot control this programmatically, and you shouldn't be able to. – Andreas Rejbrand Mar 02 '20 at 16:14
  • 2
    Also, the area in the taskbar that contains these icons, next to the clock, is called the "notification area", not the "[tray](https://devblogs.microsoft.com/oldnewthing/20030910-00/?p=42583)". – Andreas Rejbrand Mar 02 '20 at 16:16
  • 3
    The reason why there is no API for this is that if there was, every program would use it, and the notification area would become full. – David Heffernan Mar 02 '20 at 16:18
  • OK. So I have not other choice than warn the user when he will do this the first N times. To me this is so obvious, but I have three user thinking the software was dead. – user1816813 Mar 02 '20 at 17:00
  • 3
    Many times, users have problems for which the solution does involves education of the user rather than changes to the software. Often this is much cheaper for everybody! – David Heffernan Mar 02 '20 at 17:11
  • It should be noted that, if you use Microsoft OneDrive for a personal account as well as for an Office 365 Enterprise account, you have two try icons. The operation system somehow ensures both tray icons are both visible or both hidden away. There appears to be way. But I am glad there is no public API for that. – Günther the Beautiful Mar 02 '20 at 18:09
  • @Günther the app will register multiple icons with the same guid or program id so that the system treats them as belonging to a single app. That's all above board I believe. – David Heffernan Mar 02 '20 at 19:24
  • @DavidHeffernan: Absolutely. Thanks for clearing that up. – Günther the Beautiful Mar 03 '20 at 09:14

0 Answers0