改变标题字体,菜单字体

类别:Delphi 点击:0 评论:0 推荐:

 

var
  ncm: TNonClientMetrics;
begin
  ncm.cbSize := SizeOf(TNonClientMetrics);
  {get old non client metrics}
  SystemParametersInfo(SPI_GETNONCLIENTMETRICS, SizeOf(TNonClientMetrics), @ncm, 0);
  {
  lfCaptionFont - regular captions
  lfSmCaptionFont - small captions
  lfMenuFont - menus
  lfStatusFont - status bars
  lfMessageFont - message boxes
  }
  ncm.lfMessageFont.lfFaceName := '楷体';
  ncm.lfMessageFont.lfHeight:=18;
  ncm.lfCaptionFont.lfHeight:=18;//标题字
  ncm.lfMenuFont.lfHeight:=18;//菜单
  {set new non client metrics}
  SystemParametersInfo(SPI_SETNONCLIENTMETRICS, SizeOf(TNonClientMetrics), @ncm, 0);
end;

E_mail:[email protected]

 

本文地址:http://com.8s8s.com/it/it5789.htm