Kamis, 31 Januari 2019

SHORT CODING FUNGSI STATISTIK MENGGUNAKAN DELPHI7 LENGKAP DENGAN VIDIO

SHORT CODING FUNGSI STATISTIK
MEAN, JUMLAH,VAR,CTD,MINIMUM,MAKSIMUM,DAN MEDIAN MENGGUNAKAN DELPHI 7






var
  Statistika: TStatistika;
  i,j,k,V,D,a: integer;
  Urut,b: real;
  Xbar, Xtot, Varian: array [1..100] of real;
  X: array [1..100,1..100] of real;

implementation

{$R *.dfm}

procedure TStatistika.Edit1Change(Sender: TObject);
begin
if (edit1.Text='') then begin messagedlg('Anda Belum Input Jumlah Data',mtconfirmation,[mbYes],0);
exit;
edit1.SetFocus;
end;
stringgrid1.RowCount:=strtoint(edit1.Text)+1;
if strtoint(edit1.Text)=0 then
stringgrid1.FixedRows:=0
else stringgrid1.FixedRows:=1;
for j:=1 to strtoint(edit1.text) do
begin
stringgrid1.cells[0,0]:='No';
stringgrid1.cells[1,0]:='Data X';
stringgrid1.cells[2,0]:='Data Y';
stringgrid1.cells[0,j]:=inttostr(j);
end;
end;

procedure TStatistika.Button1Click(Sender: TObject);
var a,b:Integer;
DataX:array[1..90] of string;
DataY:array[1..90] of string;
begin
if Edit1.Text<>'' then
  begin
  b:=strtoint(Edit1.Text);
  for a:=1 to b do
  begin
    DataX[a]:=InputBox('Data X','Data X','');
    DataY[a]:=InputBox('Data Y','Data Y','');
  end;
  StringGrid1.rowcount:=b+1;
  for a:=1 to b do
  begin
    StringGrid1.Cells[1,a]:=DataX[a];
    StringGrid1.Cells[2,a]:=DataY[a];
  end;
  end
  else
application.MessageBox('Masukkan Data','Error');
Edit1.SetFocus;
end;

procedure TStatistika.Button2Click(Sender: TObject);
begin
V:=strtoint(edit1.Text);
D:=strtoint(Edit1.Text);
stringgrid1.Cells[0,0]:='No';
stringgrid1.Cells[1,0]:='X';
stringgrid1.Cells[2,0]:='Y';
stringgrid2.Cells[0,0]:='Deskripsi';
stringgrid2.Cells[1,0]:='Data X';
stringgrid2.Cells[2,0]:='Data Y';

for j:=1 to V do
begin
StringGrid2.ColCount:=3;
StringGrid2.RowCount:=8;
end;

for i:=1 to V do
begin
Xtot[i]:=0;
Xbar[i]:=0;
Varian[i]:=0;

for j:=1 to D do
begin
Xbar[i]:=Xbar[i]+((strtofloat(stringgrid1.Cells[i,j])/D));
Xtot[i]:=Xtot[i]+((strtofloat(stringgrid1.Cells[i,j])));
Varian[i]:=Varian[i]+(sqr(Xbar[i]-strtofloat(stringgrid1.Cells[i,j]))/(D-1));
end;
StringGrid2.Cells[i,3]:=formatfloat('#.00',Xbar[i]);
stringgrid2.Cells[0,3]:='Mean';
StringGrid2.Cells[i,7]:=floattostr(Xtot[i]);
stringgrid2.Cells[0,7]:='Jumlah';
StringGrid2.Cells[i,5]:=formatfloat('#.00',Varian[i]);
StringGrid2.Cells[i,6]:=formatfloat('#.00',(sqrt(Varian[i])));
stringgrid2.Cells[0,5]:='Var';
stringgrid2.Cells[0,6]:='Std';
end;

for i:=1 to V do
begin
for j:=1 to D do
begin
X[i,j]:=strtofloat(stringgrid1.Cells[i,j]);
end;
end;

a:=(D+1) div 2;
b:=(D+1)/2;
for i:=1 to V do
begin
for j:=1 to D-1 do
begin
for k:=j+1 to D do
begin
if X[i,j]>X[i,k] then
begin
Urut:=X[i,j];
X[i,j]:=X[i,k];
X[i,k]:=Urut;

end;
end;
end;
StringGrid2.Cells[i,1]:=floattostr(X[i,1]);
StringGrid2.Cells[i,2]:=floattostr(X[i,D]);
StringGrid2.Cells[i,4]:=floattostr(X[i,a]+((b-a)*(X[i,a+1]-X[i,a])));
stringgrid2.Cells[0,1]:='Minimum';
stringgrid2.Cells[0,2]:='Maksimum';
stringgrid2.Cells[0,4]:='Median';
end;end;

procedure TStatistika.Button3Click(Sender: TObject);
var i :integer;
begin
for i :=0 to StringGrid1.ColCount -1 do
   StringGrid1.Cols[i].Clear;
for i :=0 to StringGrid2.ColCount -1 do
   StringGrid2.Cols[i].Clear;
Edit1.Clear;
end;

procedure TStatistika.BitBtn1Click(Sender: TObject);
begin
Application.Terminate;
end;

end.

VIDIO TUTORIAL MEMBUAT FUNGSI STATISTIK DENGAN DELPHI 7 :


SHORT CODE Fungsi Keuangan Kasir Menggunakan Delphi7

SHORT CODE FUNGSI KEUANGAN KASIR DENGAN DELPHI7
LEBIH LENGKAP TONTON JUGA VIDIO DI BAWA INI!!






procedure TFungsi_keuangan_Kasir.Button1Click(Sender: TObject);
var
harga,bayar,kembalian,total : Real;
jumlah : Integer;
begin
if ((Edit1.Text ='') or (Edit2.Text ='') or (Edit3.Text = '')) then
begin
MessageDlg('Maaf Data Yang Anda Masukan Belum Semua , Mohon Di Cek Kembali!',mtError,[mbOK],0);
Edit1.SetFocus;
Exit;
end;

//pemasukan

harga:= StrToFloat(Edit1.Text);
jumlah:=StrToInt(Edit2.Text);
bayar:=StrToFloat(Edit3.Text);

total := harga * jumlah;
kembalian:= bayar-total;

//keluaran secara otomatis
Label7.Caption:=FormatFloat('Rp #,###,#0.00',total);
Label8.Caption:=FormatFloat('Rp #,###,#0.00',kembalian);
end;

procedure TFungsi_keuangan_Kasir.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Label7.Caption:='';
Label8.Caption:='';
end;

procedure TFungsi_keuangan_Kasir.Button3Click(Sender: TObject);
begin
Application.Terminate;
end;

end.

VIDIO:


Rabu, 30 Januari 2019

SHORT CODING Matriks Penjumlahan, Perkalian, Dan Transpose Menggunakan Delphi7

CODING MATRIKS DELPHI 7










procedure TMatriks.FormCreate(Sender: TObject);
begin
StringGrid1.Cells[1, 1] := '1';
StringGrid1.Cells[1, 2] := '0';
StringGrid1.Cells[1, 3] := '0';
StringGrid1.Cells[1, 4] := '0';
StringGrid1.Cells[1, 5] := '0';

StringGrid1.Cells[2, 1] := '0';
StringGrid1.Cells[2, 2] := '1';
StringGrid1.Cells[2, 3] := '0';
StringGrid1.Cells[2, 4] := '0';
StringGrid1.Cells[2, 5] := '0';

StringGrid1.Cells[3, 1] := '0';
StringGrid1.Cells[3, 2] := '0';
StringGrid1.Cells[3, 3] := '1';
StringGrid1.Cells[3, 4] := '0';
StringGrid1.Cells[3, 5] := '0';

StringGrid1.Cells[4, 1] := '0';
StringGrid1.Cells[4, 2] := '0';
StringGrid1.Cells[4, 3] := '0';
StringGrid1.Cells[4, 4] := '1';
StringGrid1.Cells[4, 5] := '0';

StringGrid1.Cells[5, 1] := '0';
StringGrid1.Cells[5, 2] := '0';
StringGrid1.Cells[5, 3] := '0';
StringGrid1.Cells[5, 4] := '0';
StringGrid1.Cells[5, 5] := '1';

