Set His estate:
Object | Property | Nilai |
Form | Name | Form1 |
Caption | Program penghitung volume tabung | |
Label1 | Name | lbljari |
Caption | JARI-JARI LINGKARAN | |
Label2 | Name | lbltinggi |
Caption | TINGGI TABUNG | |
Label3 | Name | lblluas |
Caption | LUAS ALAS=phi*jari-jari*jari-jari | |
Label4 | Name | Lblvolume |
Caption | VOLUME=luas alas*tinggi | |
Label5 | Name | Lbljudul |
Caption | PRGRAM PENGHITUNG VOLUME TABUNG | |
Text1 | Name | Txtjari |
Text | Kosongkan/delete | |
Text2 | Name | Txttinggi |
Text | Kosongkan/delete | |
Text3 | Name | Txtuas |
Text | Kosongkan/delete | |
Text4 | Name | Txtvolume |
Text | Kosongkan/delete | |
Command1 | Name | cmdproses |
Caption | PROSES | |
Command2 | Name | cmdreset |
Caption | RESET | |
Command2 | Name | cmdkeluar |
Caption | KELUAR |
1. Variable and Constant Declaration, put on the General
Dim r As Double
Dim t As Double
Dim volume As Double
Dim area As Double
Const pi As Double = 3:14
2. Object Cmdkeluar, OnClick event
Private Sub cmdkeluar_Click ()
Unload Me
End Sub
3. Object Cmdproses, OnClick event
Private Sub cmdproses_Click ()
r = txtjari.Text
t = txttinggi.Text
area = pi * r * r
txtluas.Text = broad
volume = area * t
txtvolume.Text = volume
End Sub
4. Object Cmdreset, OnClick event
Private Sub cmdreset_Click ()
txtjari.Text = ""
txttinggi.Text = ""
txtluas.Text = ""
txtvolume.Text = ""
End Sub
5. Object txttinggi, Change event
Private Sub txttinggi_Change ()
If (txtjari.Text = "") And (txttinggi.Text = "") Then
cmdproses.Enabled = False
Else
cmdproses.Enabled = True
End If
End Sub
download volume volume of the tube
2 comments:
it's gret. i wanna try.
;) i like the comments
Post a Comment
thank you for visiting my blog and comment here. I hope the commentary contains a comment which intend to build and repair. criticism and suggestions I gladly accept.