Welcome to my blog, hope you enjoy reading
RSS

home

Minggu, 07 April 2013

membuat tebal tulisan pada vb net

Langkah - langkah membuat tulisan tebal dan bercetak miring :

1. pertama buat project dahulu, dan desain aplikasi yang kita inginkan
2. selanjutnya klik 2x pada tombol Radiobutton1,maka akan muncul form dan input listing program seperti dibawah ini :

Public Class Form3

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Label2.ForeColor = Color.Blue
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        Label2.ForeColor = Color.Red
    End Sub

3. Lalu pada toolbox ChecBox1dan checbox2 klik 2x juga, ,maka akan muncul form dan input listing program seperti dibawah ini :

    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.ObjectByVal e As System.EventArgsHandles 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


4. Setelah itu pada  tombol button1 dan button2 input listing seperti dibawah ini:

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    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

 5. setelah seluruh listing program selesai d input maka jalan kan programnya.maka anda akan melihat hasilnya seperti apa..good luck guys :)  

HASIL








0 komentar:

Posting Komentar