Does anyone know how to get rid of excess mouse clicks? I have a
button that does some code which takes some time to execute. As soon
as the user clicks the button, I disable the button in the button
handler and enable it again when I exit the handler. However, if the
user clicks a bunch of times, say 10, during the time it's disabled
and executing for the first time, it will start to process the second
mouse click the moment the button gets enabled again. So basically,
if the code takes 5 seconds to execute and the user clicks 10 times
during that 5 seconds, then there will be another 10 runnings of that
code (50 seconds more to process the duplicate clicks). I really only
wanted to have the user run it once, until it gets enabled again and
they can properly click on it again. My idea is to completely get rid
of any queued up mouse clicks when I exit the button handler code (but
I don't know how to do that).
Any ideas on how to prevent multiple excess mouse clicks (since
disabling the button didn't work)?
Thanks,
ImageAnalyst 2 5398
On Jul 16, 5:01 pm, ImageAnalyst <imageanal...@mailinator.comwrote:
Does anyone know how to get rid of excess mouse clicks? I have a
button that does some code which takes some time to execute. As soon
as the user clicks the button, I disable the button in the button
handler and enable it again when I exit the handler. However, if the
user clicks a bunch of times, say 10, during the time it's disabled
and executing for the first time, it will start to process the second
mouse click the moment the button gets enabled again. So basically,
if the code takes 5 seconds to execute and the user clicks 10 times
during that 5 seconds, then there will be another 10 runnings of that
code (50 seconds more to process the duplicate clicks). I really only
wanted to have the user run it once, until it gets enabled again and
they can properly click on it again. My idea is to completely get rid
of any queued up mouse clicks when I exit the button handler code (but
I don't know how to do that).
Any ideas on how to prevent multiple excess mouse clicks (since
disabling the button didn't work)?
Thanks,
ImageAnalyst
Try adding an Application.DoEvents() - the disabled button should eat
the clicks.
// CHRIS
On Jul 16, 5:06 pm, Chris Morse <win32...@gmail.comwrote:
On Jul 16, 5:01 pm, ImageAnalyst <imageanal...@mailinator.comwrote:
Does anyone know how to get rid of excess mouse clicks? I have a
button that does some code which takes some time to execute. As soon
as the user clicks the button, I disable the button in the button
handler and enable it again when I exit the handler. However, if the
user clicks a bunch of times, say 10, during the time it's disabled
and executing for the first time, it will start to process the second
mouse click the moment the button gets enabled again. So basically,
if the code takes 5 seconds to execute and the user clicks 10 times
during that 5 seconds, then there will be another 10 runnings of that
code (50 seconds more to process the duplicate clicks). I really only
wanted to have the user run it once, until it gets enabled again and
they can properly click on it again. My idea is to completely get rid
of any queued up mouse clicks when I exit the button handler code (but
I don't know how to do that).
Any ideas on how to prevent multiple excess mouse clicks (since
disabling the button didn't work)?
Thanks,
ImageAnalyst
Try adding an Application.DoEvents() - the disabled button should eat
the clicks.
// CHRIS- Hide quoted text -
- Show quoted text -
Thanks Chris. This should probably acomplish the desired effect.
I'll give it a try tomorrow.
Regards,
ImageAnalyst This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pedro Sebastiao |
last post by:
I need in urgence a program that simulates multiple mouse clicks in a
windows xp application.
I would appreciate if someone could send it to me.
pedro.sebastiao@iol.pt
|
by: Mike |
last post by:
Currently, when my application needs to write/read to a
database, there is a time lag. In that time lag, a user
can click the same button multiple times causing my app
problems. I want to turn...
|
by: Mike |
last post by:
Hi.
In my app I am have a button which, when clicked, spawns a worker process.
When the user clicks this button, I am setting its Enabled property to false
to disable the button and prevent the...
|
by: Brent |
last post by:
Hi
Is there a way to detect a mouse click anywhere on the screen (not just on
your form or a control on the form)?
Thanks
Brent
|
by: Per Larsson |
last post by:
Hi all!
I am working with a project and want to make a form that is semi
transparent, and transparent to mouse clicks.
(Se through and click through.) The form shall be visible but opaque
and the...
|
by: Nickneem |
last post by:
I' m trying to disable all right mouse clicks by using the
vbAccelerator Windows Hooks Library
The small (systray / console) app. must catch all (right) mouseclicks
before they are received by...
|
by: ludwig.frank |
last post by:
Hi,
I am attempting to detect mouse clicks from within curses, using
"select" on sys.stdin. It is working great within an xterm under X, but
not very well in a "real" linux console. When I click...
|
by: =?Utf-8?B?cHJvZ2dlcg==?= |
last post by:
I have a C# application that hosts an AxWebBrowser control which I automate
by sending mouse clicks and keyboard input. I have had various problems in
doing this due to a bug in the AxWebBrowser...
|
by: \(O\)enone |
last post by:
I've added a TabControl to my WinForms app, and added a couple of tabs to
the control.
The result is that the top strip of the TabControl contains the two tabs,
and then to the right of them is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |