- Home >
- Contoh Aplikasi Menentukan Nilai dengan Visual Basic 6.0
Posted by : Unknown
Selasa, 20 Agustus 2013
salam belajar ya,,,,,,, di bawah ini adalah,,, tampilan dari form aplikasi mencari nilai,,, sederhana dengan menggunakan Visual basic 6,,, kalau memang masi ada yg kurang teman2 bisa kembangkan lebih dalam ya,,,,, Salam belajar,,,,,
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub
Private Sub btn_hitung_Click()
Dim na As Single, nh As String
Select Case na
Case Option1.Value: na = (0.4 * Val(txt_nmid)) + (0.6 * Val(txt_nf))
Case Option2.Value: na = ((0.2 * Val(txt_nt)) + (0.4 * Val(txt_nmid)) + (0.4 * Val(txt_nf)))
Case Option3.Value: na = (Val(txt_nt) + Val(txt_nmid) + Val(txt_nf)) / 3
End Select
Select Case na
Case 80 To 100: nh = "A"
Case 60 To 79: nh = "B"
Case 40 To 59: nh = "C"
Case 30 To 39: nh = "D"
Case Else: nh = "E"
End Select
txt_na.Text = na
txt_nh.Text = nh
Private Sub btn_selesai_Click()
End
End Sub
Private Sub btn_ulang_Click()
txt_nim.Text = ""
txt_jrusan.Text = ""
txt_na.Text = ""
txt_nf.Text = ""
txt_nh.Text = ""
txt_nma.Text = ""
txt_nmid.Text = ""
txt_nt.Text = ""
End Sub
Private Sub Form_Load()
txt_nim.Text = ""
txt_jrusan.Text = ""
txt_na.Text = ""
txt_nf.Text = ""
txt_nh.Text = ""
txt_nma.Text = ""
txt_nmid.Text = ""
txt_nt.Text = ""
End Sub
Private Sub txt_nim_LostFocus()
Dim jrs As String
If Mid(Trim(txt_nim), 3, 1) = "1" Then
jrs = "Sistem Informasi"
ElseIf Mid(Trim(txt_nim), 3, 1) = "2" Then
jrs = "Teknik Informatika"
Else
jrs = "Manajemen Informatika"
End If
txt_jrusan.Text = jrs
End Sub