Автор работы: Пользователь скрыл имя, 11 Марта 2013 в 23:18, курсовая работа
Эволюция технических средств персональных компьютеров привела к повсеместному вытеснению старой “доброй” ОС MS-DOS значительно более мощными системами Windows, программирование для которых существенно сложнее, чем программирование для MS-DOS. В 1993 году Microsoft выпустила первую визуальную среду программирования Visual Basic, и программирование для Windows стало даже проще, чем программирование для MS-DOS. В ответ на это Borland в 1995 году выпустила первую версию Delphi, а затем, с интервалом в 1 год, - еще 4 версии: 2, 3, 4 и 5. Наконец, в середине 2001 г. выпускается версия 6.
Введение………………………………………………………………………..…..5
Теоретическая часть……………………………………………………………...10
Описание функций и процедур……………………………………………….....13
Руководство пользователя…………………………………………………….…17
Результат работы программы……………………………………………….…...24
Заключение………………………………………………………………….…….26
Список литературы……
k:=k-1
until k=-1;
for i := 0 to StringGrid1.ColCount-1 do
form5.StringGrid2.Cells[i,0]:=
n:=StringGrid1.RowCount;
case n of
2: begin
label3.Caption:=floattostrF(x[
label4.Caption:=floattostrF(x[
end;
3: begin
label3.Caption:=floattostrF(x[
label4.Caption:=floattostrF(x[
label5.Caption:=floattostrF(x[
end;
4: begin
label3.Caption:=floattostrF(x[
label4.Caption:=floattostrF(x[
label5.Caption:=floattostrF(x[
label6.Caption:=floattostrF(x[
end;
5: begin
label3.Caption:=floattostrF(x[
label4.Caption:=floattostrF(x[
label5.Caption:=floattostrF(x[
label6.Caption:=floattostrF(x[
label7.Caption:=floattostrF(x[
end;
end;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
close;
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
label1.Caption:='Введите матрицу:';
n:=StringGrid1.RowCount;
end;
end.
{-----------------------------
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TForm4 = class(TForm)
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.Button1Click(Sender: TObject);
begin
close;
end;
procedure TForm4.FormShow(Sender: TObject);
begin
AnimateWindow(form4.Handle, 90, aw_blend);
form4.Show
end;
end.
{-----------------------------
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, XPMan, Menus, ExtCtrls, StdCtrls, Grids, Buttons, jpeg,ClipBrd,unit4;
type
TForm5 = class(TForm)
Label1: TLabel;
Image2: TImage;
SpeedButton7: TSpeedButton;
SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButtonPlusMinus: TSpeedButton;
SpeedButton0: TSpeedButton;
SpeedButtonT: TSpeedButton;
SpeedButtonUmn: TSpeedButton;
SpeedButtonDel: TSpeedButton;
SpeedButtonMinus: TSpeedButton;
SpeedButtonPlus: TSpeedButton;
SpeedButtonRavno: TSpeedButton;
SpeedButtonX2: TSpeedButton;
SpeedButtonSqrt: TSpeedButton;
SpeedButtonBack: TSpeedButton;
SpeedButtonCE: TSpeedButton;
SpeedButtonCL: TSpeedButton;
SpeedButtonProcent: TSpeedButton;
SpeedButtonMS: TSpeedButton;
SpeedButtonMR: TSpeedButton;
SpeedButtonMC: TSpeedButton;
SpeedButtonMplus: TSpeedButton;
StringGrid1: TStringGrid;
StringGrid2: TStringGrid;
Memo1: TMemo;
Panel5: TPanel;
MainMenu1: TMainMenu;
Pravka: TMenuItem;
Copy: TMenuItem;
Insert: TMenuItem;
Vid: TMenuItem;
Ingener: TMenuItem;
Standart: TMenuItem;
N2: TMenuItem;
N1: TMenuItem;
XPManifest1: TXPManifest;
Image1: TImage;
procedure SpeedButton8Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SpeedButton7Click(Sender: TObject);
procedure SpeedButton9Click(Sender: TObject);
procedure SpeedButton6Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton0Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpeedButtonMSClick(Sender: TObject);
procedure SpeedButtonMRClick(Sender: TObject);
procedure SpeedButtonMCClick(Sender: TObject);
procedure SpeedButtonMplusClick(Sender: TObject);
procedure SpeedButtonBackClick(Sender: TObject);
procedure SpeedButtonCEClick(Sender: TObject);
procedure SpeedButtonCLClick(Sender: TObject);
procedure SpeedButtonSqrtClick(Sender: TObject);
procedure SpeedButtonX2Click(Sender: TObject);
procedure SpeedButtonTClick(Sender: TObject);
procedure SpeedButtonPlusMinusClick(
procedure SpeedButtonPlusClick(Sender: TObject);
procedure Memo1Change(Sender: TObject);
procedure SpeedButtonMinusClick(Sender: TObject);
procedure SpeedButtonDelClick(Sender: TObject);
procedure SpeedButtonUmnClick(Sender: TObject);
procedure SpeedButtonRavnoClick(Sender: TObject);
procedure IngenerClick(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure CopyClick(Sender: TObject);
procedure InsertClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure SpeedButtonProcentClick(
procedure SpeedButton7MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton8MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton9MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton4MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton5MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton6MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton0MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpeedButton0MouseLeave(Sender: TObject);
procedure SpeedButton3MouseLeave(Sender: TObject);
procedure SpeedButton2MouseLeave(Sender: TObject);
procedure SpeedButton1MouseLeave(Sender: TObject);
procedure SpeedButton6MouseLeave(Sender: TObject);
procedure SpeedButton5MouseLeave(Sender: TObject);
procedure SpeedButton4MouseLeave(Sender: TObject);
procedure SpeedButton9MouseLeave(Sender: TObject);
procedure SpeedButton8MouseLeave(Sender: TObject);
procedure SpeedButton7MouseLeave(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5; flag:boolean; mem_S:real; prk:integer;
implementation
{$R *.dfm}
uses unit1,unit2,unit3;
procedure TForm5.CopyClick(Sender: TObject);
begin
memo1.SelectAll;
memo1.CopyToClipboard;
flag:=true;
end;
procedure TForm5.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form1.Close;
end;
procedure TForm5.FormCreate(Sender: TObject);
begin
memo1.Text:='0'; flag:=true;
end;
procedure TForm5.FormKeyPress(Sender: TObject; var Key: Char);
begin
CASE key of
#27: begin SpeedButtonCLClick(
'1': begin SpeedButton1Click(
'2': begin SpeedButton2Click(
'3': begin SpeedButton3Click(
'4': begin SpeedButton4Click(
'5': begin SpeedButton5Click(
'6': begin SpeedButton6Click(
'7': begin SpeedButton7Click(
'8': begin SpeedButton8Click(
'9': begin SpeedButton9Click(
'0': begin SpeedButton0Click(
'+': SpeedButtonPlusClick(
'-': SpeedButtonMinusClick(
'*': SpeedButtonUmnClick(
'/': SpeedButtonDelClick(
#13: SpeedButtonRavnoClick(
#96: SpeedButtonSqrtClick(
#92: SpeedButtonPlusMinusClick(
#46: SpeedButtonTClick(
#64 : SpeedButtonX2Click(
#08 : SpeedButtonBackClick(
END;
end;
procedure TForm5.FormShow(Sender: TObject);
begin
AnimateWindow(form5.Handle, 90, aw_blend);
form5.Show
end;
procedure TForm5.IngenerClick(Sender: TObject);
begin
Form1.Show; Form5.hide;
end;
procedure TForm5.InsertClick(Sender: TObject);
begin
memo1.Text:=Clipboard.AsText;
try
memo1.Text:=inttostr(strtoint(
except
memo1.Text:='0';
end;
end;
procedure TForm5.Memo1Change(Sender: TObject);
begin
kol:=1;
end;
procedure TForm5.N1Click(Sender: TObject);
begin
Form4.ShowModal;
end;
procedure TForm5.N2Click(Sender: TObject);
var
sms:string; col:integer;
begin
sms:=InputBox('Решение СЛАУ','
try
col:=strtoint(sms);
except
end;
if (col>1) and (col<=5) then
BEGIN
form3.StringGrid1.ColCount:=
form3.StringGrid1.RowCount:=
case col of
2: begin
form3.StringGrid1.Width:=137;
form3.Button1.Top:=113;
form3.Label1.Font.Size:=10;
form3.Label2.Top:=13;
form3.Label3.Top:=40;
form3.Label4.Top:=59;
form3.Label5.visible:=false;
form3.Width:=250;
end;
3: begin
form3.StringGrid1.Width:=181;
form3.Button1.Top:=139;
form3.Label1.Font.Size:=12;
form3.Label2.Left:=200;
form3.Label3.Left:=224;
form3.Label4.Left:=224;
form3.Label5.Left:=224;
form3.Label5.visible:=true;
form3.Height:=198;
end;
4: begin
form3.StringGrid1.Width:=223;
form3.Button1.Top:=162;
form3.Label1.Font.Size:=12;
form3.Label2.Left:=256;
form3.Label3.Left:=283;
form3.Label4.Left:=283;
form3.Label5.Left:=283;
form3.Label6.Left:=283;
form3.Label5.visible:=true;
form3.Label7.Visible:=false;
end;
5: begin
form3.StringGrid1.Width:=269;
form3.Button1.Top:=186;
form3.Label1.Font.Size:=12;
form3.Label2.Left:=296;
form3.Label3.Left:=331;
form3.Label4.Left:=331;
form3.Label5.Left:=331;
form3.Label6.Left:=331;
form3.Label7.Left:=331;
form3.Label5.visible:=true;
form3.Height:=251;
end;
end;
Form3.ShowModal; END;
end;
procedure TForm5.SpeedButton0Click(
begin
if flag=true then memo1.clear; memo1.Text:=memo1.Text+'0'; flag:=false;
if ss=10 then
begin
if (strtofloat(memo1.Text)=0) then begin memo1.Text:='0';
if nol<>'z' then
flag:=true else flag:=false; end;
end;
end;
procedure TForm5.SpeedButton0MouseLeave(
begin
SpeedButton0.Font.Color:=
end;
procedure TForm5.SpeedButton0MouseMove(
begin
SpeedButton0.Font.Color:=
end;
procedure TForm5.SpeedButton1Click(
begin
if flag=true then memo1.Clear;
memo1.Text:=memo1.Text+'1'; flag:=false;
end;
procedure TForm5.SpeedButton1MouseLeave(
begin
SpeedButton1.Font.Color:=
end;
procedure TForm5.SpeedButton1MouseMove(
begin
SpeedButton1.Font.Color:=
end;
procedure TForm5.SpeedButton2Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'2'; flag:=false;
end;
procedure TForm5.SpeedButton2MouseLeave(
begin
SpeedButton2.Font.Color:=
end;
procedure TForm5.SpeedButton2MouseMove(
begin
SpeedButton2.Font.Color:=
end;
procedure TForm5.SpeedButton3Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'3'; flag:=false;
end;
procedure TForm5.SpeedButton3MouseLeave(
begin
SpeedButton3.Font.Color:=
end;
procedure TForm5.SpeedButton3MouseMove(
begin
SpeedButton3.Font.Color:=
end;
procedure TForm5.SpeedButton4Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'4'; flag:=false;
end;
procedure TForm5.SpeedButton4MouseLeave(
begin
SpeedButton4.Font.Color:=
end;
procedure TForm5.SpeedButton4MouseMove(
begin
SpeedButton4.Font.Color:=
end;
procedure TForm5.SpeedButton5Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'5'; flag:=false;
end;
procedure TForm5.SpeedButton5MouseLeave(
begin
SpeedButton5.Font.Color:=
end;
procedure TForm5.SpeedButton5MouseMove(
begin
SpeedButton5.Font.Color:=
end;
procedure TForm5.SpeedButton6Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'6'; flag:=false;
end;
procedure TForm5.SpeedButton6MouseLeave(
begin
SpeedButton6.Font.Color:=
end;
procedure TForm5.SpeedButton6MouseMove(
begin
SpeedButton6.Font.Color:=
end;
procedure TForm5.SpeedButton7Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'7'; flag:=false;
end;
procedure TForm5.SpeedButton7MouseLeave(
begin
SpeedButton7.Font.Color:=
end;
procedure TForm5.SpeedButton7MouseMove(
begin
SpeedButton7.Font.Color:=
end;
procedure TForm5.SpeedButton8Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'8'; flag:=false;
end;
procedure TForm5.SpeedButton8MouseLeave(
begin
SpeedButton8.Font.Color:=
end;
procedure TForm5.SpeedButton8MouseMove(
begin
SpeedButton8.Font.Color:=
end;
procedure TForm5.SpeedButton9Click(
begin
if flag=true then memo1.clear;
memo1.Text:=memo1.Text+'9'; flag:=false;
end;
procedure TForm5.SpeedButton9MouseLeave(
begin
SpeedButton9.Font.Color:=
end;
procedure TForm5.SpeedButton9MouseMove(
begin
SpeedButton9.Font.Color:=
end;
procedure TForm5.SpeedButtonBackClick(
var l,p:integer; s:string;
begin
s:=''; s:=memo1.Text; l:=length(s);
if l>1 then
begin
s[l]:=' ';
p:=pos(' ',s);
delete(s,p,1);
memo1.Text:=s;
end
else if l=1 then
begin s[1]:='0'; memo1.Text:=s; end;
if memo1.Text='0' then flag:=true;
end;
procedure TForm5.SpeedButtonCEClick(
begin
Memo1.text:='0';
flag:=true;
end;
procedure TForm5.SpeedButtonCLClick(
begin
Memo1.text:='0';
a:=0; b:=0; c:=0; m:=0; d:=0; u:=0;
mk:=0; uk:=0; pk:=0; dk:=0;
kol:=0; R:=0;
mem_s:=0;
panel5.Caption:='';
flag:=true;
end;
procedure TForm5.SpeedButtonDelClick(
begin
if kol=1 then
BEGIN
if (klav='m') then
begin
memo1.Text:=floattostr((r-
R:=0; pk:=0; mk:=0; dk:=0; uk:=0;
end;
if (klav='u') then
begin
memo1.Text:=floattostr(r*