本文整理自网络,侵删。
//aflarinfunction SysTray_GetRect: TRect;var H1, H2 : HWND;begin Result:= Rect(0,0,0,0); H1 := FindWindow('Shell_TrayWnd', nil); if H1 <> 0 then begin H2 := FindWindowEx(H1, 0, 'TrayNotifyWnd', nil); if H2 <> 0 then GetWindowRect(H2, Result); end;end;
procedure TForm1.FormCreate(Sender: TObject);var SysTrayRect: TRect;begin SysTrayRect:= SysTray_GetRect; Top:= SysTrayRect.Top - Height; Left:= SysTrayRect.Right - Width;end;
相关阅读 >>
Delphi使用project manager添加一个java库到你的应用程序
更多相关阅读请进入《Delphi》频道 >>