tugas 3

KODE SOURCE TUGAS 1

RBI

RBIO

 

 

 

Private Sub oke_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub selesai_Click()

End

End Sub

 

 

Private Sub biru_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub merah_Click()

Label2.ForeColor = vbRed

End Sub

Private Sub hijau_Click()

Label2.ForeColor = vbGreen

End Sub

Private Sub kuning_Click()

Label2.ForeColor = vbYellow

End Sub

Private Sub bold_Click()

Label2.FontBold = Check1.Value

End Sub

 

Private Sub italic_Click()

Label2.FontItalic = Check2.Value

End Sub

Private Sub underline_Click()

Label2.FontUnderline = Check3.Value

End Sub

Private Sub strikeout_Click()

Label2.FontStrikethru = Check4.Value

End Sub

KODE SORCE TUGAS 2 PROGRAM PERHITUNGAN GAJI

ROBI -PTNGAN GAJI

GAJI ROBI OUT

 

 

Private Sub cmdexit_Click()

End

End Sub

 

Private Sub cmdproses_Click()

 

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 Sub

 

Private Sub cmdUlang_Click()

txt1 = “”

txt 2= “”

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) + Val(txt2) – Val(txt3)

txt5.Text = Val(txt4) * 0.1

txt6.Text = Val(txt4) – Val(txt5)

End If

End Sub

 

 

 

TUGAS 3 (PROGRAM FONT AND STYLE)

 

 

ROBI 1

ROBI 2

Private Sub optblue_click()

lblTeks.ForeColor = vbBlue

End Sub

Private Sub optRed_click()

lblTeks.ForeColor = vbRed

End Sub

Private Sub optGreen_click()

lblTeks.ForeColor = vbGreen

End Sub

Private Sub optyellow_click()

lblTeks.ForeColor = vbYellow

End Sub

Private Sub chkBold_click()

If ChkBold.Value = 1 Then

lblTeks.FontBold = True

Else

lblTeks.FontBold = False

End If

End Sub

Private Sub chkItalic_click()

If Chkitalic.Value = 1 Then

lblTeks.FontItalic = True

Else

lblTeks.FontItalic = False

End If

End Sub

Private Sub chkUnderline_click()

If ChkUnderline.Value = 1 Then

lblTeks.FontUnderline = True

Else

lblTeks.FontUnderline = False

End If

End Sub

Private Sub chkStrikethru_click()

If chkStrikethru.Value = 1 Then

lblTeks.FontStrikethru = True

Else

lblTeks.FontStrikethru = False

End If

End Sub

 

 

Private Sub cmdExit_click()

End

End Sub

 

Iklan

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 )

Foto Google+

You are commenting using your Google+ 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 )

Connecting to %s