StringGrid2.Cells[1, 1] := '5';
StringGrid2.Cells[1, 2] := '5';
StringGrid2.Cells[1, 3] := '5';
StringGrid2.Cells[1, 4] := '5';
StringGrid2.Cells[1, 5] := '5';

StringGrid2.Cells[2, 1] := '4';
StringGrid2.Cells[2, 2] := '4';
StringGrid2.Cells[2, 3] := '4';
StringGrid2.Cells[2, 4] := '4';
StringGrid2.Cells[2, 5] := '4';

StringGrid2.Cells[3, 1] := '3';
StringGrid2.Cells[3, 2] := '3';
StringGrid2.Cells[3, 3] := '3';
StringGrid2.Cells[3, 4] := '3';
StringGrid2.Cells[3, 5] := '3';

StringGrid2.Cells[4, 1] := '2';
StringGrid2.Cells[4, 2] := '2';
StringGrid2.Cells[4, 3] := '2';
StringGrid2.Cells[4, 4] := '2';
StringGrid2.Cells[4, 5] := '2';

StringGrid2.Cells[5, 1] := '1';
StringGrid2.Cells[5, 2] := '1';
StringGrid2.Cells[5, 3] := '1';
StringGrid2.Cells[5, 4] := '1';
StringGrid2.Cells[5, 5] := '1';
end;

procedure TMatriks.Button1Click(Sender: TObject);
var a,b:Integer;
kolom1:array[1..90] of string;
kolom2:array[1..90] of string;
kolom3:array[1..90] of string;
kolom4:array[1..90] of string;
begin
if Edit3.Text<>'' then
  begin
  b:=strtoint(Edit3.Text);
  for a:=1 to b do
  begin
    kolom1[a]:=InputBox('kolom1','kolom1','');
    kolom2[a]:=InputBox('kolom2','kolom2','');
    kolom3[a]:=InputBox('kolom3','kolom3','');
    kolom4[a]:=InputBox('kolom4','kolom4','');
  end;
  StringGrid1.rowcount:=b+1;
  for a:=1 to b do
  begin
    StringGrid1.Cells[1,a]:=kolom1[a];
    StringGrid1.Cells[2,a]:=kolom2[a];
    StringGrid1.Cells[3,a]:=kolom3[a];
    StringGrid1.Cells[4,a]:=kolom4[a];
  end;
  end
  else
application.MessageBox('Masukkan Data','Error');
Edit3.SetFocus;
end;

procedure TMatriks.Button2Click(Sender: TObject);
var
i,j,k  : integer;
data1  : array [1..10, 1..10] of integer;
data2  : array [1..10, 1..10] of integer;
hasil  : array [1..10, 1..10] of integer;
begin
if RadioButton1.checked then
begin
if (edit1.Text = edit4.Text) and (edit2.Text = edit5.Text) then
begin
for i := 1 to strtoint(edit1.Text) do
begin
StringGrid1.Cells[0,i] := 'B' + InttoStr(i);
StringGrid2.Cells[0,i] := 'B' + InttoStr(i);
StringGrid3.Cells[0,i] := 'B' + InttoStr(i);
for j:= 1 to strtoint(edit2.Text) do
begin
StringGrid1.Cells[i,0] := 'K' + InttoStr(i);
StringGrid2.Cells[i,0] := 'K' + InttoStr(i);
StringGrid3.Cells[i,0] := 'K' + InttoStr(i);
StringGrid3.Cells[i,j] := '';
data1[i,j] := StrtoInt(StringGrid1.Cells[i,j]);
data2[i,j] := StrtoInt(StringGrid2.Cells[i,j]);
Hasil[i,j] := data1[i,j] + data2[i,j];
stringGrid3.RowCount := strtoint(edit1.Text)+1;
stringGrid3.ColCount := strtoint(edit2.Text)+1;
StringGrid3.Cells[i,j] := inttostr(Hasil[i,j]);
end;
end;
end
else
showmessage('Ukuran Matriks Tidak sama');
edit1.SetFocus;
end;

