Hi I need some little help here. I'm trying to make a look-alike of win 10 calculator for my project but I can't understand the logic of the history (I don't know what it's called it just look like the history of what you do. The label that is just above the textbox and display all the calculation that you have made.)
What I have tried:
I'm using this code to display the performed calculation in that history (
again I don't know what to call it)
Private Sub operation_Click(sender As Object, e As EventArgs) Handles btnMultiply.Click, btnMinus.Click, btnDivide.Click, btnAdd.Click
Dim btnOperation As Guna.UI.WinForms.GunaButton = DirectCast(sender, Guna.UI.WinForms.GunaButton)
If input <> 0 Then
btnEquals.PerformClick()
expression = True
operation = btnOperation.Text
txtHistory.Text = input & "if" & operation
Else
operation = btnOperation.Text
input = Double.Parse(txtInput.Text)
expression = True
txtHistory.Text = input & "else" & operation
End If
End Sub
I'm passing my operation like add, multiply, divide,subtract to a single button.
the problem is I don't understand the logic how does the win 10 calculator display the previous calculations performed continuously?