473,503 Members | 3,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to raise the ValueChanged event only when move the track bar manually?

Hello,
I want to raise the ValueChanged event ONLY when i move the track bar
manually, but not the value changed, how to do in the event below? thank you

Private Sub TrackBar1_ValueChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TrackBar1.ValueChanged
End Sub

Sep 10 '08 #1
2 8872
On Sep 10, 2:10*pm, "Steven" <ga...@163.comwrote:
Hello,
I want to raise the ValueChanged event ONLY when i move the track bar
manually, but not the value changed, how to do in the event below? thank you

Private Sub TrackBar1_ValueChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TrackBar1.ValueChanged
End Sub
Then you need to handle "Scroll" event instead of "ValueChanged" event
which is raised when either a mouse or keyboard action moves the
scroll box.

http://msdn.microsoft.com/en-us/libr...ar.scroll.aspx

Hope this helps,

Onur Güzel

Sep 10 '08 #2
Thank you.

"kimiraikkonen" wrote:
On Sep 10, 2:10 pm, "Steven" <ga...@163.comwrote:
Hello,
I want to raise the ValueChanged event ONLY when i move the track bar
manually, but not the value changed, how to do in the event below? thank you

Private Sub TrackBar1_ValueChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TrackBar1.ValueChanged
End Sub

Then you need to handle "Scroll" event instead of "ValueChanged" event
which is raised when either a mouse or keyboard action moves the
scroll box.

http://msdn.microsoft.com/en-us/libr...ar.scroll.aspx

Hope this helps,

Onur Güzel

Sep 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
9821
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
2
2634
by: Javaman59 | last post by:
I want to add a ValueChanged event handler to a control. If I add the handler during form construction then the ValueChanged handler gets called when the control is initialized, and I don't want...
2
4122
by: tshad | last post by:
Is there a way to raise an event when a user exits a textbox? I tried OnTextChanged and that doesn't seem to do it. <asp:textbox id="email" TextMode="SingleLine" OnTextChanged="checkRecords"...
5
1132
by: Just Me | last post by:
Often I have a problem like the following: .. This is the way I think things happen is: If the usercontrol raises the event when it is first created (I.e., in it's New, or in it's Enter event,...
1
3019
by: Ryan Liu | last post by:
I notice System.Windows.Forms.NumericUpDown's ValueChanged event is not always fired, especially edit its text box directly. Is this a known bug or there is something I should pay attention for...
4
1254
by: graphicsxp | last post by:
Hello, I've got a few stored procedure called made within one sqlTransaction object. If the .Rollback() method of the transaction is called, then I would like some extra code to be executed....
3
2115
by: =?Utf-8?B?Ulc=?= | last post by:
I constructed a new Class with some private members. I would like an event to be raised on the moment the value of one of those private members is changed. How do I define an event for that...
2
1022
by: KA NMC | last post by:
How do you raise an event when a cell in a row changes? I'm using a Datagrid not a Datagrid view. What I want to do is - call my update param when the user changes a value in a cell. How can this...
0
923
by: =?Utf-8?B?WVhR?= | last post by:
Hello, I want to raise the ValueChanged event ONLY when i move the track bar manually, but not the value changed, how to do in the event below? thank you Private Sub TrackBar1_ValueChanged(ByVal...
0
7093
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...
0
7291
Oralloy
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,...
0
7357
jinu1996
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...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.