unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls, DataModule;

type
  TFMain = class(TForm)
    Panel1: TPanel;
    Shape: TShape;
    Label1: TLabel;
    BitBtn1: TBitBtn;
    procedure FormActivate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private

  public

  end;

var
  FMain: TFMain;

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
procedure TFMain.BitBtn1Click(Sender: TObject);
begin
	Close();
end;

procedure TFMain.FormActivate(Sender: TObject);
begin
   Shape.Brush.Color := clRed;
	if DM.ADOConnection1.Connected then
   begin
	   Shape.Brush.Color := clGreen;
   end;
end;

end.
