Private Sub DoCalculation()
' Clear the calculator
Me.UltraCalculator1.Clear()
' Push each button individually.
' The string passed in is the KEY of the button, not it's text.
Me.UltraCalculator1.PushButton("2")
Me.UltraCalculator1.PushButton("+")
Me.UltraCalculator1.PushButton("3")
Me.UltraCalculator1.PushButton("=")
' Result = 5
' Store displayed value in memory.
Me.UltraCalculator1.MemoryStore()
' Memory Value is now 5
' Clear the calculator
Me.UltraCalculator1.Clear()
' Parse string calculation
Me.UltraCalculator1.ParseString("6+10=")
' Result = 16
' Add displayed value to current memory value.
Me.UltraCalculator1.MemoryAdd()
' Memory Value is now 21
Me.UltraCalculator1.Clear()
Me.UltraCalculator1.MemoryRecall()
' Current value is now 21
Me.UltraCalculator1.BackSpace()
' Current value is now 2
Me.UltraCalculator1.PushButton("+")
Me.UltraCalculator1.PushButton("3")
Me.UltraCalculator1.PushButton("=")
' Current value is now 5
' Clear the memory
Me.UltraCalculator1.MemoryClear()
End Sub