Marco's Web Center

Menu for Development

Site Menu
Object Pascal Handbook
Delphi Handbooks Collection
Mastering Borland Delphi 2005
(Old) White Papers
(Old)Tools
(Old) Conferences

My Other Sites
Italian Site (www.marcocantu.it)
the delphi search

Spirit of delphi

Advertising
Home My Blog Books Object Pascal Marco

Home: Code Repository: Mastering Delphi 5

Project TLIBCOMP

Project Structure


TLIBCOMP.DPR

program TLibComp;

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

{$R *.RES}

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

COMPFORM.PAS

unit CompForm;

interface

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

type
  TForm1 = class(TForm)
    FirstServer1: TFirstServer;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  FirstServer1.ChangeColor;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  FirstServer1.Value := FirstServer1.Value + 1;
end;

end.

COMPFORM.DFM

object Form1: TForm1
  Left = 265
  Top = 130
  Width = 338
  Height = 144
  Caption = 'TLibComp'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 72
    Top = 40
    Width = 75
    Height = 25
    Caption = 'New Color'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 160
    Top = 40
    Width = 75
    Height = 25
    Caption = 'Increase'
    TabOrder = 1
    OnClick = Button2Click
  end
  object FirstServer1: TFirstServer
    AutoConnect = False
    ConnectKind = ckRunningOrNew
    Left = 32
    Top = 32
  end
end