⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 appfont_mainform.pas

📁 source code for the Marco Cantu s book Delphi 2009 Handbook
💻 PAS
字号:
unit AppFont_MainForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TFormAppFont = class(TForm)
    Memo1: TMemo;
    btnScreenFont: TButton;
    btnGetMyFont: TButton;
    cbUseLatestCommonDialogs: TCheckBox;
    btnChangeFont: TButton;
    procedure btnGetMyFontClick(Sender: TObject);
    procedure btnScreenFontClick(Sender: TObject);
    procedure btnChangeFontClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormAppFont: TFormAppFont;

implementation

{$R *.dfm}

procedure TFormAppFont.btnChangeFontClick(Sender: TObject);
begin
  Application.DefaultFont.Name := 'Times New Roman';
  Application.DefaultFont.Size := 10;
end;

procedure TFormAppFont.btnGetMyFontClick(Sender: TObject);
begin
  Memo1.Lines.Add (btnGetMyFont.Font.Name);
end;

procedure TFormAppFont.btnScreenFontClick(Sender: TObject);
begin
  Screen.MessageFont.Name := 'Segoe UI';
  Screen.MessageFont.Size := Screen.MessageFont.Size + 2;
  UseLatestCommonDialogs := cbUseLatestCommonDialogs.Checked;
  ShowMessage ('Hello');
  MessageDlg ('Hello', mtINformation, [mbOK], 0);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -