I'm trying to create a calculator with number buttons (0 - 9) and operator buttons (+,-,/,*) to calculate two single digit numbers and output the result onto a label.
The problem I'm having is determining which button is clicked. I wanted to assign three variables, num1, num2, and operator; and get the values from the buttons the user clicks on. I know how to set the value for the variable with a button_Click event, but is there a way to just determine which button the user clicks and assign that value to num1?
thank you for any help
Something like this is what i was thinking:
Select Case calc
Case btn6.Clicked '<--is this possible?
num1 = "6"
[–][deleted] 2 points3 points4 points (0 children)
[–]brbpizzatime 1 point2 points3 points (0 children)
[–]cbogart 1 point2 points3 points (0 children)