tutorialswb

TutorialsWB hadir sebagai wadah bagi teman-teman yang ingin "Belajar PHP Dasar". Sehingga kami yakin bahwa TutorialsWB akan menjadi Pusat "Belajar Bahasa Pemrograman PHP" Disamping PHP website ini menyediakan berbagai tips dan trik Blogger. Kami menerima Pemasangan iklan banner atau artikel.

Hubungi Saya

Visual Basic 2010 Program Mengubah Warna Dan teks




Program Mengubah Warna Dan teks VB 2010

 Public Class form1
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Label1.ForeColor = Color.Red
    End Sub
    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        Label1.ForeColor = Color.Yellow
    End Sub
    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        Label1.ForeColor = Color.Green
    End Sub
    Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
        Label1.ForeColor = Color.Blue
    End Sub
    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked Then
            Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Bold)
        Else
            Label1.Font = New Font(Label1.Font, Label1.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 CheckBox1.Checked Then
            Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Italic)
        Else
            Label1.Font = New Font(Label1.Font, Label1.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 CheckBox1.Checked Then
            Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Underline)
        Else
            Label1.Font = New Font(Label1.Font, Label1.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 CheckBox1.Checked Then
            Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Strikeout)
        Else
            Label1.Font = New Font(Label1.Font, Label1.Font.Style And Not FontStyle.Strikeout)
        End If
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        Label1.Text = TextBox1.Text
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = TextBox1.Text
    End Sub
End Class



Baca Juga

closed