I have my main Application hidden using:
Application.ShowMainForm:= False;
The Application uses a TTrayIcon which I have assigned a Popup menu to.
By using and selecting one of the Popup menus in the Tray Icon I want to make my Application visible again, but I want the position of the Application to popup above the Taskbar.
By default the Windows Taskbar is at the bottom, so in this case my Application would appear in the bottom right just above the clock – of course the Taskbar can be moved and sized by the user so I need a way of knowing definitively these metrics.
Simply put, I want my Application to appear in the corner of the Taskbar above (or next) to the System clock.
Thanks in advance.
Use
SHAppBarMessageto get the location of the taskbar:That, along with the size of the “primary” monitor:
and you can work out if the Taskbar is located at the
of the screen, and its size.
With that you can pop up your toast: