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. C#
  4. Subsequent mouse clicks

Subsequent mouse clicks

Scheduled Pinned Locked Moved C#
questioncsharp
3 Posts 3 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.
  • P Offline
    P Offline
    pranu_13
    wrote on last edited by
    #1

    Hi all, I launch a windows application from another windows application in .net.It is launched as a process by clicking a button. When i click the button multiple times without gap atleast 2 times or more, i need to ignore the subsequent clicks till the application is loaded completely. How do i do this? Thanks.

    K T 2 Replies Last reply
    0
    • P pranu_13

      Hi all, I launch a windows application from another windows application in .net.It is launched as a process by clicking a button. When i click the button multiple times without gap atleast 2 times or more, i need to ignore the subsequent clicks till the application is loaded completely. How do i do this? Thanks.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      One way to do this is create a private variable. Set this with the first click and then re-set it later. The code would be something like this:

      private bool processing;

      //Now in your button click event
      if (!processing)
      {
      try
      {
      processing = true;
      //do your normal processing here...
      }
      finally
      {
      processing = false;
      }

      }

      Hope that helps. Ben

      1 Reply Last reply
      0
      • P pranu_13

        Hi all, I launch a windows application from another windows application in .net.It is launched as a process by clicking a button. When i click the button multiple times without gap atleast 2 times or more, i need to ignore the subsequent clicks till the application is loaded completely. How do i do this? Thanks.

        T Offline
        T Offline
        Tarakeshwar Reddy
        wrote on last edited by
        #3

        Why not disable the button till you want to accept subsequent clicks.

        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