This Visual Basic code defines a Form1 class with three event handler methods: Form1_Load initializes the form on load, ExitToolStripMenuItem_Click closes the form when an exit menu item is clicked, and Button1_Click sets the text of two labels to display an area and perimeter calculation when a button is clicked.
This Visual Basic code defines a Form1 class with three event handler methods: Form1_Load initializes the form on load, ExitToolStripMenuItem_Click closes the form when an exit menu item is clicked, and Button1_Click sets the text of two labels to display an area and perimeter calculation when a button is clicked.
This Visual Basic code defines a Form1 class with three event handler methods: Form1_Load initializes the form on load, ExitToolStripMenuItem_Click closes the form when an exit menu item is clicked, and Button1_Click sets the text of two labels to display an area and perimeter calculation when a button is clicked.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label2.Text = "Area = 15" Label3.Text = "Perimeter = 16" End Sub End Class