Разработка программной системы «Автоматизированная записная книжка», страница 13

N9: TMenuItem;

N10: TMenuItem;

DBGrid1: TDBGrid;

N1: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N7: TMenuItem;

N8: TMenuItem;

N15: TMenuItem;

N16: TMenuItem;

N17: TMenuItem;

N18: TMenuItem;

N21: TMenuItem;

BitBtn1: TBitBtn;

BitBtn2: TBitBtn;

BitBtn3: TBitBtn;

BitBtn4: TBitBtn;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;


BitBtn5: TBitBtn;

BitBtn6: TBitBtn;

Edit4: TEdit;

Label4: TLabel;

BitBtn7: TBitBtn;

Label5: TLabel;

ComboBox1: TComboBox;

BitBtn8: TBitBtn;

BitBtn9: TBitBtn;

BitBtn10: TBitBtn;

BitBtn11: TBitBtn;

Label6: TLabel;

N3: TMenuItem;

ComboBox2: TComboBox;

BitBtn12: TBitBtn;

BitBtn13: TBitBtn;

procedure N8Click(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure paint(Sender: TObject);

procedure GradientRect (FromRGB, ToRGB: TColor; Canvas: TCanvas);

procedure N4Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure N18Click(Sender: TObject);

procedure DBGrid1DrawColumnCell(Sender: TObject; const Rect:

TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);

procedure BitBtn1Click(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

procedure BitBtn3Click(Sender: TObject);

procedure BitBtn4Click(Sender: TObject);

procedure N6Click(Sender: TObject);

procedure BitBtn5Click(Sender: TObject);

procedure BitBtn6Click(Sender: TObject);

procedure BitBtn7Click(Sender: TObject);

procedure ComboBox1Change(Sender: TObject);

procedure FormActivate(Sender: TObject);

procedure N16Click(Sender: TObject);

procedure BitBtn8Click(Sender: TObject);

procedure BitBtn9Click(Sender: TObject);

procedure N9Click(Sender: TObject);

procedure BitBtn10Click(Sender: TObject);

procedure N10Click(Sender: TObject);

procedure BitBtn11Click(Sender: TObject);

procedure N3Click(Sender: TObject);

procedure BitBtn12Click(Sender: TObject);

procedure BitBtn13Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form4: TForm4;


a: integer;

implementation

{$R *.dfm}

uses unit7,unit1,unit2, DB;

procedure TForm4.N8Click(Sender: TObject);

begin

Label2.Visible:=false;

Label3.Visible:=false;

Label6.Visible:=false;

Edit1.Visible:=false;

Edit2.Visible:=false;

Edit3.Visible:=false;

BitBtn5.Visible:=false;

BitBtn6.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn10.Visible:=false;

BitBtn11.Visible:=false;

BitBtn12.Visible:=false;

ComboBox2.Visible:=false;

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

Label5.Visible:=true;

Label1.Visible:=true;

Label4.Visible:=true;

Edit4.Visible:=true;

BitBtn7.Visible:=true;

end;

procedure TForm4.paint(Sender: TObject);

begin

GradientRect (clBlue, clBlack, Canvas);

end;

procedure TForm4.FormCreate(Sender: TObject);

var

l: DWORD;

begin

l := GetWindowLong(Self.Handle, GWL_STYLE);

l := l and not (WS_MINIMIZEBOX);

l := l and not (WS_MAXIMIZEBOX);

l := SetWindowLong(Self.Handle, GWL_STYLE, l);

end;

procedure TForm4.N4Click(Sender: TObject);

begin

DBGrid1.Visible:=true;

end;

procedure TForm4.N5Click(Sender: TObject);

begin

DBGrid1.Visible:=true;

BitBtn1.Visible:=true;

BitBtn2.Visible:=true;

BitBtn3.Visible:=true;

BitBtn4.Visible:=true;


Label5.Visible:=true;

ComboBox1.Visible:=true;

end;

procedure TForm4.N18Click(Sender: TObject);

begin

Form4.Close;

end;

procedure TForm4.DBGrid1DrawColumnCell(Sender: TObject; const Rect:TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);

var

holdColor: TColor;

begin

holdColor := DBGrid1.Color; {сохраняем оригинальный цвет}

if Column.FieldName = 'ID_book' then

begin

DBGrid1.Canvas.Brush.Color := clInactiveCaption;

DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);

DBGrid1.Canvas.Brush.Color := holdColor;