Program menghitung luas dan keliling lingkaran dengan 6.0

vb

Tampilan program saat tombol OK diklik

Komponen Pembuatan Program
Komponen-komponen yang harus dibuat adalah :
• Label untuk indikator Text Sisi dari Jari-jari Lingkaran.
Properties :
Caption = Jari-Jari
Name = Label1
• Text Editor Untuk memasukan Nilai Jari-Jari Lingkaran.
Properties :
Text = kosong
Name = r
• Label untuk indikator Text Hasil Perhitungan Luas.
Properties :
Caption = Luas
Name = Label3
• Label untuk indikator Text Hasil Perhitingan Keliling.
Properties :
Caption = Keliling
Name = Label4
• Label untuk Menempatkan Hasil Perhitingan Luas.
Properties :
Caption = (Blank/Kosong)
Name = l
• Label untuk Menempatkan Hasil Perhitingan Keliling.
Properties :
Caption = (Blank/Kosong)
Name = k
• Button Untuk Memulai Perhitungan
Properties :
Caption = OK
Name = Button1
• Button Untuk menghapus
Propertise:
Caption= Hapus
Name=hapus
• Button Untuk Memulai Perhitungan
Properties :
Caption = Keluar
Name = keluar

Listing rogram
Private Sub hapus_Click()
r.Text = “”
l.Text = “”
k.Text = “”
End Sub

Private Sub keluar_Click()
Unload Me
End Sub

Private Sub ok_Click()
l.Text = 3.14 * Val(r.Text) * Val(r.Text)
k.Text = 2 * 3.14 * Val(r.Text)
End Sub

Tinggalkan komentar