Kamis, 18 Oktober 2012

Visual Basic 2


Form Data Nilai

A.    Coding Listing Program  

a.      Form 1 (Kelulusan)
Private Sub Command1_Click()
nilai = Val(Text1.Text)
If nilai >= 70 Then
Text2.Text = "Lulus"


Else
Text2.Text = "Tidak Lulus"
End If
End Sub 

Private Sub Command2_Click()
Form2.Show
End Sub

Private Sub Command3_Click()
MDIForm1.Show
End Sub
b.      Form 2 (Predikat)
Private Sub Command1_Click()
nilai1 = Val(Text1.Text)
nilai2 = Val(Text2.Text)
nilai3 = Val(Text3.Text)
nilai4 = Val(Text4.Text)
nilai5 = Val(Text5.Text)
nilai6 = Val(Text6.Text)
nilai7 = Val(Text7.Text)
nilai8 = Val(Text8.Text)
Text9.Text = (nilai1 + nilai2 + nilai3 + nilai4 + nilai5 + nilai6 + nilai7 + nilai8) / 8
IPK = Val(Text9.Text)
If IPK >= 3.51 Then
Text10.Text = "CumLaude"
ElseIf IPK < -3.5 Then
Text10.Text = "Sangat Memuaskan"
ElseIf IPK < -3# Then
Text10.Text = "Memuaskan"
ElseIf IPK < 2.5 Then
Text10.Text = "Tidak Memuaskan"
End If

End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
c.       Form 3 (Login)
Private Sub Command1_Click()
Username = Text1.Text
Password = Text2.Text

If Username = "poltek" And Password = "tedc" Then
MsgBox ("Login Succeed")
Else
MsgBox ("Login Failed")
End If
End Sub
d.      MDIForm 1 (Menu)
Private Sub mExit_Click()
End
End Sub

Private Sub mKelulusan_Click()
MDIForm1.Show
End Sub

Private Sub mLogin_Click()
Form3.Show
End Sub

Private Sub mPredikat_Click()
Form2.Show
End Sub

Sreenshot :


Tampilan awal menu coding 
Tampilan menu bar beserta isinya



 
 

 Tampilan form1

Tampilan form2



Tampilan form3 

Tidak ada komentar:

Posting Komentar