Rabu, 04 April 2012

LA Visual Basic I


Private Sub Command1_Click()
ket.Caption = npmtext.Text + " " + namatext.Text + " " + kelastext.Text
MsgBox "Nama Anda " & namatext.Text & " NPM Anda " & npmtext.Text & " Kelas Anda " & kelastext.Text, vbInformation, "Perhatian"
End Sub

Private Sub Command2_Click()
npmtext.Text = Clear
namatext.Text = Clear
kelastext.Text = Clear
ket.Caption = Clear
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Command4_Click()
If npmtext.FontBold = False Then
npmtext.FontBold = True
kelastext.FontBold = True
namatext.FontBold = True
ket.FontBold = True
Else
npmtext.FontBold = False
kelastext.FontBold = False
namatext.FontBold = False
ket.FontBold = False
End If
End Sub

Private Sub Command5_Click()
If npmtext.FontItalic = False Then
npmtext.FontItalic = True
kelastext.FontItalic = True
namatext.FontItalic = True
ket.FontItalic = True
Else
npmtext.FontItalic = False
kelastext.FontItalic = False
namatext.FontItalic = False
ket.FontItalic = False
End If
End Sub

Private Sub Command6_Click()
If npmtext.FontUnderline = False Then
npmtext.FontUnderline = True
kelastext.FontUnderline = True
namatext.FontUnderline = True
ket.FontUnderline = True
Else
npmtext.FontUnderline = False
kelastext.FontUnderline = False
namatext.FontUnderline = False
ket.FontUnderline = False
End If
End Sub

Private Sub Command7_Click()
If npmtext.ForeColor = vbBlack Then
npmtext.ForeColor = vbRed
kelastext.ForeColor = vbRed
namatext.ForeColor = vbRed
ket.ForeColor = vbRed
Else
npmtext.ForeColor = vbBlack
kelastext.ForeColor = vbBlack
namatext.ForeColor = vbBlack
ket.ForeColor = vbBlack
End If
End Sub

Private Sub Command8_Click()
If npmtext.ForeColor = vbBlack Then
npmtext.ForeColor = vbBlue
kelastext.ForeColor = vbBlue
namatext.ForeColor = vbBlue
ket.ForeColor = vbBlue
Else
npmtext.ForeColor = vbBlack
kelastext.ForeColor = vbBlack
namatext.ForeColor = vbBlack
ket.ForeColor = vbBlack
End If
End Sub


0 komentar:

Posting Komentar

 
;