Diajukan Untuk Memenuhi Salah Satu Tugas Mata Kuliah Program Komputer Dosen : Drs Deddy Sofyan M,Pd

Wildan Ahmad Nawawi (09511026) Jurusan Pendidikan Matematika Sekolah Tinggi Keguruan dan Ilmu Pendidikan STKIP-Garut 2010-2011

Form Pasword
Listing Form Pasword
var procedure TForm_Password.BitBtn1Click(Sender: TObject); begin if ((edit2.Text<>'') and (edit2.Text=edit3.Text)) and (edit1.Text<>'') then begin Form_Loading.ProgressBar1.Position := 0; Form_Loading.Timer1.Enabled := true; Form_Loading.Visible:=true; assword: TForm_Password; implementation uses U_loading,U_Main_menu,U_Biodata,U_Ma tematika; {$R *.dfm}

edit1.setfocus; edit2.setfocus; edit3.setfocus; end else messagedlg('Password Anda Salah'+chr(10)+chr(13)+'Coba Anda Ulangi Lagi',mtinformation,[mbOK],0); end; procedure TForm_Password.Timer1Timer(Sender: TObject); begin label4.Left := label4.Left - 5; if label4.Left <= -100 then label4.Left := 550; if label4.Font.Color=clfuchsia then label4.Font.Color:=clwhite else label4.Font.Color:=clfuchsia; end; end.

Form Loading

Listing Form Loading
var Form_Loading: TForm_Loading; implementation uses U_Password,U_Main_menu,U_Biodata,U_Matem atika; {$R *.dfm} procedure TForm_Loading.Timer1Timer(Sender: TObject); begin if progressbar1.Position <> 100 then progressbar1.Position := progressbar1.Position +1 else begin Form_Password.visible:=false; timer1.Enabled := false; Form_Loading.Close; Form_Main_menu.visible:=true; Form_Loading.Visible:=false; end; end;

procedure TForm_Loading.Timer2Timer(Sender: TObject); begin if progressbar1.Position <> 100 then progressbar1.Position := progressbar1.Position +1 else begin timer2.Enabled := false; Form_Loading.Close; Form_Biodata.visible:=true; Form_Loading.Visible:=false; end; end; procedure TForm_Loading.Timer3Timer(Sender: TObject); begin if progressbar1.Position <> 100 then progressbar1.Position := progressbar1.Position +1 else begin timer3.Enabled := false; Form_Loading.Close; Form_Matematika.visible:=true; Form_Loading.Visible:=false;

end; end; procedure TForm_Loading.Timer4Timer(Sender: TObject); begin if label1.Font.Color=clfuchsia then label1.Font.Color:=clwhite else label1.Font.Color:=clfuchsia; end; end.

Form Main Menu
Sebelum di Running Setelah di Running

Listing Program Form Menu
var Form_Main_menu: TForm_Main_menu; implementation uses U_Password,U_loading,U_Biodata,U_Matematika; {$R *.dfm} procedure TForm_Main_menu.BarisanD1Click(Sender: TObject); begin //Form_Matematika.show; Form_Loading.ProgressBar1.Position := 0; Form_Loading.Timer3.Enabled := true; Form_Loading.Visible:=true; end; procedure TForm_Main_menu.Biodata1Click(Sender: TObject); begin //Form_Biodata.show; Form_Loading.ProgressBar1.Position := 0; Form_Loading.Timer2.Enabled := true; Form_Loading.Visible:=true; end;

var Form_Main_menu: TForm_Main_menu; implementation uses U_Password,U_loading,U_Biodata,U_Matematika; {$R *.dfm} procedure TForm_Main_menu.BarisanD1Click(Sender: TObject); begin //Form_Matematika.show; Form_Loading.ProgressBar1.Position := 0; Form_Loading.Timer3.Enabled := true; Form_Loading.Visible:=true; end; procedure TForm_Main_menu.Biodata1Click(Sender: TObject); begin //Form_Biodata.show; Form_Loading.ProgressBar1.Position := 0; Form_Loading.Timer2.Enabled := true; Form_Loading.Visible:=true; end; procedure TForm_Main_menu.Keluar1Click(Sender: TObject); begin application.terminate; end; procedure TForm_Main_menu.Timer1Timer(Sender: TObject);

