winforms - Using mouse to increment and decrement value of the NumericUpDown control in VB.net -
i have numericupdown control in vb.net 2.0 project. when user clicks mouse inside control , drags left or right, want value of control increment or decrement accordingly.
the problem having not able capture mouse-move event once mouse pointer inside boundaries of control , mouse button pressed. i've tried overriding onmousemove() event, event fires once when mouse moved on text-box part of numericupdown control. however, event fires continuously when moved on up/down buttons of same control.
i still want preserve normal operation of control: able type in value, use , down button change value etc...
anyone have suggestions try? thanks!
the mouse event goes textbox that's inside nud. can reference controls property, index 1 textbox:
public sub new() initializecomponent() addhandler numericupdown1.controls(1).mousedown, addressof nudmousedown addhandler numericupdown1.controls(1).mousemove, addressof nudmousemove end sub
this kinda breaks rules okay, control never going change anymore.
Comments
Post a Comment