Membuat Format Paragraf (Font Style, Font Size , dan Efek Text)

Buatlah Form seperti ini :


Dimana Label "Checkbox dan Radio Button" digunakan untuk sample penggunaan setiap salah satu radio dan checkbox yang telah diisikan coding program untuk penggunaan style paragraf. 



Public Class Form1

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Strikeout)
    End Sub

    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Underline)
    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Regular)
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Italic)
    End Sub

    Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Bold)
    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        Label1.Font = New Font("Arial", Label1.Font.Size, _
        Label1.Font.Style Xor FontStyle.Bold Xor FontStyle.Italic)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        End
    End Sub

    Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged
        Label1.Font = New Font("Arial", 10)
    End Sub

    Private Sub RadioButton7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton7.CheckedChanged
        Label1.Font = New Font("Arial", 30)
    End Sub

    Private Sub GroupBox3_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox3.Enter
        Label1.Font = New Font("Arial", 50)
    End Sub
End Class

Silahkan dicoba, untuk setiap penggunaan coding.

Postingan terkait:

Belum ada tanggapan untuk "Membuat Format Paragraf (Font Style, Font Size , dan Efek Text)"

Post a Comment