Events Multi

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How can I now witch events happend in the code

.....
Private Sub btnToetsenbord1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles
btnToetsenbord1.Click,btnToetsenbord2.Click,btnToetsenbord3.Click
.......
 
JoskeXP,

More possibilites roughly typed here one.

\\\\
Select Case directcast(sender, button).name
case "btnToetsenbord1"
......
case .............
.......
end select
///

It is in my opinion not needed to tell that you are from Belgium. In my
opinion is for those who (really) know what Belgium is your name enough.

:-)

I hope this helps,

Cor
 
Cor,

Cor Ligthert said:
More possibilites roughly typed here one.

\\\\
Select Case directcast(sender, button).name
case "btnToetsenbord1"
......
case .............
.......
end select
///

.... I prefer:

\\\
Dim SourceControl As Button = DirectCast(sender, Button)
Select Case True
Case SourceControl Is Me.Button1
...
Case SourceControl Is Me.Button2
...
...
End Select
///
 
Herfried,
\\\
Dim SourceControl As Button = DirectCast(sender, Button)
Select Case True
Case SourceControl Is Me.Button1
...
Case SourceControl Is Me.Button2
...
...
End Select
///

Better, however probably one I don't remember me so easy as the other one,
however I will try

:-)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top