How to find the location and size of the Windows taskbar?

I created an application that runs in the system tray. When the user clicks on the try icon, a small form appears in the lower right corner of the screen, that is, directly above the system tray. The shape is mostly sticky for the tray.

Here is my question: how can I achieve the same, even if the user has a taskbar fixed somewhere else? Like on the top of the screen, or on one side?

This should not be difficult, because I believe that all I need to do is find out where the taskbar is. It is below, above or one of the sides. But I can't find documentation anywhere that explains how to get the location and position of the taskbar.

Does anyone know about this?

+4
c #
Aug 12 '09 at 10:25
source share
1 answer

This is a window, so find its HWND, and then get the coordinates of the window. The class name you are looking for is "TrayNotifyWnd".

+1
Aug 12 '09 at 10:30
source share



All Articles