Events Multi

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JoskeXP

    #1

    Events Multi

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

    .....
    Private Sub btnToetsenbord1 _Click(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles
    btnToetsenbord1 .Click,btnToets enbord2.Click,b tnToetsenbord3. Click
    .......
    --
    Thx

    JoskeXP(Belgium )

  • JoskeXP

    #2
    Re: Events Multi

    Hi,

    It works

    --
    Thx

    JoskeXP


    "Cor Ligthert [MVP]" wrote:
    [color=blue]
    > JoskeXP,
    >
    > More possibilites roughly typed here one.
    >
    > \\\\
    > Select Case directcast(send er, button).name
    > case "btnToetsenbord 1"
    > ......
    > 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
    >
    >
    >[/color]

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Events Multi

      Cor,

      "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> schrieb:[color=blue]
      > More possibilites roughly typed here one.
      >
      > \\\\
      > Select Case directcast(send er, button).name
      > case "btnToetsenbord 1"
      > ......
      > case .............
      > .......
      > end select
      > ///[/color]

      .... I prefer:

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

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: Events Multi

        Herfried,
        [color=blue]
        > \\\
        > Dim SourceControl As Button = DirectCast(send er, Button)
        > Select Case True
        > Case SourceControl Is Me.Button1
        > ...
        > Case SourceControl Is Me.Button2
        > ...
        > ...
        > End Select
        > ///[/color]

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

        :-)

        Cor


        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Events Multi

          JoskeXP,

          More possibilites roughly typed here one.

          \\\\
          Select Case directcast(send er, button).name
          case "btnToetsenbord 1"
          ......
          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


          Comment

          • JoskeXP

            #6
            Re: Events Multi

            Hi,

            It works

            --
            Thx

            JoskeXP


            "Cor Ligthert [MVP]" wrote:
            [color=blue]
            > JoskeXP,
            >
            > More possibilites roughly typed here one.
            >
            > \\\\
            > Select Case directcast(send er, button).name
            > case "btnToetsenbord 1"
            > ......
            > 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
            >
            >
            >[/color]

            Comment

            • Herfried K. Wagner [MVP]

              #7
              Re: Events Multi

              Cor,

              "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> schrieb:[color=blue]
              > More possibilites roughly typed here one.
              >
              > \\\\
              > Select Case directcast(send er, button).name
              > case "btnToetsenbord 1"
              > ......
              > case .............
              > .......
              > end select
              > ///[/color]

              .... I prefer:

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

              --
              M S Herfried K. Wagner
              M V P <URL:http://dotnet.mvps.org/>
              V B <URL:http://classicvb.org/petition/>

              Comment

              • Cor Ligthert [MVP]

                #8
                Re: Events Multi

                Herfried,
                [color=blue]
                > \\\
                > Dim SourceControl As Button = DirectCast(send er, Button)
                > Select Case True
                > Case SourceControl Is Me.Button1
                > ...
                > Case SourceControl Is Me.Button2
                > ...
                > ...
                > End Select
                > ///[/color]

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

                :-)

                Cor


                Comment

                Working...