2 VB.NET On Click Button Show Message

To show message on screen on click button:

We require one button and a method Message.show


Code:

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        MessageBox.Show("This is My First VB Code")


    End Sub
End Class







Before Click Button:





After Click Button:





Previous
Next Post »