Subsequent mouse clicks
-
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.
-
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.
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
-
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.
Why not disable the button till you want to accept subsequent clicks.