Visual Basic 2010 Belajar Menggunakan Menu Strip - Part 2

//lh3.googleusercontent.com/-K5UKWzgJhmU/AAAAAAAAAAI/AAAAAAAACdI/CN3nwiBZsGE/s512-c/photo.jpg
November 18, 2016




Selamat siang kali ini kami akan share bagaimana menggunakan menu strip pada vb 2010. langsung aja saya beri kodingannya:




 Public Class Form1



    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 UnderlineToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UnderlineToolStripMenuItem.Click

        Label2.Font = New Font("Microsoft Sans Serif", Label2.Font.Size, Label2.Font.Style Xor FontStyle.Underline)

    End Sub



    Private Sub BoldToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BoldToolStripMenuItem.Click

        Label2.Font = New Font("Microsoft Sans Serif", Label2.Font.Size, Label2.Font.Style Xor FontStyle.Bold)



    End Sub

    Private Sub ItalicToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ItalicToolStripMenuItem.Click

        Label2.Font = New Font("Microsoft Sans Serif", Label2.Font.Size, Label2.Font.Style Xor FontStyle.Italic)

    End Sub



    Private Sub RedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RedToolStripMenuItem.Click

        Label2.ForeColor = Color.Red

    End Sub



    Private Sub YellowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YellowToolStripMenuItem.Click

        Label2.ForeColor = Color.Yellow

    End Sub



    Private Sub GreenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GreenToolStripMenuItem.Click

        Label2.ForeColor = Color.Green

    End Sub



    Private Sub BlueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BlueToolStripMenuItem.Click

        Label2.ForeColor = Color.Blue

    End Sub



    Private Sub BlackToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BlackToolStripMenuItem.Click

        Label2.ForeColor = Color.Black

    End Sub



    Private Sub DarkRedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DarkRedToolStripMenuItem.Click

        Label2.ForeColor = Color.DarkRed

    End Sub



    Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.Click



    End Sub



    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click

        End

    End Sub

End Class 


Related Post

SUBSCRIBE TO OUR NEWSLETTER

closed