Logo Delphi Handbooks Collection

Delphi Developer Days 2012
March-May
Cantù-Jensen
(UK, NL, US, D, I)

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 Handbooks Development Links Marco
Delphi Developer Days 2012


Home: Code Repository: Mastering Delphi 6

Chapter 01 - Project DiagramDemo

Project Structure

DiagramDemo.dpr
program DiagramDemo;

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

{$R *.res}

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

interface

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

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    ListBox1: TListBox;
    PopupMenu1: TPopupMenu;
    one1: TMenuItem;
    two1: TMenuItem;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  // TODO -oMarco: Add creation code
end;

end.
DiagramForm.dfm
object Form1: TForm1
  Left = 209
  Top = 144
  Width = 518
  Height = 319
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 192
    Top = 112
    Width = 32
    Height = 13
    Caption = 'Label1'
    FocusControl = Edit1
  end
  object Edit1: TEdit
    Left = 184
    Top = 40
    Width = 121
    Height = 21
    TabOrder = 0
    Text = 'Edit1'
  end
  object ListBox1: TListBox
    Left = 288
    Top = 104
    Width = 121
    Height = 97
    ItemHeight = 13
    PopupMenu = PopupMenu1
    TabOrder = 1
  end
  object PopupMenu1: TPopupMenu
    Left = 88
    Top = 136
    object one1: TMenuItem
      Caption = 'one'
    end
    object two1: TMenuItem
      Caption = 'two'
    end
  end
end