方法一(通过 Width、ClientWidth 推算):
var
  frame,caption: Integer;
begin
  frame := (Width - ClientWidth) div 2;
  caption := Height - ClientHeight - frame * 2;
  ShowMessageFmt('边框宽: %d; 标题高: %d', [frame,caption]); {边框宽: 4; 标题高: 26}
end;

方法二(用 GetSystemMetrics 函数获取):
var
  frame,caption: Integer;
begin
  frame := GetSystemMetrics(SM_CXFRAME);
  caption := GetSystemMetrics(SM_CYCAPTION);
  ShowMessageFmt('边框宽: %d; 标题高: %d', [frame,caption]); {边框宽: 4; 标题高: 26}
end;

相关文章:

  • 2022-02-20
  • 2021-12-25
  • 2022-02-18
  • 2021-04-23
  • 2021-06-16
  • 2021-12-09
  • 2021-07-02
猜你喜欢
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2022-01-21
  • 2021-11-27
  • 2021-11-27
相关资源
相似解决方案