Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. click event

click event

Scheduled Pinned Locked Moved Visual Basic
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iramg
    wrote on last edited by
    #1

    Suppose i have two buttons btn1 and btn2 and i have created a click event function of btn1. now if i want to call btn1 click event function when user click btn2 please tell me soon

    S D G 3 Replies Last reply
    0
    • I iramg

      Suppose i have two buttons btn1 and btn2 and i have created a click event function of btn1. now if i want to call btn1 click event function when user click btn2 please tell me soon

      S Offline
      S Offline
      Stephen McGuire
      wrote on last edited by
      #2

      btn1.PerformClick Steve

      1 Reply Last reply
      0
      • I iramg

        Suppose i have two buttons btn1 and btn2 and i have created a click event function of btn1. now if i want to call btn1 click event function when user click btn2 please tell me soon

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Another method is to have the same event handler handle the Click event of both buttons. Look at the end of the event handler declaration for one of the buttons Click events and you'll find a Handles clause:

        Private Sub Button1\_Click(_blah, blah_) Handles Button1.Click
        

        You can have a single handler handle the Click events of more than one button by doing this:

        Private Sub MyClickHandler(_blah, blah_) **Handles Button1.Click, Button2.Click**
        

        Dave Kreskowiak Microsoft MVP - Visual Basic

        1 Reply Last reply
        0
        • I iramg

          Suppose i have two buttons btn1 and btn2 and i have created a click event function of btn1. now if i want to call btn1 click event function when user click btn2 please tell me soon

          G Offline
          G Offline
          Guerven
          wrote on last edited by
          #4

          Button1_Click(nothing,nothing)

          U Xux

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups