Logo Delphi Developer Days 2011

Menu for Development

Site Menu
Delphi 2010 Handbook
Delphi 2009 Handbook
Delphi 2007 Handbook
Mastering Borland Delphi 2005
Essential Pascal
Essential Delphi
Buy Books Online
Code Repository
Newsgroups
White Papers
Tools
Conferences
Training
Delphi Links
Contact Marco

My Other Sites
Italian Site (www.marcocantu.it)
Developers Newsgroups Browser (dev.newswhat.com)
My town (www.piazzacavalli.net)
the delphi search
Wintech Italia (my company)

Advertising
Home My Blog Books My Bookstore Development Links Marco


Home: Code Repository: Mastering Delphi 6

Chapter 11 - Project FontBoxDemo

Project Structure

FontBoxDemo.dpr
program FontBoxDemo;

uses
  Forms,
  FbDemoForm in 'FbDemoForm.pas' {Form1};

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
FbDemoForm.pas
unit FbDemoForm;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Memo1: TMemo;
    MdFontCombo1: TMdFontCombo;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

end.
FbDemoForm.dfm
object Form1: TForm1
  Left = 207
  Top = 107
  Width = 509
  Height = 299
  Caption = 'FontBox Demo'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -13
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 16
  object Label1: TLabel
    Left = 99
    Top = 11
    Width = 29
    Height = 16
    Caption = '&Font:'
  end
  object Memo1: TMemo
    Left = 8
    Top = 40
    Width = 486
    Height = 225
    Anchors = [akLeft, akTop, akRight, akBottom]
    Color = clWindow
    Lines.Strings = (
      'Text of the FontBox Demo program.'
      'More text.'
      'More text.')
    ScrollBars = ssVertical
    TabOrder = 0
  end
  object MdFontCombo1: TMdFontCombo
    Left = 136
    Top = 8
    Width = 214
    Height = 24
    Anchors = [akLeft, akTop, akRight]
    Color = clWindow
    ItemHeight = 16
    ItemIndex = 47
    TabOrder = 1
    Text = 'MS Sans Serif'
  end
end