Skip to main content

Membuat Program Inputan Mahasiswa dengan Delphi

PROGRAM INPUT MAHASISWA DENGAN DELPHI

Buatlah tampilan seperti pada gambar di bawah ini
yang di butuh kan adalah : edit , label dan groupbox













Untuk Kode Button SUBMIT:
 var
a,b:integer;
c:string;
d:real;
procedure TForm1.Button1Click(Sender: TObject);
begin
label15.caption:=edit1.Text;
label16.caption:=edit2.text;
c:=copy(edit2.text,1,1);

if c='1' then label17.caption:='SI-SI'
else if c='2' then label17.caption:='SI-TK'
else if c='3' then label17.Caption:='D3-MI'
else label17.caption:='D3-SK';
c:=copy(edit2.text,3,1);
if c='4' then label18.caption:='Dari Awal'
else if c='7' then label18.caption:='Transfer Luar'
else if c='8' then label18.caption:='Aktif kembali'
else label18.caption:='Transfer dalam';
a:=strtoint(copy(edit2.Text,4,2));
if (a>0) and (a<78) then b:=a+2000 else b:=a+1900;
label19.caption:=inttostr(b);
label20.caption:=edit3.Text;
label21.caption:=edit4.text;
d:=(strtofloat(edit3.Text) + strtofloat(edit4.text))/2;
label23.caption:=floattostr(d);
if d<=45 then label22.caption:='E';
if d>45 then label22.caption:='D';
if d>59 then label22.caption:='C';
if d>64 then label22.caption:='B';
if d>74 then label22.caption:='A';
if (label22.caption='A') or (label22.caption='B') or (label22.caption='C') then
label24.caption:='LULUS'
else label24.caption:='TIDAK LULUS';
end;

Untuk Kode Button RESET:
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.clear;
edit2.clear;
edit3.clear;
edit4.clear;
label15.Caption:=' ';
label16.caption:=' ';
label17.caption:=' ';
label18.caption:=' ';
label19.caption:=' ';
label20.caption:=' ';
label21.caption:=' ';
label22.caption:=' ';
label23.caption:=' ';
label24.caption:=' ';
end;

Untuk Kode Button EXIT:
procedure TForm1.Button3Click(Sender: TObject);
begin
application.Terminate;
end;

Kalau sudah di save dan di run.
Contoh Hasilnya:

Comments

Popular posts from this blog

Melakukan Manipulasi Warna di Visual Foxpro

buat tampilan seperti ini: untuk menggunakan commandgroup lihat di form control lalu pilih commandgroup jika sudah lalu anda berikan count (jumlah command di commandgroup).caranya klik di commandgorup lihat di properties sebelah kanan lalu ganti buttoncount yang semula bernilai 2 menjadi yang anda inginkan.misalkan anda butuh 5 command button ganti angka 2 menjadi angka 5.untuk melakukan coding di commandgroup1 klik kanan pada commandgroup1 lalu pilih edit lalu klik2x pada setiap command,lalu isikan script berikut : command1 thisform.text1.BackColor=RGB(255,0,0) thisform.text1.Value="WARNA MERAH" command2 thisform.text1.BackColor=RGB(255,255,0) thisform.text1.Value="WARNA KUNING" command3 thisform.text1.BackColor=RGB(0,255,0) thisform.text1.Value="WARNA HIJAU" command4 thisform.text1.BackColor=RGB(0,128,255) thisform.text1.Value="WARNA BIRU" command5 thisform.text1.BackColor=RGB(255,128,0) thisform.text1.Val

Cara Membuat Program Input Data Mahasiswa dengan PHP

Kita akan menggunakan Form sebagai inputan dengan memberikan nilai untuk $_POST .Membuat program Input data mahasiswa dengan php: 1.Buat Form terlebih dahulu : <html> <head><title>PHP NIH YE</title> </head> <body> <table border=10 bordercolor=darkred bgcolor=lightgreen cellpadding=5 cellspacing=5><tr><td colspan=3> <center>SELAMAT DATANG<br> SILAHKAN ISI REGISTRASI TERDAHULU</center></td></tr> <form action="output.php" method="POST"> <tr> <td> Nama</td><td>:</td><td><input type=text name=nama size=20 maxlength=30> </tr></td> <tr><td> Npm</td><td>:</td><td><input type=text name=npm size=20 maxlength=8></tr></td> <tr><td> Kelas</td><td>:</td><td><input type=text name=kelas size=20 maxlength=3><br></tr>

Membuat Program Biodata di Visual FoxPro

Cara Membuat Program Biodata di Visual FoxPro Teman Teman sekalian kali ini kita akan mencoba membuat program biodata dengan Visual Voxpro . Pertama buatlah tampilan seperti dibawah ini: Yang dibutuhkan adalah label,textbox dan command button.. ini script dari program tersebut: script untuk Input : thisform.label6.Caption="NPM :"+thisform.text1.Value thisform.label7.Caption="NAMA :"+thisform.text2.Value thisform.label8.Caption="KELAS :"+thisform.text3.Value thisform.label9.Caption="ALAMAT :"+thisform.text4.Value thisform.label10.Caption="JURUSAN :"+thisform.text5.Value script untuk Reset: thisform.text1.Value="" thisform.text2.Value="" thisform.text3.Value="" thisform.text4.Value="" thisform.text5.Value="" thisform.label6.Caption="-" thisform.label7.Caption="-" thisform.label8.Caption="-" thisform.label9.Caption="-