API小问题:如何获得当前屏幕Tray Bar区的高度?

xiaocai 2000-12-05 10:38:00
...全文
128 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
victorchen_2000 2000-12-05
  • 打赏
  • 举报
回复
相同时间为什么我又在后面,正不公平。
Kingron 2000-12-05
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
var
h:thandle;
info:appbardata;
begin
h:=FindWindow('Shell_TrayWnd', nil);
info.hWnd:=h;
info.cbSize:=sizeof(info);
info.uEdge:=abe_bottom;
SHAppBarMessage(ABM_GETTASKBARPOS, info);
shappbarmessage(ABM_QUERYPOS,info);
showmessage(inttostr(info.rc.Right-info.rc.Left));
showmessage(inttostr(info.rc.Bottom-info.rc.top));
end;
victorchen_2000 2000-12-05
  • 打赏
  • 举报
回复
用SystemParametersInfo 取得工作区的Rect,要注意TrayBar可以在屏幕的四个边上。
和Screen.Width,Screen.Height计算一下。

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