Hello all,
This is my first time to these forums, so be nice
I've been trying this problem for a while, and just can't get around it.
I want to add an event that will be raised when the mouse is released on my hscrollbar. I've tried creating a custom control, but do not have much experience. This is what I have so far:
And then on my form where the scroll bar is used:
However, this does not work, so I'm turning to you guys
Any help is greatly appreciated.
Cheers,
Adam
This is my first time to these forums, so be nice
I've been trying this problem for a while, and just can't get around it.
I want to add an event that will be raised when the mouse is released on my hscrollbar. I've tried creating a custom control, but do not have much experience. This is what I have so far:
VB.NET:
[color=#00007f]Public[/color] [color=#00007f]Class[/color] xtScroll
[color=#00007f]Inherits[/color] System.Windows.Forms.HScrollBar
[color=#00007f]Public[/color] [color=#00007f]Shadows[/color] [color=#00007f]Event[/color] MouseUp [color=#00007f]As[/color] MouseEventHandler
[color=#00007f]Protected[/color] [color=#00007f]Overrides[/color] [color=#00007f]Sub[/color] OnMouseUp([color=#00007f]ByVal[/color] e [color=#00007f]As[/color] System.Windows.Forms.MouseEventArgs)
[color=#00007f]RaiseEvent[/color] MouseUp([color=#00007f]Me[/color], e)
[color=#00007f]End[/color] [color=#00007f]Sub[/color]
[color=#00007f]End[/color] Class
VB.NET:
[color=#00007f]Sub[/color] xtScrollBar_MouseUp([color=#00007f]ByVal[/color] sender [color=#00007f]As[/color] [color=#00007f]Object[/color], [color=#00007f]ByVal[/color] e [color=#00007f]As[/color] MouseEventArgs) [color=#00007f]Handles[/color] XtScroll1.MouseUp
MessageBox.Show("Mouse released")
[color=#00007f]End[/color] Sub[/indent]
Any help is greatly appreciated.
Cheers,
Adam