(Gast)
n/a Beiträge
|
AW: Dynamische Position der unteren Taskbar
21. Jun 2014, 15:14
Delphi-Quellcode:
function TaskbarHandle: THandle;
begin
Result := FindWindow('Shell_TrayWnd', nil);
end;
function TrayHandle: THandle;
begin
Result := FindWindowEx(TaskbarHandle, 0, 'TrayNotifyWnd', nil);
end;
procedure TForm2.Button1Click(Sender: TObject);
var TR : TRECT;
begin
GetWindowRect(TrayHandle, TR);
Memo1.Lines.Add(' LEFT: '+INTTOSTR(TR.Left));
Memo1.Lines.Add(' RIGHT: '+INTTOSTR(TR.Right));
Memo1.Lines.Add(' TOP: '+INTTOSTR(TR.Top));
Memo1.Lines.Add(' BOTTOM: '+INTTOSTR(TR.Bottom));
Memo1.Lines.Add(' HEIGHT: '+INTTOSTR(TR.Height));
Memo1.Lines.Add(' WIDTH: '+INTTOSTR(TR.Width));
end;
procedure TForm2.Button2Click(Sender: TObject);
var TR : TRECT;
begin
GetWindowRect(TaskBarHandle, TR);
Memo1.Lines.Add(' LEFT: '+INTTOSTR(TR.Left));
Memo1.Lines.Add(' RIGHT: '+INTTOSTR(TR.Right));
Memo1.Lines.Add(' TOP: '+INTTOSTR(TR.Top));
Memo1.Lines.Add(' BOTTOM: '+INTTOSTR(TR.Bottom));
Memo1.Lines.Add(' HEIGHT: '+INTTOSTR(TR.Height));
Memo1.Lines.Add(' WIDTH: '+INTTOSTR(TR.Width));
end;
Geändert von hathor (21. Jun 2014 um 15:18 Uhr)
|
|
Zitat
|