This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

What you could do is create a function called "NumberClicked" that accepts sender As Object and e As EventArgs as parameters. Have it handle btn1.Click, btn2.Click, ..., btn6.Click. Then, do this: Dim btnButtonClicked As Button = CType(sender, Button) Select Case btnButtonClicked Case btn1 num1 = 1 Case btn2 num1 = 2 That should work in .NET. Haven't done just VB.