Pembahasan UTS

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim luas, luas1, luas2, luas3, luas4, hasil As Variant
Text3.Visible = False
Label4.Visible = False
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MsgBox("Anda Yakin Akan Keluar", vbYesNo, "Peringatan!!!") = vbNo Then
Cancel = True
End If
End Sub

Private Sub Option1_Click()
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG LUAS"

Else
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub

Private Sub Option2_Click()

If Option2.Value = True And Option5.Value = True Then
luas = luas2
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Text2.Visible = False
Label4.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG LUAS"

Else
If Option2.Value = True And Option6.Value = True Then
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Label4.Visible = False
Text2.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub

Private Sub Option3_Click()
If Option3.Value = True And Option5.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"

Else
If Option3.Value = True And Option6.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub

Private Sub Option4_Click()
If Option4.Value = True And Option5.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"

Else
If Option4.Value = True And Option6.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If

End Sub

Private Sub Option5_Click()
If Option5.Value = True Then
Label1.Caption = "HITUNG LUAS"
End If
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
End If
End Sub

Private Sub Option6_Click()
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End Sub

Private Sub command1_click()

If Option1.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2) * 0.5
Else
If Option1.Value = True And Option6.Value = True Then
hasil = Val(Text1) + Val(Text2) + Val(Text3)
Else
If Option2.Value = True And Option5.Value = True Then
hasil = ((Val(Text1)) ^ 2) * (22 / 7)
Else
If Option2.Value = True And Option6.Value = True Then
hasil = (22 / 7) * Val(Text1) * 2
Else
If Option3.Value = True And Option5.Value = True Then
hasil = Val(Text1) ^ 2
Else
If Option3.Value = True And Option6.Value = True Then
hasil = 4 * Val(Text1)
Else
If Option4.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2)
Else
If Option4.Value = True And Option6.Value = True Then
hasil = (Val(Text1) + Val(Text2)) * 2
End If
End If
End If
End If
End If
End If
End If
End If




MsgBox "hasil Perhitungan adalah : " & hasil
Text1.Text = Clear
Text2.Text = Clear
Text3.Text = Clear
Text1.SetFocus

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub





>>>script ini msh belum sempurna...
>>>bagi yg belum mengumpulkan UTS agar segera mengumpulkn UTS praktek (hitung luas)..
jika tdk maka nilai UTS anda = 0

Tidak ada komentar:

Easus Partition Manager:Software Partisi Hardisk Gratis

Drive C anda menipis? Salah setting partisi saat install windows? Ga perlu kuatir, dengan software partisi hardisk gratis ini semua bisa dia...