This document contains code for a form with menu items and buttons that demonstrate properties of algebra when clicked. The AssociativeToolStripMenuItem and Button1 set the label text to demonstrate the associative property of addition. The CommutativeToolStripMenuItem and Button2 set the label text to demonstrate the commutative property of addition. The ExitToolStripMenuItem closes the form.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
53 views
Exercise 5
This document contains code for a form with menu items and buttons that demonstrate properties of algebra when clicked. The AssociativeToolStripMenuItem and Button1 set the label text to demonstrate the associative property of addition. The CommutativeToolStripMenuItem and Button2 set the label text to demonstrate the commutative property of addition. The ExitToolStripMenuItem closes the form.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Exercise 5
Public Class Form1
Private Sub AssociativeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AssociativeToolStripMenuItem.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) + c = a + (b + c)" End Sub Private Sub CommutativeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommutativeToolStripMenuItem.Click Label1.Text = "a + b = b + a" End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.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