if RadioButton2.checked then
begin
if ((edit2.Text) = (edit4.Text)) then
begin
for i := 1 to StrtoInt(Edit1.Text) do
for j:= 1 to StrtoInt(Edit5.Text) do
begin
Hasil[i,j] := 0;
for k:= 1 to StrtoInt(Edit2.Text) do
begin
data1[i,k] := StrtoInt(StringGrid1.Cells[k,i]);
data2[k,j] := StrtoInt(StringGrid2.Cells[j,k]);
Hasil [i,j] := Hasil[i,j] + data1[i,k] * data2[k,j];
StringGrid3.RowCount := StrtoInt(edit1.Text) + 1;
StringGrid3.ColCount := StrtoInt(edit5.Text) + 1;
end;
StringGrid3.Cells[j,i] := inttostr(Hasil[i,j]);
end;
end
else
begin
showmessage('Ukuran Matriks Tidak Sesuai');
edit2.SetFocus;
end;
end;

if RadioButton3.checked then
begin
stringGrid3.RowCount := strtoint(edit2.Text)+1;
stringGrid3.ColCount := strtoint(edit1.Text)+1;
for i := 1 to strtoint(edit2.Text) do
begin
for j:= 1 to strtoint(edit1.Text) do
StringGrid3.Cells[j,i] := StringGrid1.Cells[i,j];
end;
end;

if RadioButton4.checked then
begin
stringGrid3.RowCount := strtoint(edit4.Text)+1;
stringGrid3.ColCount := strtoint(edit3.Text)+1;
for i := 1 to strtoint(edit4.Text) do
begin
for j:= 1 to strtoint(edit3.Text) do
StringGrid3.Cells[j,i] := StringGrid2.Cells[i,j];
end;
end;

end;

procedure TMatriks.Button3Click(Sender: TObject);
begin
Application.Terminate;
end;

procedure TMatriks.RadioButton1Click(Sender: TObject);
begin
GroupBox2.Caption := '  Hasil Penjumlahan Matrik A dan B  ';
end;

procedure TMatriks.RadioButton2Click(Sender: TObject);
begin
GroupBox2.Caption := '  Hasil Perkalian Matrik A dan B  ';
end;

procedure TMatriks.Edit1Change(Sender: TObject);
begin
stringGrid1.RowCount := strtoint(edit1.Text)+1;
if (strtoint(edit1.Text)) > 6 then
Begin
StringGrid1.DefaultRowHeight := 15;
StringGrid3.DefaultRowHeight := 15;
end;
end;

procedure TMatriks.Edit2Change(Sender: TObject);
begin
stringGrid1.ColCount := strtoint(edit2.Text)+1;
if (strtoint(edit2.Text)) > 6 then
begin
StringGrid1.DefaultColWidth := 30;
StringGrid3.DefaultColWidth := 30;
end;
end;

procedure TMatriks.Edit4Change(Sender: TObject);
begin
stringGrid2.RowCount := strtoint(edit4.Text)+1;
if (strtoint(edit4.Text)) > 6 then
Begin
StringGrid2.DefaultRowHeight := 30;
StringGrid3.DefaultRowHeight := 30;
end;
end;

procedure TMatriks.Button4Click(Sender: TObject);
var a,b:Integer;
kolom1:array[1..90] of string;
kolom2:array[1..90] of string;
kolom3:array[1..90] of string;
kolom4:array[1..90] of string;
begin
if Edit6.Text<>'' then
  begin
  b:=strtoint(Edit6.Text);
  for a:=1 to b do
  begin
    kolom1[a]:=InputBox('kolom1','kolom1','');
    kolom2[a]:=InputBox('kolom2','kolom2','');
    kolom3[a]:=InputBox('kolom3','kolom3','');
    kolom4[a]:=InputBox('kolom4','kolom4','');
  end;
  StringGrid2.rowcount:=b+1;
  for a:=1 to b do
  begin
    StringGrid2.Cells[1,a]:=kolom1[a];
    StringGrid2.Cells[2,a]:=kolom2[a];
    StringGrid2.Cells[3,a]:=kolom3[a];
    StringGrid2.Cells[4,a]:=kolom4[a];
  end;
  end
  else
application.MessageBox('Masukkan Data','Error');
Edit6.SetFocus;
end;


