The document contains code for a form with buttons and menu items. When different buttons and menu items are clicked, text is displayed in a label to demonstrate properties of addition, including commutativity and associativity. The exit menu item closes the form when clicked.
The document contains code for a form with buttons and menu items. When different buttons and menu items are clicked, text is displayed in a label to demonstrate properties of addition, including commutativity and associativity. The exit menu item closes the form when clicked.
The document contains code for a form with buttons and menu items. When different buttons and menu items are clicked, text is displayed in a label to demonstrate properties of addition, including commutativity and associativity. The exit menu item closes the form when clicked.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click Label1.Text = "(a + b) + c = a + (b + c)" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = "a + b = b + a" End Sub Private Sub ProgramToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgramToolStripMenuItem.Click End Sub Private Sub CommutativeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommutativeToolStripMenuItem1.Click Label1.Text = "(a + b) + c = a + (b + c)" End Sub Private Sub AssociativeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AssociativeToolStripMenuItem.Click Label1.Text = "a + b = b + a" End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Close() End Sub End Class