Logo New book: Delphi 2007 Handbook
My blog in online
Delphi tech support service: support.marcocantu.com
Google
  Web www.marcocantu.com

Menu for Development

Site Menu
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)

Breaking News
Buy Mastering Borland Delphi 2005 from Amazon
Free ebook: Mastering Delphi Update for Delphi 2006

Advertising
Home My Blog Books My Bookstore Development Links Marco


Home: Code Repository: Mastering Delphi 6

Chapter 11 - Project FrameClock

Project Structure

FrameClock.dpr
program FrameClock;

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

{$R *.RES}

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

interface

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

type
  TForm1 = class(TForm)
    MdFramedClock1: TMdFramedClock;
    MdFramedClock2: TMdFramedClock;
    procedure MdFramedClock1Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.MdFramedClock1Timer1Timer(Sender: TObject);
begin
  MdFramedClock1.Timer1Timer(Sender);
  Caption := TimeToStr (now);
end;

end.
FrameCForm.dfm
object Form1: TForm1
  Left = 325
  Top = 104
  Width = 368
  Height = 280
  Caption = 'FrameClock'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  DesignSize = (
    360
    253)
  PixelsPerInch = 96
  TextHeight = 13
  object MdFramedClock1: TMdFramedClock
    Left = 72
    Top = 32
    Width = 215
    Height = 83
    Anchors = [akLeft, akTop, akRight, akBottom]
    TabOrder = 0
    SubLabel.Left = 0
    SubLabel.Top = 0
    SubLabel.Width = 215
    SubLabel.Height = 83
    SubLabel.Align = alClient
    SubLabel.Alignment = taCenter
    SubLabel.Caption = '3:19:30 PM'
    SubLabel.Font.Charset = DEFAULT_CHARSET
    SubLabel.Font.Color = clWindowText
    SubLabel.Font.Height = -19
    SubLabel.Font.Name = 'Arial'
    SubLabel.Font.Style = [fsBold]
    SubLabel.ParentFont = False
    SubLabel.Layout = tlCenter
    SubLabel.WordWrap = True
    SubTimer.Left = 24
    SubTimer.Top = 16
  end
  object MdFramedClock2: TMdFramedClock
    Left = 72
    Top = 120
    Width = 217
    Height = 81
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'Modern'
    Font.Style = []
    ParentFont = False
    TabOrder = 1
    SubLabel.Left = 0
    SubLabel.Top = 0
    SubLabel.Width = 217
    SubLabel.Height = 81
    SubLabel.Align = alClient
    SubLabel.Alignment = taCenter
    SubLabel.Caption = '3:19:30 PM'
    SubLabel.Font.Charset = DEFAULT_CHARSET
    SubLabel.Font.Color = clWindowText
    SubLabel.Font.Height = -19
    SubLabel.Font.Name = 'Arial Narrow'
    SubLabel.Font.Style = [fsBold]
    SubLabel.ParentFont = False
    SubLabel.Layout = tlCenter
    SubLabel.WordWrap = True
    SubTimer.Left = 24
    SubTimer.Top = 16
  end
end