procedure TMatriks.Edit5Change(Sender: TObject);
begin
stringGrid2.ColCount := strtoint(edit5.Text)+1;
if (strtoint(edit4.Text)) > 6 then
begin
StringGrid2.DefaultColWidth := 30;
StringGrid3.DefaultColWidth := 30;
end;
end;
end.

LEBIH LENGKAP TONTON VIDIO NYA :

SHORT CODE Membuat Kakulator Menggunakan Delphi7 LENGKAP DENGAN VIDIO





unit Kakulator_v;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, sSkinManager;

type
  TKakulator = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Edit1: TEdit;
    Memo1: TMemo;
    Timer1: TTimer;
    Label5: TLabel;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    Button9: TButton;
    Button10: TButton;
    Button11: TButton;
    Button12: TButton;
    Button13: TButton;
    Button14: TButton;
    Button15: TButton;
    Button16: TButton;
    Button17: TButton;
    Button18: TButton;
    Button19: TButton;
    Button20: TButton;
    Button21: TButton;
    Button22: TButton;
    Button23: TButton;
    Button24: TButton;
    Button25: TButton;
    Button26: TButton;
    Button27: TButton;
    Button28: TButton;
    Button29: TButton;
    Button30: TButton;
    Button31: TButton;
    Button32: TButton;
    Button33: TButton;
    sSkinManager1: TsSkinManager;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
    procedure Button7Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button9Click(Sender: TObject);
    procedure Button10Click(Sender: TObject);
    procedure Button11Click(Sender: TObject);
    procedure Button12Click(Sender: TObject);
    procedure Button16Click(Sender: TObject);
    procedure Button15Click(Sender: TObject);
    procedure Button14Click(Sender: TObject);
    procedure Button13Click(Sender: TObject);
    procedure Button17Click(Sender: TObject);
    procedure Button20Click(Sender: TObject);
    procedure Button19Click(Sender: TObject);
    procedure Button18Click(Sender: TObject);
    procedure Button24Click(Sender: TObject);
    procedure Button23Click(Sender: TObject);
    procedure Button22Click(Sender: TObject);
    procedure Button21Click(Sender: TObject);
    procedure Button28Click(Sender: TObject);
    procedure Button27Click(Sender: TObject);
    procedure Button26Click(Sender: TObject);
    procedure Button25Click(Sender: TObject);
    procedure Button32Click(Sender: TObject);
    procedure Button31Click(Sender: TObject);
    procedure Button30Click(Sender: TObject);
    procedure Button29Click(Sender: TObject);
    procedure Button33Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Kakulator: TKakulator;
  STR:string;
  BTN:integer;
  a,b,kode:integer;

implementation

uses Math;

{$R *.dfm}

procedure TKakulator.Button1Click(Sender: TObject);
begin
STR:=Edit1.Text;
Edit1.Text:='';
Label4.Caption:=' + ';
BTN:=1;
end;

procedure TKakulator.Button2Click(Sender: TObject);
begin
STR:=Edit1.Text;
Edit1.Text:='';
Label4.Caption:=' - ';
BTN:=2;
end;

procedure TKakulator.Button3Click(Sender: TObject);
begin
STR:=Edit1.Text;
Edit1.Text:='';
Label4.Caption:=' * ';
BTN:=3;
end;

procedure TKakulator.Button4Click(Sender: TObject);
begin
STR:=Edit1.Text;
Edit1.Text:='';
Label4.Caption:=' / ';
BTN:=4;
end;

procedure TKakulator.Button8Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button8.Caption;
end;

procedure TKakulator.Button7Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button7.Caption;
end;

procedure TKakulator.Button6Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button6.Caption;
end;

procedure TKakulator.Button5Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button5.Caption;
end;

procedure TKakulator.Button9Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button9.Caption;
end;

procedure TKakulator.Button10Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button10.Caption;
end;

procedure TKakulator.Button11Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button11.Caption;
end;

procedure TKakulator.Button12Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button12.Caption;
end;

procedure TKakulator.Button16Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button16.Caption;
end;

procedure TKakulator.Button15Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button15.Caption;
end;

procedure TKakulator.Button14Click(Sender: TObject);
begin
Edit1.Text:=Edit1.Text+Button14.Caption;
end;

procedure TKakulator.Button13Click(Sender: TObject);
begin
if BTN=1 then
Memo1.Text :=FloatToStr(StrToFloat(str)+StrToFloat(Edit1.Text))
  else
