Gdzie jest pasek start?

0

Cześć, potrzebuję rozkminić kodem, gdzie leży pasek start(ściślej mówiąc tray).
Chodzi o to, że muszę formę o rozmiarach hinta pokazać w odpowiednim miejscu, czyli:

Czyli potrzebuję na dobrą sprawę znać jego wysokość(fajnie by było też wiedzieć, gdzie leży - na dole, czy na górze).

Jak to zrobić?

0
procedure TForm1.FormCreate(Sender: TObject);
var Task: THandle;
    Rect: TRect;
    S: String;
begin

 Task := FindWindow('Shell_TrayWnd', nil);
 GetWindowRect(Task, Rect);

 if ((Rect.Top = 0) and (Rect.Left = 0) and (Rect.Right = Screen.Width)) then S := 'u góry';
 if ((Rect.Top = 0) and (Rect.Left = 0) and (Rect.Bottom = Screen.Height)) then S := 'po lewej';
 if ((Rect.Top = 0) and  (Rect.Right = Screen.Width) and (Rect.Bottom = Screen.Height)) then S := 'po prawej';
 if ((Rect.Left = 0) and (Rect.Right = Screen.Width) and (Rect.Bottom = Screen.Height)) then S := 'na dole';

 ShowMessage('Pasek zadań jest ' + S + #13#13 +
             'Szerokość: ' + IntToStr(Rect.Right - Rect.Left) + #13 +
             'Wysokość: ' + IntToStr(Rect.Bottom - Rect.Top));

end;

1 użytkowników online, w tym zalogowanych: 0, gości: 1