Автор работы: Пользователь скрыл имя, 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
Список литературы……
memo1.Text:=Format('%x',[c3]);
end;
end;
procedure TForm1.SpeedButtonOrClick(
begin
flag:=true; klav:='i';
case ss of
2: memo1.Text:=inttostr((Rto10(
8: memo1.Text:=inttostr((Rto10(
16: memo1.Text:=inttostr((Rto10(
end;
if mok=0 then mo:=strtoint(memo1.Text);
if (mok=1) then mb1:=strtoint(memo1.text);
if (mok>=1) then memo1.Text:=inttostr(mo or mb1);
R:=strtofloat(memo1.Text);
case ss of
2: memo1.Text:=(ConvertToCs(
8: memo1.Text:=(ConvertToCs(
16: memo1.Text:=(ConvertToCs(
end;
kol:=1; inc(mok);
end;
procedure TForm1.SpeedButtonPiClick(
begin
memo1.Text:=floattostr(pi);
flag:=true;
end;
procedure TForm1.
begin
flag:=true;
memo1.Text:=floattostr(
end;
procedure TForm1.
begin
if strtofloat(memo1.text)>0 then
memo1.Text:=floattostr(
else
if strtofloat(memo1.text)<0 then
memo1.Text:=floattostr(
end;
procedure TForm1.
begin
SpeedButtonPlusMinus.Font.
end;
procedure TForm1.
begin
SpeedButtonPlusMinus.Font.
end;
procedure TForm1.SpeedButtonRavnoClick(
var j:integer;
begin
case klav of
'p': begin
SpeedButtonPlusClick(
pk:=1; a:=0; m:=r; d:=r; u:=r;
end;
'm': begin
SpeedButtonMinusClick(
mk:=0; a:=0; m:=r; d:=r; u:=r;
end;
'd': begin
SpeedButtonDelClick(
dk:=0; a:=0; m:=r; d:=r; u:=r;
end;
'u': begin
SpeedButtonUmnClick(
uk:=0; a:=0; m:=r; d:=r; u:=r;
end;
'^': memo1.Text:=floattostr(
'o': begin
SpeedButtonModClick(
mo:=0; mok:=0;
end;
'a': begin
SpeedButtonAndClick(
mo:=0; mok:=0;
end;
'i': begin
SpeedButtonOrClick(
mo:=0; mok:=0;
end;
'x': begin
SpeedButtonXorClick(
mo:=0; mok:=0;
end;
'l': begin
SpeedButtonLshClick(
ls:=0; lk:=0;
end;
End;
flag:=true; klav:='r';
end;
procedure TForm1.
begin
SpeedButtonRavno.Font.Color:=
end;
procedure TForm1.
begin
SpeedButtonRavno.Font.Color:=
end;
procedure TForm1.SpeedButtonSClick(
var
sum,n:extended; index:integer;
begin
sum:=0; n:=0;
for index:=0 to (form2.ListBox1.Items.Count-1) do
begin
sum:=sum+strtofloat(form2.
end;
try
sum:=sum/(form2.ListBox1.
except
memo1.Text:='0';
end;
for index:=0 to (form2.ListBox1.Items.Count-1) do
begin
n:=n+sqr(strtofloat(form2.
end;
if inv.Checked=true then
try memo1.Text:=floattostr(power((
except memo1.Text:='0'; end
else
try memo1.Text:=floattostr(sqrt(n/
except memo1.Text:='0'; end;
Flag:=true;
end;
procedure TForm1.SpeedButtonSinClick(
var t:real;
begin
t:=strtofloat(memo1.Text);
{---------------------------
if RadioButtonRad.Checked=true then BEGIN
if (Inv.Checked=false) and (Hyp.Checked=false) then
memo1.Text:=floattostr(sin(
if (Inv.Checked=true) and (Hyp.Checked=false) then begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) ) then
memo1.Text:=floattostr(Arcsin(
else
memo1.Text:=net; end;
if (Inv.Checked=false) and (Hyp.Checked=true) then
memo1.Text:=floattostr(sinh(t)
if (Inv.Checked=true) and (Hyp.Checked=true) then
memo1.Text:=floattostr(
{---------------------------
{---------------------------
if RadioButtonGradus.Checked=true then
BEGIN
if (strtofloat(memo1.Text)=180) then begin memo1.Text:='0'; end;
if (Inv.Checked=false) and (Hyp.Checked=false) then
memo1.text:=floattostr(sin(
if (Inv.Checked=true) and (Hyp.Checked=true) then
memo1.text:=floattostr(
if (Inv.Checked=true) and (Hyp.Checked=false) then begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) ) then
memo1.Text:=floattostr(180/pi*
else memo1.Text:=net; end;
if (Inv.Checked=false) and (Hyp.Checked=true) then
memo1.text:=floattostr(sinh(
if (Inv.Checked=false) and (Hyp.Checked=false) then
Begin
if (trunc(strtofloat(memo1.Text))
if (trunc(strtofloat(memo1.Text))
if (strtofloat(memo1.Text)=270) then begin memo1.Text:='-1'; end;
if (strtofloat(memo1.Text)=180) then begin memo1.Text:='0'; end;
if (strtofloat(memo1.Text)=360) then begin memo1.text:='0'; end;
End;
END;
{---------------------------
{---------------------------
if RadioButtonGrad.Checked=true then
BEGIN
if (Inv.Checked=false) and (Hyp.Checked=false) then
memo1.text:=floattostr(sin(
if (Inv.Checked=true) and (Hyp.Checked=false) then begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) ) then
memo1.Text:=floattostr(200/pi*
else memo1.Text:=net; end;
if (Inv.Checked=false) and (Hyp.Checked=true) then
memo1.text:=floattostr(sinh(
if (Inv.Checked=true) and (Hyp.Checked=true) then
memo1.text:=floattostr(
END;
{---------------------------
flag:=true;
end;
procedure TForm1.SpeedButtonSqrtClick(
begin
flag:=true;
try
memo1.Text:=floattostr(sqrt(
except
memo1.Text:=net;
end;
end;
procedure TForm1.SpeedButtonStaClick(
begin
AnimateWindow(form2.Handle, 90, aw_blend);
Form2.Show;
SpeedButtonS.Enabled:=true;
SpeedButtonSum.Enabled:=true;
SpeedButtonAve.Enabled:=true;
SpeedButtonDat.Enabled:=true;
end;
procedure TForm1.SpeedButtonSumClick(
var sum:real; si:integer;
begin
sum:=0;
for si := 0 to (Form2.ListBox1.Items.Count-1) do
sum:=sum+strtofloat(form2.
memo1.Text:=floattostr(sum);
end;
procedure TForm1.SpeedButtonTClick(
var k:integer;
begin
nol:='z'; k:=0;
for i := 1 to length(memo1.text) do
if memo1.Text[i]=',' then inc(k);
if k=0 then memo1.Text:=memo1.Text+',';
flag:=false;
end;
procedure TForm1.SpeedButtonTgClick(
var t:real;
begin
TRY
t:=strtofloat(memo1.Text);
{---------------------------
if RadioButtonRad.Checked=true then
BEGIN
if (Inv.Checked=false) and (Hyp.Checked=false) then
memo1.Text:=floattostr(tan(
if (Inv.Checked=true) and (Hyp.Checked=false) then begin
if ((strtofloat(memo1.Text)<90) and (strtofloat(memo1.Text)>(-90)) ) then
memo1.Text:=floattostr(Arctan(
else
memo1.Text:=net; end;
if (Inv.Checked=false) and (Hyp.Checked=true) then
memo1.Text:=floattostr(tanh(t)
if (Inv.Checked=true) and (Hyp.Checked=true) then begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) ) then
memo1.Text:=floattostr(
else memo1.Text:=net; end;
END;
{---------------------------
{---------------------------
if radiobuttonGradus.Checked=true then
BEGIN
if ((inv.Checked=true) and (hyp.Checked=false))then
memo1.Text:=floattostr(180/pi*
if ((inv.Checked=true) and (hyp.Checked=true)) then begin
if (strtofloat(memo1.Text)<1) then
memo1.Text:=floattostr(
else begin
memo1.Text:=net; exit; end;
end ;
if ((inv.Checked=false) and ( hyp.Checked=true)) then
memo1.Text:=floattostr(tanh(
if ((inv.Checked=false) and ( hyp.Checked=false)) then Begin
if (strtofloat(memo1.Text)=0) then memo1.Text:='0';
if (strtofloat(memo1.Text)=90) then memo1.Text:=net;
if (strtofloat(memo1.Text)=270) then memo1.Text:=net;
if (strtofloat(memo1.Text)=180) then memo1.Text:='0';
if (strtofloat(memo1.Text)=360) then memo1.text:='0';
if ((strtofloat(memo1.Text)=90 ) or (strtofloat(memo1.Text)=(-90)) ) then
begin
memo1.Text:=net;
inv.Checked:=false;
hyp.Checked:=false; exit; end
else memo1.Text:=floattostr(
end;
END;
{---------------------------
{---------------------------
if RadioButtonGrad.Checked=true then
BEGIN
if ((inv.Checked=true) and (hyp.Checked=false))then
memo1.Text:=floattostr(200/pi*
if ((inv.Checked=true) and (hyp.Checked=true)) then begin
if strtofloat(memo1.text)>1 then memo1.Text:=net else
memo1.Text:=floattostr(
if ((inv.Checked=false) and ( hyp.Checked=true)) then
memo1.Text:=floattostr(Tanh(
if ((inv.Checked=false) and ( hyp.Checked=false)) then
memo1.Text:=floattostr(tan(
END;
{---------------------------
Except
END;
flag:=true;
end;
procedure TForm1.SpeedButtonTMouseLeave(
begin
SpeedButtonT.Font.Color:=
end;
procedure TForm1.SpeedButtonTMouseMove(
begin
SpeedButtonT.Font.Color:=
end;
procedure TForm1.SpeedButtonUmnClick(
begin
case ss of
2: memo1.Text:=inttostr((Rto10(
8: memo1.Text:=inttostr((Rto10(
16: memo1.Text:=inttostr((Rto10(
end;
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='p') then
begin
memo1.Text:=floattostr(r+
R:=0; pk:=0; mk:=0; dk:=0; uk:=0;
end;
if (klav='d') then
begin
memo1.Text:=floattostr(r/
R:=0; pk:=0; mk:=0; dk:=0; uk:=0;
end;
if (klav='o') then SpeedButtonModClick(
if (klav='l') then SpeedButtonLshClick(
flag:=true;
if uk=0 then u:=strtofloat(memo1.Text);
if uk=1 then R:=u*strtofloat(memo1.text);
if uk>1 then R:=R*strtofloat(memo1.Text);
if uk>=1 then memo1.Text:=floattostr(r);
R:=strtofloat(memo1.Text);
case ss of
2: memo1.Text:=(ConvertToCs(
8: memo1.Text:=(ConvertToCs(
16: memo1.Text:=(ConvertToCs(
end;
END;
kol:=0; klav:='u'; inc(uk);
end;
procedure TForm1.SpeedButtonX2Click(
begin
memo1.Text:=floattostr(
end;
procedure TForm1.SpeedButtonXorClick(
begin
flag:=true; klav:='x';
case ss of
2: memo1.Text:=inttostr((Rto10(
8: memo1.Text:=inttostr((Rto10(
16: memo1.Text:=inttostr((Rto10(
end;
if mok=0 then mo:=strtoint(memo1.Text);
if (mok=1) then mb1:=strtoint(memo1.text);
if (mok>=1) then memo1.Text:=inttostr(mo xor mb1);
R:=strtofloat(memo1.Text);
case ss of
2: memo1.Text:=(ConvertToCs(
8: memo1.Text:=(ConvertToCs(
16: memo1.Text:=(ConvertToCs(
end;
kol:=1; inc(mok);
end;
procedure TForm1.SpeedButtonXYClick(
begin
klav:='^';
flag:=true; l:=l+1;
s:=strtofloat(memo1.Text);
end;
procedure TForm1.StandartClick(Sender: TObject);
begin
Form5.Show;
Form1.hide;
end;
END. {END}
{-----------------------------
UNIT 2
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg, ExtCtrls, XPMan;
type
TForm2 = class(TForm)
ListBox1: TListBox;
SpeedButtonRet: TSpeedButton;
SpeedButtonLoad: TSpeedButton;
SpeedButtonCd: TSpeedButton;
SpeedButtonCad: TSpeedButton;
LabelN: TLabel;
Image1: TImage;
XPManifest1: TXPManifest;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpeedButtonRetClick(Sender: TObject);
procedure SpeedButtonCadClick(Sender: TObject);
procedure SpeedButtonCdClick(Sender: TObject);
procedure SpeedButtonLoadClick(Sender: TObject);
function ListBox1DataFind(Control: TWinControl;
FindString: string): Integer;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses unit1;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form1.SpeedButtonS.Enabled:=
form1.SpeedButtonSum.Enabled:=
form1.SpeedButtonAve.Enabled:=
form1.SpeedButtonDat.Enabled:=
end;
function TForm2.ListBox1DataFind(
begin
labeln.Caption:=inttostr(
end;
procedure TForm2.SpeedButtonCadClick(
begin
ListBox1.Clear;
labeln.Caption:='n= '+inttostr(ListBox1.Items.
end;
procedure TForm2.SpeedButtonCdClick(
begin
ListBox1.Items.Delete(
labeln.Caption:='n= '+inttostr(ListBox1.Items.
end;
procedure TForm2.SpeedButtonLoadClick(
begin
try
form1.Memo1.Text:=Listbox1.
except
end;
end;
procedure TForm2.SpeedButtonRetClick(
begin
Form1.SetFocus;
labeln.Caption:='n= '+inttostr(ListBox1.Items.
end;
end.
{-----------------------------
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls, unit5;
type
TForm3 = class(TForm)
StringGrid1: TStringGrid;
Label1: TLabel;
Button1: TButton;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
end;
var
Form3: TForm3; R:real; i,j,k,l,n:integer;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
var
a:array [0..8,0..8] of real; x:array [0..6] of real;
c2,s:real; m:integer;
begin
R:=0; n:=StringGrid1.RowCount;
for i := 0 to StringGrid1.RowCount-1 do
for j := 0 to StringGrid1.ColCount-1 do
a[j,i]:=strtofloat(
for i:=0 to n-2 do
begin
c2:=a[i,i];
for j:=i to n+1 do a[j,i]:=a[j,i]/c2;
for k:=i+1 to n do
for j:=i+1 to n+1 do
a[k,j]:=a[k,j]-a[k,i]*a[i,j];
end;
for i := 0 to StringGrid1.RowCount-1 do
for j := 0 to StringGrid1.ColCount-1 do begin
form5.StringGrid1.Cells[j,i]:=
for i:=0 to 6 do x[i]:=0;
x[n-1]:=a[n,n-1]/a[n-1,n-1];
n:=n-1;
k:=n-1;
s:=0;
m:=k-2;
repeat
s:=0;
for j:=m to n do s:=s+a[j,k]*x[j];
x[k]:=a[n+1,k]-s;