Calculator

Write a program that simulates the Windows Calculator as closely as possible except for the menu commands.

You must use functions that are called by button Click methods where possible & appropriate. For example, you addition button could call this function

Private Function add(ByVal arg1 As Integer, ByVal arg2 As Integer) As Integer
   Return arg1 + arg2
End Function

You may use a few module-level variables. You must duplicate the look of the menu but you do not have to implement any of the menu commands. But, you must be sure that the whole application exits when the user clicks the x in the upper-right corner of the window.

You will be graded on the efficiency and efficacy of your code as well as how closely you duplicated the Windows calculator.

Preconditions:

  • None

Your program must follow standard Windows conventions as well as our school's Visual Basic Coding Standards. Name your project Calculator.

Staple your printout(s) in the following order:

  1. VB code
  2. The printscreen form image of your program.