if BTN=2 then
Memo1.Text :=FloatToStr(StrToFloat(str)-StrToFloat(Edit1.Text))
  else
  if BTN=3 then
Memo1.Text :=FloatToStr(StrToFloat(str)*StrToFloat(Edit1.Text))
  else
if BTN=4 then
Memo1.Text :=FloatToStr(StrToFloat(str)/StrToFloat(Edit1.Text));
  Label4.Caption:='Sama Dengan :';
end;

procedure TKakulator.Button17Click(Sender: TObject);
Var a,b:Extended;
begin
  Memo1.Clear;
  a:=StrToFloat(Edit1.Text);
  b:=StrToFloat(Edit1.Text);
  a:=Power(a,b);
  Memo1.Lines.Add('Nilai Pangkat X Adalah :'+FloatToStr(a));
end;

procedure TKakulator.Button20Click(Sender: TObject);
Var
c:real;
begin
c:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai COS dari' + FloatToStr(c)+'Adallah = '+FloatToStr(COS(c)));
Label4.Caption:='Nilai Cos';

end;

procedure TKakulator.Button19Click(Sender: TObject);
Var
b:real;
begin
b:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai SQRT-nya Adallah: '+FloatToStr(SQRT(b)));
Label4.Caption:='Nilai SQRT';
end;

procedure TKakulator.Button18Click(Sender: TObject);
Var
b:real;
begin
b:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai SQR-nya Adallah = '+FloatToStr(SQR(b)));
Label3.Caption:='Nilai SQR';
end;

procedure TKakulator.Button24Click(Sender: TObject);
Var
d:real;
begin
d:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai Sin Dari '+FloatToStr(d)+'Adalah = '+FloatToStr(Sin(d)));
Label4.Caption:='Nilai SIN';
end;

procedure TKakulator.Button23Click(Sender: TObject);
Var
C:real;
begin
C:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai TAN Dari '+FloatToStr(c)+'Adalah = '+FloatToStr(Tan(c)));
Label4.Caption:='Nilai TAN';
end;

procedure TKakulator.Button22Click(Sender: TObject);
Var
b:real;
begin
b:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai ARCCOS Dari '+FloatToStr(b)+'Adalah = '+FloatToStr(Arccos(b)));
Label4.Caption:='ARC COS';
end;

procedure TKakulator.Button21Click(Sender: TObject);
Var
c:real;
begin
c:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai ARCSIN Dari '+FloatToStr(C)+'Adalah = '+FloatToStr(ARCSIN(C)));
Label4.Caption:='ARCSIN';
end;

procedure TKakulator.Button28Click(Sender: TObject);
Var
e:real;
begin
e:=StrToFloat(Edit1.Text);
Memo1.Lines.Add('Nilai ARCTAN Dari '+FloatToStr(e)+'Adalah = '+FloatToStr(ARCTAN(e)));
Label4.Caption:='ARCTAN';
end;

procedure TKakulator.Button27Click(Sender: TObject);
Var Cycle,hasil:extended;
begin
 Cycle:=StrToFloat(Edit1.Text);
 hasil:=CycleToRad(Cycle);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(Cycle)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Cycle To Red';
end;

procedure TKakulator.Button26Click(Sender: TObject);
Var Derajat,hasil:extended;
begin
 Derajat:=StrToFloat(Edit1.Text);
 hasil:=DegToRad(Derajat);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(Derajat)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Deg To Radian';
end;

procedure TKakulator.Button25Click(Sender: TObject);
Var Gradien,hasil:extended;
begin
 Gradien:=StrToFloat(Edit1.Text);
 hasil:=GradToRad(Gradien);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(Gradien)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Grad To Red';
end;

procedure TKakulator.Button32Click(Sender: TObject);
Var Radian,hasil:extended;
begin
 Radian:=StrToFloat(Edit1.Text);
 hasil:=RadToDeg(Radian);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(Radian)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Rad To Deg';
end;

procedure TKakulator.Button31Click(Sender: TObject);
Var radian,hasil:extended;
begin
 radian:=StrToFloat(Edit1.Text);
 hasil:=RadToGrad(radian);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(radian)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Rad To Grad';
