Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Программа листингісі

program Project1;

 

uses

Forms,

Unit1 in 'Unit1.pas' {Form1},

Unit2 in 'Unit2.pas' {Form2},

Unit3 in 'Unit3.pas' {Form3},

Unit4 in 'Unit4.pas' {Form4},

Unit5 in 'Unit5.pas' {Form5},

Unit6 in 'Unit6.pas' {Form6},

Unit7 in 'Unit7.pas' {Form7},

Unit8 in 'Unit8.pas' {Form8};

 

{$R *.res}

 

begin

Application.Initialize;

Application.CreateForm(TForm1, Form1);

Application.CreateForm(TForm2, Form2);

Application.CreateForm(TForm3, Form3);

Application.CreateForm(TForm4, Form4);

Application.CreateForm(TForm5, Form5);

Application.CreateForm(TForm6, Form6);

Application.CreateForm(TForm7, Form7);

Application.CreateForm(TForm8, Form8);

Application.Run;

end.

unit Unit1;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, jpeg, ExtCtrls;

 

type

TForm1 = class(TForm)

Panel1: TPanel;

Image1: TImage;

Button1: TButton;

Button2: TButton;

Label1: TLabel;

Edit1: TEdit;

Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

 

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form1: TForm1;

 

implementation

 

uses Unit2;

 

{$R *.dfm}

 

procedure TForm1.Button1Click(Sender: TObject);

var s,l:string;

begin

 

begin

s:='aliya';

l:=Edit1.text;

if l=s then Form2.show else

showmessage('Íåâåðíûé ïàðîëü!!!');

end;

 

 

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

close;

end;

 

end.

unit Unit2;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ExtCtrls, jpeg;

 

type

TForm2 = class(TForm)

Panel1: TPanel;

Button1: TButton;

Image1: TImage;

Button2: TButton;

Button3: TButton;

Button4: TButton;

Button5: TButton;

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button5Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form2: TForm2;

 

implementation

 

uses Unit3, Unit1;

 

{$R *.dfm}

 

procedure TForm2.Button2Click(Sender: TObject);

begin

Form3.show;

end;

 

procedure TForm2.Button3Click(Sender: TObject);

begin

winhelp(Form2.handle, 'BIBLIO.HLP',HELP_CONTEXT,1);

end;

 

procedure TForm2.Button5Click(Sender: TObject);

begin

Form1.Show;

end;

 

procedure TForm2.Button4Click(Sender: TObject);

begin

winhelp(Form2.handle, 'SPRAVOCHNIK.HLP',HELP_CONTEXT,1);



end;

 

end.

unit Unit3;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Menus, jpeg, ExtCtrls, ComObj;

 

type

TForm3 = class(TForm)

MainMenu1: TMainMenu;

N1: TMenuItem;

N2: TMenuItem;

N3: TMenuItem;

N4: TMenuItem;

N21: TMenuItem;

Htlfrnbhjdfybt1: TMenuItem;

N11: TMenuItem;

N22: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N7: TMenuItem;

N8: TMenuItem;

N9: TMenuItem;

Windows1: TMenuItem;

Image1: TImage;

procedure N5Click(Sender: TObject);

procedure N6Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure N21Click(Sender: TObject);

procedure N11Click(Sender: TObject);

procedure N22Click(Sender: TObject);

procedure N9Click(Sender: TObject);

procedure Windows1Click(Sender: TObject);

procedure N3Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form3: TForm3;

 

implementation

 

uses Unit8, Unit4, Unit5, Unit6, Unit7, Unit1;

 

{$R *.dfm}

 

procedure TForm3.N5Click(Sender: TObject);

begin

Form8.show;

end;

 

procedure TForm3.N6Click(Sender: TObject);

var

VExcel:Variant;

 

begin

 

VExcel := CreateOleObject('Excel.Application');

VExcel.Visible := True;

//Îòêðûâàåì Excel íà ïîëíûé ýêðàí

VExcel.WindowState := -4137;

VExcel.WorkBooks.Open('G:\Otchet.xls');

 

 

end;

 

procedure TForm3.N4Click(Sender: TObject);

begin

Form4.show;

end;

 

procedure TForm3.N21Click(Sender: TObject);

begin

Form5.show;

end;

 

procedure TForm3.N11Click(Sender: TObject);

begin

Form6.show;

end;

 

procedure TForm3.N22Click(Sender: TObject);

begin

Form7.show;

end;

 

procedure TForm3.N9Click(Sender: TObject);

begin

showmessage ('Áàçà äàííûõ "Áèáëèîòåêà". Âûïîëíèëà: ñòóäåíòêà ãðóïïû CÈÁ-10-1 Òîéøûáåê À.Í, Ïðîâåðèëà:Æóëäûç Ñàéëàóîâíà ');

end;

 

procedure TForm3.Windows1Click(Sender: TObject);

begin

winhelp(Form3.handle, 'SPRAVKA.HLP',HELP_CONTEXT,1);

end;

 

procedure TForm3.N3Click(Sender: TObject);

begin

Form1.show;

end;

 

end.

unit Unit4;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, DB, DBTables, Grids, DBGrids, ExtCtrls, StdCtrls;

 

type

TForm4 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

DBGrid1: TDBGrid;

