Public Class Form1
Private Sub
Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Label2.Click
End Sub
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Label2.Text = TextBox1.Text
End Sub
Private Sub
RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
RadioButton1.CheckedChanged
Label2.ForeColor = Color.Red
End Sub
Private Sub
RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
RadioButton2.CheckedChanged
Label2.ForeColor = Color.Blue
End Sub
Private Sub
RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
RadioButton3.CheckedChanged
Label2.ForeColor = Color.Green
End Sub
Private Sub
RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
RadioButton4.CheckedChanged
Label2.ForeColor = Color.Yellow
End Sub
Private Sub
RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
RadioButton5.CheckedChanged
Label2.ForeColor = Color.Violet
End Sub
Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
End Sub
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
MsgBox(" selamat datang "
& TextBox1.Text)
End Sub
Private Sub
CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
If CheckBox1.Checked Then
Label2.Font = New Font(Label2.Font, Label2.Font.Style Or FontStyle.Bold)
Else
Label2.Font = New Font(Label2.Font, Label2.Font.Style And Not FontStyle.Bold)
End If
End Sub
Private Sub
CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
CheckBox2.CheckedChanged
If CheckBox2.Checked Then
Label2.Font = New Font(Label2.Font, Label2.Font.Style Or FontStyle.Italic)
Else
Label2.Font = New Font(Label2.Font, Label2.Font.Style And Not FontStyle.Italic)
End If
End Sub
Private Sub
CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
CheckBox3.CheckedChanged
If CheckBox3.Checked Then
Label2.Font = New Font(Label2.Font, Label2.Font.Style Or FontStyle.Underline)
Else
Label2.Font = New Font(Label2.Font, Label2.Font.Style And Not FontStyle.Underline)
End If
End Sub
Private Sub
CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
CheckBox4.CheckedChanged
If CheckBox4.Checked Then
Label2.Font = New Font(Label2.Font, Label2.Font.Style Or FontStyle.Strikeout)
Else
Label2.Font = New Font(Label2.Font, Label2.Font.Style And Not FontStyle.Strikeout)
End If
End Sub
End Class
Belum ada tanggapan untuk "Menampilkan Warna & Font Style"
Post a Comment