begin label3.Left := label3.Left - 5; if label3.Left <= -100 then label3.Left := 550; if label3.Font.Color=clfuchsia then label3.Font.Color:=clwhite else label3.Font.Color:=clfuchsia; end; procedure TForm_Main_menu.Timer2Timer(Sender: TObject); begin if image2.visible=true then image2.visible:=false else image2.visible:=true; end; end.

Form Biodata
Sebelum di Running Setelah di Running

Listing Form Biodata
var Form_Biodata: TForm_Biodata; s:string; p,i:integer; nama:array[1..20] of string; nim:array[1..20] of string; kelahiran:array[1..20] of string; alamat:array[1..20] of string; telpon:array[1..20] of string; implementation uses U_Password,U_Loading,U_Main_menu,U_Matematika; {$R *.dfm} procedure TForm_Biodata.Button1Click(Sender: TObject);

begin listbox1.items.clear; s:=inputbox('Loop','Jumlah Perulangan',''); p:=strtoint(s); stringgrid1.cells[0,0]:='Nama'; stringgrid1.cells[1,0]:='Nim'; stringgrid1.cells[2,0]:='Kelahiran'; stringgrid1.cells[3,0]:='Alamat'; stringgrid1.cells[4,0]:='Telpon'; listbox1.Items.Add('No '+'Nama '+' Nim '+' Kelahiran '+' Alamat '+' No.Telephon '); listbox1.Items.Add('------------------------------------------------------------------------------'); for i := 1 to p do begin nama[i]:=inputbox('ID','Nama',' '); nim[i]:=inputbox('ID','Nim',' '); kelahiran[i]:=inputbox('ID','Kelahiran',' '); alamat[i]:=inputbox('ID','Alamat',' '); telpon[i]:=inputbox('ID','Telpon',' ');

listbox1.Items.Add(inttostr(i)+'. '+nama[i]+' '+nim[i]+' '+kelahiran[i]+' '+alamat[i]+' '+telpon[i]); stringgrid1.cells[0,i]:=Nama[i]; stringgrid1.cells[1,i]:=Nim[i]; stringgrid1.cells[2,i]:=Kelahiran[i]; stringgrid1.cells[3,i]:=Alamat[i]; stringgrid1.cells[4,i]:=Telpon[i]; end; end; procedure TForm_Biodata.Button2Click(Sender: TObject);

begin listbox1.Clear; stringgrid1.Cells[0,0]:=''; stringgrid1.Cells[1,0]:=''; stringgrid1.Cells[2,0]:=''; stringgrid1.Cells[3,0]:=''; stringgrid1.Cells[4,0]:=''; stringgrid1.Cells[0,1]:=''; stringgrid1.Cells[0,2]:=''; stringgrid1.Cells[0,3]:=''; stringgrid1.Cells[0,4]:=''; stringgrid1.Cells[1,1]:=''; stringgrid1.Cells[1,2]:=''; stringgrid1.Cells[1,3]:=''; stringgrid1.Cells[1,4]:=''; stringgrid1.Cells[2,1]:=''; stringgrid1.Cells[2,2]:=''; stringgrid1.Cells[2,3]:=''; stringgrid1.Cells[2,4]:=''; stringgrid1.Cells[3,1]:=''; stringgrid1.Cells[3,2]:=''; stringgrid1.Cells[3,3]:=''; stringgrid1.Cells[3,4]:=''; stringgrid1.Cells[4,1]:=''; stringgrid1.Cells[4,2]:=''; stringgrid1.Cells[4,3]:=''; stringgrid1.Cells[4,4]:=''; close; end;

procedure TForm_Biodata.Timer1Timer( Sender: TObject); begin if label1.Font.Color=clyellow then label1.Font.Color:=cllime else label1.Font.Color:=clyellow; if label4.Font.Color=clyellow then label4.Font.Color:=cllime else label4.Font.Color:=clyellow; if label5.Font.Color=clyellow then label5.Font.Color:=cllime else label5.Font.Color:=clyellow;