DataSource1: TDataSource;

Table1: TTable;

Button1: TButton;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form4: TForm4;

 

implementation

 

uses Unit3;

 

{$R *.dfm}

 

procedure TForm4.Button1Click(Sender: TObject);

begin

Form3.show;

end;

 

end.

unit Unit5;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, DB, DBTables, Grids, DBGrids, ExtCtrls, StdCtrls;

 

type

TForm5 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

DBGrid1: TDBGrid;

DataSource1: TDataSource;

Table1: TTable;

Button1: TButton;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form5: TForm5;

 

implementation

 

uses Unit3;

 

{$R *.dfm}

 

procedure TForm5.Button1Click(Sender: TObject);

begin

Form3.show;

end;

 

end.

unit Unit6;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ExtCtrls, DB, DBTables, Grids, DBGrids;

 

type

TForm6 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

DBGrid1: TDBGrid;

DataSource1: TDataSource;

Table1: TTable;

Label1: TLabel;

Button1: TButton;

Button2: TButton;

Button3: TButton;

Button4: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form6: TForm6;

 

implementation

 

uses Unit3;

 

{$R *.dfm}

 

procedure TForm6.Button1Click(Sender: TObject);

begin

if table1.CanModify=true then

 

Table1.edit; //ïåðåâîäèì òàáëèöó â ðåæèì ðåäàêòèðîâàíèÿ

Table1.fieldbyname('FIO avtora').asString:='New value';//èçìåíÿåì ïîëå

Table1.post;//ñîõðàíÿåì èçìåíåíèÿ

end;

 

 

procedure TForm6.Button2Click(Sender: TObject);

begin

Table1.append; //ïåðåâîäèì òàáëèöó â ðåæèì äîáàâëåíèÿ íîâîé çàïèñè

Table1.fieldbyname('FIO avtora').asString:='New value';//ïðèñâàèâàåì çíà÷åíèå ïîëåé

Table1.post;//ñîõðàíÿåì èçìåíåíèÿ

end;

 

procedure TForm6.Button3Click(Sender: TObject);

begin

Table1.Delete;

end;

 

procedure TForm6.Button4Click(Sender: TObject);

begin

Form3.show;

end;

 

end.

unit Unit7;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ExtCtrls, DB, DBTables, Grids, DBGrids;

 

type

TForm7 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

DBGrid1: TDBGrid;

DataSource1: TDataSource;

Table1: TTable;

Button1: TButton;

Button2: TButton;

Button3: TButton;

Label1: TLabel;

Button4: TButton;

procedure RadioButton1Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

 

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form7: TForm7;

 

implementation

 

{$R *.dfm}

 

procedure TForm7.RadioButton1Click(Sender: TObject);

begin

Table1.Locate('FIO studenta','Fakultet',[loCaseInsensitive]);

end;

 

procedure TForm7.Button1Click(Sender: TObject);

begin

if table1.CanModify=true then

begin

Table1.edit; //ïåðåâîäèì òàáëèöó â ðåæèì ðåäàêòèðîâàíèÿ

Table1.fieldbyname('FIO studenta').asString:='New value';//èçìåíÿåì ïîëå

Table1.post;//ñîõðàíÿåì èçìåíåíèÿ

end else showmessage('Ðåäàêòèðîâàíèå íåâîçìîæíà');

end;

 

procedure TForm7.Button2Click(Sender: TObject);

begin

Table1.append; //ïåðåâîäèì òàáëèöó â ðåæèì äîáàâëåíèÿ íîâîé çàïèñè

Table1.fieldbyname('FIO studenta').asString:='New value';//ïðèñâàèâàåì çíà÷åíèå ïîëåé

Table1.post;//ñîõðàíÿåì èçìåíåíèÿ

end;

 

procedure TForm7.Button3Click(Sender: TObject);

begin

 

Table1.Delete;

 

end;

unit Unit8;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, DB, DBTables, StdCtrls, ExtCtrls, Grids, DBGrids;

 

type

TForm8 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

Button1: TButton;

Label1: TLabel;

DataSource1: TDataSource;

Query1: TQuery;

DBGrid1: TDBGrid;

Table1: TTable;

Button2: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form8: TForm8;

 

implementation

 

uses Unit3;

 

{$R *.dfm}

 

procedure TForm8.Button1Click(Sender: TObject);

begin

// Query1.SQL.Add('select Zhanr ');

// Query1.SQL.Add(' from spisok knig ');

// Query1.SQL.Add(' where FName like ''%t%'' ');

Query1.ParamByName('param_letter').AsString := '%t%';

 

 

Query1.Open;

// Query1.ExecSQL;

 

 

Label1.Caption := Query1.FieldByName('Zhanr').AsString;

// Query1.FieldByName('godr').AsInteger

//Query1.Next;

// TQuery

end;

 

procedure TForm8.Button2Click(Sender: TObject);

begin

Form3.show;

end;

 

end.

 

 


Date: 2015-12-18; view: 242


<== previous page | next page ==>
Hepatita virala cronica C, faza latenta, activitate minima. | L’œuvre de Philippe II de Macédoine évoquée par son fils
doclecture.net - lectures - 2014-2017 year. Copyright infringement or personal data (0.011 sec.)