Page 1 of 1

Saving TrackBar value *Solved

Posted: Tue Feb 09, 2010 3:14 pm
by tvs praveen
Hi, Now i know to save text, color and font data but now i want to know to save value of TrackBar, i mean i`m using TrackBars on my software for volume control and for balance control, But now i want to save all my changes of TrackBar value, I mean if i move volume and balance TrackBars then i want to save those settings which to use for next time opening the program, Please help me, If you help me you will be thanked a lot wahooo;

- Tvs Praveen

I got solution for this from codenstuff, Thanks a lot codenstuff wahooo;

Re: Saving TrackBar value

Posted: Tue Feb 09, 2010 3:59 pm
by CodenStuff
Hello,

You can do this by creating a setting, for example "Track1" and then inside the "TrackBar_Scroll" event add this code:
Code: Select all
My.Settings.Track1 = TrackBar1.Value
My.Settings.Save()
That will save the trackbar value everytime you move it and to restore the trackbar value when you restart your application use something like this in the "Form_Load" event:
Code: Select all
TrackBar1.Value = Convert.ToString(My.Settings.Track1)
And thats it cooll;

Re: Saving TrackBar value

Posted: Tue Feb 09, 2010 4:29 pm
by tvs praveen
CodenStuff wrote:
Hello,

You can do this by creating a setting, for example "Track1" and then inside the "TrackBar_Scroll" event add this code:
Code: Select all
My.Settings.Track1 = TrackBar1.Value
My.Settings.Save()
That will save the trackbar value everytime you move it and to restore the trackbar value when you restart your application use something like this in the "Form_Load" event:
Code: Select all
TrackBar1.Value = Convert.ToString(My.Settings.Track1)
And thats it cooll;

Thanks a lot codenstuff its helped me a lot wahooo; , Thank you very much wahooo;

Re: Saving TrackBar value *Solved

Posted: Tue Feb 09, 2010 8:20 pm
by hungryhounduk
Tvs

If this has helped you

Please Give thanks to the Author for the Helpfull Posts

as this is what this site is all about helping each other


Chris