In this article you will learn how to work with Progress Bar Control and Mouse Wheel event of the window form.
Create a New Project in VB.net. Drag a Progress bar control from tool box and place on form and now drag and drop four buttons on form having text l< << >> >l. this is simple interface for this purpose.
Now write code on form load even of the form
Now write code on button click events.
This is code for buttons now we will see how we can work with progress bar with mouse wheel scrolling. Select MouseWheel event from form1 events.Now write simple code in this event:
Now in if condition you see that e.delta > -1 this is important for us when we scroll mouse one time control comes in this event and if we scroll wheel up side e.delta value will < 0 and if we scroll down side e.delta value > 0. Only remember these things in mind. Now see this condition ProgressBar1.Value < 100 we are handling the exception and also in ProgressBar1.Value > 0 because progressbar value should be in range of progressbar1.minimum and progressbar1.maximum.
4 comments:
u r gr8...gud effort....
Good Effort
Thank you..............:)
@ Dilpreet Thank u vry much....
Post a Comment