if label6.Font.Color=clyellow then label6.Font.Color:=cllime else label6.Font.Color:=clyellow; if label7.Font.Color=clyellow then label7.Font.Color:=cllime else label7.Font.Color:=clyellow; if label8.Font.Color=clyellow then label8.Font.Color:=cllime else label8.Font.Color:=clyellow; if label9.Font.Color=clyellow then label9.Font.Color:=cllime else label9.Font.Color:=clyellow; if

label10.Font.Color=clyell ow then label10.Font.Color:=cllim e else label10.Font.Color:=clyell ow; if label11.Font.Color=clyell ow then label11.Font.Color:=cllim e else label11.Font.Color:=clyell ow;
if label12.Font.Color=clyellow then label12.Font.Color:=cllime else label12.Font.Color:=clyellow;

if label13.Font.Color=clyellow then label13.Font.Color:=cllime else label13.Font.Color:=clyellow; if label14.Font.Color=clyellow then label14.Font.Color:=cllime else label14.Font.Color:=clyellow; if label15.Font.Color=clyellow then label15.Font.Color:=cllime else label15.Font.Color:=clyellow; if label16.Font.Color=clyellow then label16.Font.Color:=cllime else label16.Font.Color:=clyellow; end; procedure TForm_Biodata.Timer2Timer(Sender: TObject); begin if label17.Font.Color=cllime then label17.Font.Color:=clyellow else label17.Font.Color:=cllime; if label18.Font.Color=cllime then label18.Font.Color:=clyellow else label18.Font.Color:=cllime;

if label19.Font.Color=cllime then label19.Font.Color:=clyellow else label19.Font.Color:=cllime; if label20.Font.Color=cllime then label20.Font.Color:=clyellow else label20.Font.Color:=cllime; if label21.Font.Color=cllime then label21.Font.Color:=clyellow else label21.Font.Color:=cllime; if label22.Font.Color=cllime then label22.Font.Color:=clyellow else label22.Font.Color:=cllime; if label23.Font.Color=cllime then label23.Font.Color:=clyellow else label23.Font.Color:=cllime; if label24.Font.Color=cllime then label24.Font.Color:=clyellow else label24.Font.Color:=cllime; if label25.Font.Color=cllime then label25.Font.Color:=clyellow else label25.Font.Color:=cllime; if label26.Font.Color=cllime then label26.Font.Color:=clyellow else label26.Font.Color:=cllime;

if label27.Font.Color=cllime then label27.Font.Color:=clyellow else label27.Font.Color:=cllime; if label28.Font.Color=cllime then label28.Font.Color:=clyellow else label28.Font.Color:=cllime; if label29.Font.Color=cllime then label29.Font.Color:=clyellow else label29.Font.Color:=cllime; End; procedure TForm_Biodata.Timer3Timer(Send er: TObject); begin label31.Left := label31.Left - 5; if label31.Left <= -100 then label31.Left := 550; if label31.Font.Color=cllime then label31.Font.Color:=clwhite else label31.Font.Color:=cllime; end;

