Button Long Click
-
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
I don't know of any API for it but shouldn't be too hard to code this by checking the mouse coordinates on the tick of a timer that can be started on
MouseDown
and stopped onMouseUp
andMouseLeave
Dave
If this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
I don't know of any API for it but shouldn't be too hard to code this by checking the mouse coordinates on the tick of a timer that can be started on
MouseDown
and stopped onMouseUp
andMouseLeave
Dave
If this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Thanks dave. But i'm sure there is a more simple solutions for this
-
Thanks dave. But i'm sure there is a more simple solutions for this
-
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
In WPF, there is the RepeatButton. In Windows Forms, you can make a custom RepeatButton.
-
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
Also, I should mention that you can place a WPF control in a Windows Form application, but you then require .Net 3.0 or greater on the computer the application gets deployed to (normally, you'd only require .Net 2.0 or greater for Windows Form applications).
-
Also, I should mention that you can place a WPF control in a Windows Form application, but you then require .Net 3.0 or greater on the computer the application gets deployed to (normally, you'd only require .Net 2.0 or greater for Windows Form applications).
It's not worth the complexity of adding the WPF control to a winforms app. It's much simpler just to create the custom button object.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
I have to agree with Davey...the simple solution is to use the MouseDown. Start a Timer on MouseDown and every tic of the timer, scroll down one. On MouseUp, stop the Timer. That's really a pretty simple solution.
-
Thanks dave. But i'm sure there is a more simple solutions for this
Apparently you're not
Everything makes sense in someone's mind
-
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
Here's a (VB .NET) AutoRepeat Button[^]. /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Hi People. I wonder if any of you have used a API that can detect if a button is still being clicked. Meaning, my button scrolls a ListView but i must click again and again to scroll down one Item after each other, i wonder how i can make it like the regular scrollbar that you can keep the click and it will scroll. Please advice. Thanks.
Thanks guys, Issue Solved