Program 1. Merubah bentuk dan warna judul dengan *cheklist dan *option button di Visual Basic

tugasbaru1.1

tugasbaru1.2

Private Sub Chkbold_Click()

‘Membuat teks tebal’

If Chkbold.Value = 1 Then

Lblteks.FontBold = True

Else

Lblteks.FontBold = False

End If

End Sub

 

 

 

Private Sub Chkitalic_Click()

‘Membuat teks miring’

If Chkitalic.Value = 1 Then

Lblteks.FontItalic = True

Else

Lblteks.FontItalic = False

End If

End Sub

 

Private Sub Chkstrikeout_Click()

‘Membuat teks garis tengah’

If Chkstrikeout.Value = 1 Then

Lblteks.FontStrikethru = True

Else

Lblteks.FontStrikethru = False

End If

End Sub

 

Private Sub Chkunderline_Click()

‘Membuat teks bergaris bawah’

If Chkunderline.Value = 1 Then

Lblteks.FontUnderline = True

Else

Lblteks.FontUnderline = False

End If

End Sub

 

Private Sub Cmdexit_Click()

End

 

End Sub

 

Private Sub Optblue_Click()

‘Membuat teks berwarna biru’

Lblteks.ForeColor = vbBlue

 

End Sub

 

Private Sub Optgreen_Click()

‘Membuat teks berwarna hijau’

Lblteks.ForeColor = vbGreen

 

End Sub

 

Private Sub Optred_Click()

‘Membuat teks berwarna merah’

Lblteks.ForeColor = vbRed

 

End Sub

 

Private Sub Optyellow_Click()

‘Membuat teks berwarna kuning’

Lblteks.ForeColor = vbYellow

 

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s