5tugas vb

Private Sub Check1_Click()
If Check1.Value = 1 Then
Label1.FontBold = True
Else
Label1.FontBold = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Label1.FontItalic = True
Else
Label1.FontItalic = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Label1.FontUnderline = True
Else
Label1.FontUnderline = False
End If
End Sub

Private Sub Check4_Click()
If Check4.Value = 1 Then
Label1.fontstrikeout = True
Else
Label1.fontstrikeout = False

Private Sub Command1_Click()
End
End Sub

Private Sub Option1_Click()
Label1.ForeColor = vbRed
End Sub

Private Sub Option2_Click()
Label1.ForeColor = vbGreen
End Sub

Private Sub Option3_Click()
Label1.ForeColor = vbBlue
End Sub

Private Sub Option4_Click()
Label1.ForeColor = vbYellow
End Sub

Private Sub Check1_Click()
If Check1.Value = 1 Then
Label1.FontBold = True
Else
Label1.FontBold = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Label1.FontItalic = True
Else
Label1.FontItalic = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Label1.FontUnderline = True
Else
Label1.FontUnderline = False
End If
End Sub

Private Sub Check4_Click()
If Check4.Value = 1 Then
Label1.fontstrikeout = True
Else
Label1.fontstrikeout = False

Private Sub Command1_Click()
End
End Sub

Private Sub Option1_Click()
Label1.ForeColor = vbRed
End Sub

Private Sub Option2_Click()
Label1.ForeColor = vbGreen
End Sub

Private Sub Option3_Click()
Label1.ForeColor = vbBlue
End Sub

Private Sub Option4_Click()
Label1.ForeColor = vbYellow
End Sub

 

 

Private Sub Combo1_Click()

Dim nm, jur As String

Select Case Combo1.Text

Case “11100042″

nm = “Fitriana”

jur = “SISTEM INFORMASI”

Case “11200077″

nm = “Puspita Dewi”

jur = “MANAJEMEN INFORMATIKA”

Case “11300078″

nm = “Septiana”

jur = “TEHNIK INFORMATIKA”

Case “11100079″

nm = “Toto Iswanto”

jur = “SISTEM INFORMASI”

Case “11200081″

nm = “Suprapto”

jur = “MANAJEMEN INFORMATIKA”

Case “11300082″

nm = “Novi Susanti”

jur = “TEHNIK INFORMATIKA”

Case “11100084″

nm = “Sukmawati”

jur = “SISITEM INFORMASI”

Case “11200085″

nm = “Leni Apriani”

jur = “MANAJEMEN INFORMATIKA”

Case “11300086″

nm = “Nurmalitasari”

jur = “TEHNIK INFORMATIKA”

Case “11200087″

nm = “Heni Lestari”

jur = “MANAJEMEN INFORMATIKA”

End Select

Text1.Text = nm

Text2.Text = jur

Text3.SetFocus

End Sub


Private Sub cmdhitung_Click()
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdulang_Click()
Text1 = “”
Text2 = “”
Text3 = “”
Text1.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdproses_Click()
Dim a, b, c, d, e, f As Double
a = Val(txt1.Text)
b = Val(txt2.Text)
c = Val(txt3.Text)
d = Val(txt4.Text)
e = Val(txt5.Text)
f = Val(txt6.Text)
d = (a + b – c)
txt4.Text = d
e = (d * 0.1)
txt5.Text = e
f = (d – e)
txt6.Text = f
End Sub

Private Sub cmdulang_Click()
txt1.SetFocus
txt1 = “”
txt2 = “”
txt3 = “”
txt4 = “”
txt5 = “”
txt6 = “”
End Sub
Private Sub txt1_KeyPress(keyascii As Integer)
If keyascii = 13 Then
txt2.SetFocus
End If
End Sub

Private Sub txt2_KeyPress(keyascii As Integer)
If keyascii = 13 Then
txt3.SetFocus
End If
End Sub

Private Sub txt3_KeyPress(keyascii As Integer)
If keyascii = 13 Then
txt4.Text = Val(txt1.Text) + Val(txt2.Text) – Val(txt3.Text)
txt5.Text = Val(txt4.Text) * 0.1
txt6.Text = Val(txt4.Text) – Val(txt5.Text)
End If
End Sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s