|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to make a mouseup event called only once during a double click event?how to make a mouseup event called only once during a double click
event? here double click is made on a tree node in a tree control. I have the code inside mouseup event....in runtime the mouseup is called twice for the mouse double click over the selected tree node. I want mouseup event to be called onece Any ideas? TIA Satish
Show quote
Hide quote
"Techsatish" <techsat***@gmail.com> wrote in message I'm just a visitor around here, but you seem to be trying to fight a design news:1156524464.695149.41230@h48g2000cwc.googlegroups.com... > how to make a mouseup event called only once during a double click > event? > here double click is made on a tree node in a tree control. > > I have the code inside mouseup event....in runtime the mouseup is > called twice for the mouse double click over the selected tree node. > > I want mouseup event to be called onece > > Any ideas? > > TIA > Satish that's been in place for around two decades. Mouse Up fires every time you release the mouse button. I dropped a textbox on a form in VB6, added a few debug.prints and got the following output when I double-clicked.... (fwiw, the numbers are just the VB timer value at the time) 'Form1:Text1_MouseDown 37502.56 'Form1:Text1_MouseUp 37502.64 'Form1:Text1_Click 37502.64 'Form1:Text1_DblClick 37502.71 'Form1:Text1_MouseUp 37502.81 So, if you're processing in MouseUp, seems like setting a boolean variable called "ProcessMouseUp" or something similar = True in MouseDown and testing that variable in MouseUp would be easy enough. Once the code in MouseUp runs, reset that bool to False. Since MouseDown fires only once, the next time MouseUp fires, your test should determine whether or not to take action. -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. In Loving Memory - http://www.vbsight.com/Remembrance.htm Thanks Ken It works!
-Satish Ken Halter wrote: Show quoteHide quote > "Techsatish" <techsat***@gmail.com> wrote in message > news:1156524464.695149.41230@h48g2000cwc.googlegroups.com... > > how to make a mouseup event called only once during a double click > > event? > > here double click is made on a tree node in a tree control. > > > > I have the code inside mouseup event....in runtime the mouseup is > > called twice for the mouse double click over the selected tree node. > > > > I want mouseup event to be called onece > > > > Any ideas? > > > > TIA > > Satish > > I'm just a visitor around here, but you seem to be trying to fight a design > that's been in place for around two decades. Mouse Up fires every time you > release the mouse button. > > I dropped a textbox on a form in VB6, added a few debug.prints and got the > following output when I double-clicked.... (fwiw, the numbers are just the > VB timer value at the time) > > 'Form1:Text1_MouseDown 37502.56 > 'Form1:Text1_MouseUp 37502.64 > 'Form1:Text1_Click 37502.64 > 'Form1:Text1_DblClick 37502.71 > 'Form1:Text1_MouseUp 37502.81 > > So, if you're processing in MouseUp, seems like setting a boolean variable > called "ProcessMouseUp" or something similar = True in MouseDown and testing > that variable in MouseUp would be easy enough. Once the code in MouseUp > runs, reset that bool to False. Since MouseDown fires only once, the next > time MouseUp fires, your test should determine whether or not to take > action. > > -- > Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com > Please keep all discussions in the groups.. > In Loving Memory - http://www.vbsight.com/Remembrance.htm
Show quote
Hide quote
On 25 Aug 2006 09:47:44 -0700, "Techsatish" <techsat***@gmail.com> wrote: If you are using the VB2005 TreeView control, you should look at using the NodeMouseClick and/or the>how to make a mouseup event called only once during a double click >event? >here double click is made on a tree node in a tree control. > >I have the code inside mouseup event....in runtime the mouseup is >called twice for the mouse double click over the selected tree node. > >I want mouseup event to be called onece > >Any ideas? > >TIA >Satish NodeMouseDoubleClick events rather than the standard Mouse Events. Gene
Saving changes made in DataGridView
hex to unicode: problem Atomic Operation? how to force a 'SyncWithCurrencyManager' update One Last Class Question - Example that works DirectX rendered inside a control? Database Current namespace, stack and lineno How to make double click event to call and execute the mouseup event code I/O Access through window handle? |
|||||||||||||||||||||||