end;

procedure TKakulator.Button30Click(Sender: TObject);
Var radian,hasil:extended;
begin
 radian:=StrToFloat(Edit1.Text);
 hasil:=RadToCycle(radian);
 Memo1.Lines.Add('Nilai Konversi dari'+FloatToStr(radian)+'Adalah ='
 +FloatToStr(hasil));
 Label4.Caption:='Rad To Cycle';
end;

procedure TKakulator.Button29Click(Sender: TObject);
begin
Edit1.Text:='';
Memo1.Clear;
Label4.Caption:='';
ShowMessage('Data Sudah  Kosong');
end;

procedure TKakulator.Button33Click(Sender: TObject);
begin
Application.Terminate;
end;

procedure TKakulator.Timer1Timer(Sender: TObject);
begin
Label2.Caption:=FormatDateTime('"Sekarang Tanggal :"dd/mm/yyyy',now)+
FormatDateTime('"Pukul :"hh:nn:ss',now);
Label2.Refresh;
//animasi kedip
Label5.Left:=Label5.Left -1000;
if Label5.Left <-110 then
Label5.Left:=1030;
end;

end.

VIDIO:

Sort Codeing Cara Membuat StopWatch Dengan Delphi7

unit Unit7_Pratikum5_Stop_Watch_Almizan;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls;

type
  TForm_Stop_Watch_Almizan = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Timer1: TTimer;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    procedure FormShow(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form_Stop_Watch_Almizan: TForm_Stop_Watch_Almizan;
  Awal,akhir:TTime;

implementation

uses Unit1_Praktikum1_Almizan, Perpustakaan_Almizan,
  Tugas_Pratikum_Almizan;

{$R *.dfm}

procedure TForm_Stop_Watch_Almizan.BitBtn1Click(Sender: TObject);
begin
if BitBtn1.Caption= 'start' then
begin
awal:=Time;
Edit1.Text:=TimeToStr(Time);
BitBtn1.Caption:='stop';
end
else if BitBtn1.Caption='stop' then
BitBtn1.Caption:='selesai'
else
close;
Form2.Show;
end;

procedure TForm_Stop_Watch_Almizan.Timer1Timer(Sender: TObject);
Var
SLama :string;
Lama  :Double;
begin
   if BitBtn1.Caption='stop' then
   begin
   akhir:=Time;
   Edit2.Text:=TimeToStr(akhir);
   Lama:=(akhir-Awal)*1000;
   str(lama:12:2,Slama);
   Edit3.Text:=SLama;
   end;
end;

procedure TForm_Stop_Watch_Almizan.FormCreate(Sender: TObject);
begin
Timer1.Interval:=1000;
BitBtn1.Caption:='start';
BitBtn2.Caption:='reset';
end;

procedure TForm_Stop_Watch_Almizan.BitBtn2Click(Sender: TObject);
begin
FormCreate(sender);
FormShow(Sender);
end;

procedure TForm_Stop_Watch_Almizan.FormShow(Sender: TObject);
begin
Edit1.Text:='00:00:00';
Edit2.Text:='00:00:00';
Edit3.Text:='00:00';
end;
end.

vidio:

Selasa, 29 Januari 2019

coding Membuat From Login Database Mysql Delphi7





unit Login;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, ZConnection, DB, ZAbstractRODataset,
  ZAbstractDataset, ZDataset, sSkinManager;

type
  TLogin_DataBase = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    BitBtn1: TBitBtn;
    ZQuery1: TZQuery;
    ZConnection1: TZConnection;
    sSkinManager1: TsSkinManager;
    procedure BitBtn1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Login_DataBase: TLogin_DataBase;

implementation

uses menu;

{$R *.dfm}

procedure TLogin_DataBase.BitBtn1Click(Sender: TObject);
begin
//Login
with ZQuery1 do
begin
SQL.Clear;
SQL.Add('select * from login where username='+QuotedStr(Edit1.Text));
Open;
End;

//jika tidak ditemukan maka muncul pesan dibawah ini

if ZQuery1.RecordCount=0 then
Application.MessageBox('Maaf User name yang kalian masukan itu salah pintar!!!','informasi',MB_OK or MB_ICONINFORMATION)
else
begin
if ZQuery1.FieldByName('password').AsString <> Edit2.Text then
Application.MessageBox('silakan cek password anda dengan benar bodoh!!!','error',MB_OK or MB_ICONERROR)else
begin
Hide;
welcome.Show;
MessageDlg('anda berhasil login',mtInformation,[mbOK],0);
end;
end;
end;





procedure TLogin_DataBase.Button2Click(Sender: TObject);
var Tanya:Integer;
begin

//Keluar dari aplikasih
Tanya:=Application.MessageBox('apah anda yakin ingin keluar','confirmation',MB_YESNO + MB_ICONQUESTION);
if Tanya = 6 then
Application.Terminate;
end;


Vidio :

Jumat, 25 Januari 2019

coding Aplikasih login tanpa data base delphi7 lengkap dengan vidio

unit lOGIN;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, sSkinManager;

type
  TlOGIN_tANPADATABASE = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    sSkinManager1: TsSkinManager;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  lOGIN_tANPADATABASE: TlOGIN_tANPADATABASE;

implementation

uses Math, lOGINTANPADATABASE;

{$R *.dfm}

procedure TlOGIN_tANPADATABASE.BitBtn1Click(Sender: TObject);
begin
If (Edit1.Text='admin') and (Edit2.Text='kamuganteng') then
begin
lOGIN_tANPADATABASE.Visible:=False;
Welcome.Visible:=True;

MessageDlg('anda berhasil login',mtInformation,[mbOK],0);

end;
end;

procedure TlOGIN_tANPADATABASE.BitBtn2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
end;

end.

vidio aplikasi Login Tanpa database Delphi7:

CARA MEMBUAT ANIMASI LODING DENGAN DELPHI7 LENGKAP DENGAN VIDIO

 CODING ANIMASI LODING , LEBIH LENGKAP SILAKAN NONTON VIDIO DIBAWA !!!
salam sarjana stimik





unit animasi;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, acPNG, ExtCtrls, StdCtrls, XPMan, ComCtrls, sSkinManager;

type
  TAnimasi_Loding = class(TForm)
    Timer1: TTimer;
    ProgressBar1: TProgressBar;
    XPManifest1: TXPManifest;
    Label1: TLabel;
    Label2: TLabel;
    Image1: TImage;
    sSkinManager1: TsSkinManager;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Animasi_Loding: TAnimasi_Loding;

implementation

uses welcome;

{$R *.dfm}

procedure TAnimasi_Loding.Timer1Timer(Sender: TObject);
begin
Timer1.Interval:=100;
ProgressBar1.Position:=ProgressBar1.Position+1;
if ProgressBar1.Position = 100 then
begin
ProgressBar1.Position:=0;
Timer1.Enabled:=False;
Animasi_Loding.Hide;
Form_welcome.Show;
end;
end;

end.




VIDIO TUTORIAL MEMBUAT APLIKASI ANIMASI LODING DENGAN DELPHI7 LENGKAP:

Kamis, 24 Januari 2019

Coding Aplikasih Vidio Menggunakan Delphi7 Lengkap Dengan Vidio

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, OleCtrls, WMPLib_TLB;

type
  TVidio = class(TForm)
    WindowsMediaPlayer1: TWindowsMediaPlayer;
    BitBtn1: TBitBtn;
    OpenDialog1: TOpenDialog;
    procedure BitBtn1Click(Sender: TObject);
    procedure Fromclose(Sender: TObject; var action : TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Vidio: TVidio;

implementation

uses StrUtils;

{$R *.dfm}

procedure TVidio.BitBtn1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin                                                 
WindowsMediaPlayer1.URL:=OpenDialog1.FileName;
Vidio.Caption:=LeftStr(ExtractFileName(OpenDialog1.FileName),
length(ExtractFileName(OpenDialog1.FileName))-length(ExtractFileName(OpenDialog1.FileName)))+'media pelayer';
end;
OpenDialog1.FileName:='';
end;

procedure TVidio.Fromclose(Sender: TObject; var action : TCloseAction);
begin
WindowsMediaPlayer1.close;
end;

end.


lebih lengkap nya nonton dengan vidio

koding pemutar musik delphi7 Lengkap Dengan Vdieo