Label3.Visible:=false;
Label4.Visible:=true;
end;
procedure TForm2.BitBtn3Click(Sender: TObject);
begin
BitBtn5.Visible:=false;
BitBtn6.Visible:=false;
BitBtn7.Visible:=true;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=true;
Label4.Visible:=true;
end;
procedure TForm2.BitBtn5Click(Sender: TObject);
begin
Form6.Show;
Form2.close;
end;
procedure TForm2.BitBtn6Click(Sender: TObject);
begin
Form4.Show;
Form2.Visible:=false;
end;
procedure TForm2.BitBtn7Click(Sender: TObject);
begin
Form5.show;
Form2.Visible:=false;
end;
procedure TForm2.GradientRect (FromRGB, ToRGB: TColor; Canvas: TCanvas);
var
RGBFrom : array[0..2] of Byte; { from RGB values }
RGBDiff : array[0..2] of integer; { difference of from/to RGB values}
ColorBand : TRect; { color band rectangular coordinates }
I : Integer; { color band index }
R : Byte; { a color band's R value }
G : Byte; { a color band's G value }
B : Byte; { a color band's B value }
begin
RGBFrom[0] := GetRValue (ColorToRGB (FromRGB));
RGBFrom[1] := GetGValue (ColorToRGB (FromRGB));
RGBFrom[2] := GetBValue (ColorToRGB (FromRGB));
{ calculate difference of from and to RGB values}
RGBDiff[0] := GetRValue (ColorToRGB (ToRGB)) - RGBFrom[0];
RGBDiff[1] := GetGValue (ColorToRGB (ToRGB)) - RGBFrom[1];
RGBDiff[2] := GetBValue (ColorToRGB (ToRGB)) - RGBFrom[2];
Canvas.Pen.Style := psSolid;
Canvas.Pen.Mode := pmCopy;
{ set color band's left and right coordinates}
ColorBand.Left := 0;
ColorBand.Right:= canvas.ClipRect.Right-Canvas.ClipRect.Left;
for I := 0 to $ff do
begin
{ calculate color band's top and bottom coordinates}
ColorBand.Top := MulDiv (I , canvas.ClipRect.Bottom-Canvas.ClipRect.Top, $100);
ColorBand.Bottom := MulDiv (I + 1,canvas.ClipRect.Bottom-Canvas.ClipRect.Top, $100);
R := RGBFrom[0] + MulDiv (I, RGBDiff[0], $ff);
G := RGBFrom[1] + MulDiv (I, RGBDiff[1], $ff);
B := RGBFrom[2] + MulDiv (I, RGBDiff[2], $ff);
Canvas.Brush.Color := RGB (R, G, B);
Canvas.FillRect (ColorBand);
end;end;
procedure TForm2.paint(Sender: TObject);
begin
GradientRect (clBlue, clBlack, Canvas);
end;
procedure TForm2.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);
Application.HelpFile:=ExtractFilePath(Application.ExeName) + 'MYHELP.HLP';end;
procedure TForm2.FormActivate(Sender: TObject);
begin
Form2.Left:=390;
Form2.Top:=240;
end;
procedure TForm2.BitBtn4Click(Sender: TObject);
begin
Application.HelpCommand(HELP_FINDER, 0);
end;end.
3. Unit 3 название формы form3.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, Menus, Buttons;
type
TForm3 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Memo1: TMemo;
ListBox1: TListBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
BitBtn5: TBitBtn;
BitBtn6: TBitBtn;
Label5: TLabel;
Edit4: TEdit;
ComboBox1: TComboBox;
BitBtn7: TBitBtn;
BitBtn8: TBitBtn;
Edit5: TEdit;
Label6: TLabel;
BitBtn9: TBitBtn;
BitBtn10: TBitBtn;
procedure FormActivate(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure GradientRect (FromRGB, ToRGB: TColor; Canvas: TCanvas);
procedure paint(Sender: TObject);
procedure BitBtn6Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure BitBtn5Click(Sender: TObject);
procedure BitBtn8Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure BitBtn7Click(Sender: TObject);
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.