{procedure TForm_Biodata.Timer3Timer(Send er: TObject); begin label30.Left := label30.Left + 5; if label30.Left <= +100 then label30.Left := 550; if label30.Font.Color=cllime then label30.Font.Color:=clwhite else label30.Font.Color:=cllime; timer6.Enabled:=true; end;} {procedure TForm_Biodata.Timer4Timer(Send er: TObject); begin label30.Left := label30.Left - 5; if label30.Left <= -100 then label30.Left := 743; if label30.Font.Color=cllime then label30.Font.Color:=clwhite else label30.Font.Color:=cllime; {timer6.Enabled:=false; timer4.enabled:=true; end;

{procedure TForm_Biodata.Timer5Timer(Send er: TObject); begin label31.Left := label31.Left + 5; if label31.Left <= +100 then label31.Left := 743; if label31.Font.Color=cllime then label31.Font.Color:=clyellow else label31.Font.Color:=cllime; timer4.Enabled:=true; end;} procedure TForm_Biodata.Timer6Timer(Send er: TObject); begin {timer4.Enabled:=false; timer6.enabled:=true;} label31.Left := label31.Left - 5; if label31.Left <= -100 then label31.Left := 743;

Form Matematika sebelum di Running

Form Matematika Setelah di Running

Listing Program
var Form_Matematika: TForm_Matematika; a,i:integer; Y:real; x1:array[0..9999]of integer; y1:array[0..9999]of integer; x2:array[0..9999]of integer; y2:array[0..9999]of integer; p:array[0..9999]of real; q:array[0..9999]of real; r:array[0..9999]of real; s:array[0..9999]of real; t:array[0..9999]of real; u:array[0..9999]of real; v:array[0..9999]of real; m:array[1..9999]of integer; implementation uses U_Password,U_Loading,U_Main_menu,U_Biodat a; {$R *.dfm} procedure TForm_Matematika.BitBtn1Click(Sender: TObject); begin if a<=9999 then begin m[a]:=strtoint(edit3.Text); edit2.SetFocus; x1[a]:=strtoint(edit1.Text); edit3.SetFocus; y1[a]:=strtoint(edit2.Text); edit4.setfocus; p[a]:=m[a]*x1[a]; q[a]:=-p[a]+y1[a]; Y:=m[a]+q[a];

listbox1.Items.Add('=============================================== ============'); listbox1.Items.Add(' DATA KE '+inttostr(a)); listbox1.Items.Add('=============================================== ============'); listbox1.items.Add('Yang melalui titik (x,y) = '+'('+inttostr(x1[a])+','+inttostr(y1[a])+')'); listbox1.Items.Add('dan gradiennya (m) = '+inttostr(m[a])); listbox1.Items.Add('Maka persamaan garis Lurusnya adalah : '); listbox1.Items.Add('Y = '+inttostr(m[a])+'x'+'+'+'('+floattostr(q[a])+')'); listbox1.Items.Add(' '); end; if a<9999 then begin a:=a+1; edit4.text:=inttostr(a); end

else if a=9999 then messagedlg('STOP Data Bilangan Sudah 9999 buah',mtInformation,[mbYes],0); end; procedure TForm_Matematika.BitBtn3Click(Sender: TObject); begin edit1.clear; edit2.clear; edit3.clear; edit1.setfocus; end; procedure TForm_Matematika.BitBtn5Click(Sender: TObject); begin edit5.clear; edit6.clear; edit7.clear; edit8.clear; end;

procedure TForm_Matematika.BitBtn6Click(Sender: TObject); begin if a<=9999 then begin x1[a]:=strtoint(edit5.Text); edit5.SetFocus; y1[a]:=strtoint(edit6.Text); edit6.SetFocus; x2[a]:=strtoint(edit7.Text); edit7.SetFocus; y2[a]:=strtoint(edit8.Text); edit8.SetFocus; p[a]:=y2[a]-y1[a]; q[a]:=x2[a]-x1[a]; r[a]:=-y1[a]*q[a]; s[a]:=-x1[a]*p[a]; t[a]:=s[a]-r[a]; u[a]:=p[a]/q[a]; v[a]:=t[a]/q[a];

listbox2.Items.Add('========================================================= ==='); listbox2.Items.Add(' DATA KE '+inttostr(a)+' '); listbox2.Items.Add('========================================================= ==='); listbox2.Items.Add('Yang melalui titik (x1,y1) = '+'('+inttostr(x1[a])+','+inttostr(y1[a])+')'); listbox2.Items.Add('Yang melalui titik (x2,y2) = '+'('+inttostr(x2[a])+','+inttostr(y2[a])+')'); listbox2.Items.Add('dan Gradiennya adalah = '+floattostr(u[a])); listbox2.Items.Add('Maka Persamaan garis Lurusnya adalah : '); listbox2.Items.Add(floattostr(q[a])+'Y = '+floattostr(p[a])+'x'+'+'+'('+floattostr(t[a])+')'); listbox2.Items.Add('Y ='+floattostr(p[a])+'/'+floattostr(q[a])+'x'+'+'+'('+floattostr(t[a])+'/'+floattostr(q[a])+')'); listbox2.Items.Add('Y = '+floattostr(u[a])+'x'+'+'+'('+floattostr(v[a])+')'); listbox2.Items.Add(' '); end; if a<9999 then begin a:=a+1; edit9.text:=inttostr(a); end; end;

procedure TForm_Matematika.BitBtn7Click(Sender: TObject); begin close; end; procedure TForm_Matematika.Button1Click(Sender: TObject); begin label38.Visible:=false; panel3.Visible:=false; groupbox1.visible:=true; a:=1; edit4.text:=floattostr(a); end; procedure TForm_Matematika.Button2Click(Sender: TObject); begin label38.Visible:=false; panel3.Visible:=false; groupbox2.visible:=true; a:=1; edit9.text:=floattostr(a); end;

Procedure TForm_Matematika.Button3Click(Se nder: TObject); begin label38.Visible:=true; panel3.Visible:=true; groupbox2.Visible:=false; edit5.clear; edit6.clear; edit7.clear; edit8.clear; edit9.clear; listbox2.Clear; end; Procedure TForm_Matematika.Button4Click(Se nder: TObject); begin label38.Visible:=true; panel3.Visible:=true; groupbox1.visible:=false;

edit1.clear; edit2.clear; edit3.clear; edit4.clear; listbox1.clear; end; procedure TForm_Matematika.FormCreate(Sender: TObject); begin {a:=1; edit9.text:=floattostr(a); edit4.text:=floattostr(a); } end; procedure TForm_Matematika.Timer1Timer(Sender : TObject); begin if label18.Font.Color=clwhite then label18.Font.Color:=clyellow

else label18.Font.Color:=clwhite; if label19.Font.Color=clwhite then label19.Font.Color:=clyellow else label19.Font.Color:=clwhite; if label21.Font.Color=clwhite then label21.Font.Color:=clyellow else label21.Font.Color:=clwhite; if label22.Font.Color=clwhite then label22.Font.Color:=clyellow else label22.Font.Color:=clwhite; if label23.Font.Color=clwhite then label23.Font.Color:=clyellow else label23.Font.Color:=clwhite; if label24.Font.Color=clwhite then label24.Font.Color:=clyellow

else label24.Font.Color:=clwhite; if label26.Font.Color=clwhite then label26.Font.Color:=clyellow else label26.Font.Color:=clwhite; if label25.Font.Color=clwhite then label25.Font.Color:=clyellow else label25.Font.Color:=clwhite; if label27.Font.Color=clwhite then label27.Font.Color:=clyellow else label27.Font.Color:=clwhite; end;

procedure TForm_Matematika.Timer2Timer(Sender: TObject); begin if label28.Font.Color=clyellow then label28.Font.Color:=clwhite

else label28.Font.Color:=clyellow; if label29.Font.Color=clyellow then label29.Font.Color:=clwhite else label29.Font.Color:=clyellow; if label30.Font.Color=clyellow then label30.Font.Color:=clwhite else label30.Font.Color:=clyellow; if label31.Font.Color=clyellow then label31.Font.Color:=clwhite else label31.Font.Color:=clyellow; if label32.Font.Color=clyellow then label32.Font.Color:=clwhite else label32.Font.Color:=clyellow; if label20.Font.Color=clyellow then label20.Font.Color:=clwhite

else label20.Font.Color:=clyellow; if label33.Font.Color=clyellow then label33.Font.Color:=clwhite else label33.Font.Color:=clyellow; if label34.Font.Color=clyellow then label34.Font.Color:=clwhite else label34.Font.Color:=clyellow; if label35.Font.Color=clyellow then label35.Font.Color:=clwhite else label35.Font.Color:=clyellow; if label36.Font.Color=clyellow then label36.Font.Color:=clwhite

else label36.Font.Color:=clyellow; end; Procedure TForm_Matematika.Timer3Time r(Sender: TObject); begin label37.Left := label37.Left - 5; if label31.Left <= -100 then label37.Left := 550; if label37.Font.Color=cllime then label37.Font.Color:=clwhite else label37.Font.Color:=cllime; end; end.

Sign up to vote on this title
UsefulNot useful