?? fudao_setup.pas
字號(hào):
unit Fudao_Setup;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, Mask, DBCtrls, ExtCtrls;
type
TForm4 = class(TForm)
Button2: TButton;
DBEdit1: TDBEdit;
Label1: TLabel;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
Label2: TLabel;
procedure Button2Click(Sender: TObject);
procedure ChangeFonts(OldFormWidth:integer;NewFormWidth:integer);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
uses
Data_Unit1;
type
TFooClass = class(TControl); { needed to get at protected }
{ font property }
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;
procedure TForm4.ChangeFonts(OldFormWidth:integer;NewFormWidth:integer);
var
i: integer;
begin
NewFormWidth := longint(width) * longint(screen.width) div ScreenWidth;
for i := ControlCount - 1 downto 0 do
TFooClass(Controls[i]).Font.Size :=
(NewFormWidth div OldFormWidth) *
TFooClass(Controls[i]).Font.Size;
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
Form4.Close;
end;
procedure TForm4.FormCreate(Sender: TObject);
begin
scaled := true;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth;
scaleBy(screen.width, ScreenWidth);
end;
ChangeFonts(ScreenWidth,width);
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -