Using VB 2010 Express, Re: ProgressBar
Although my progress bar works (after a fashion), I am having trouble figuring out how the "properties" work. I wish to use a dynamic way of setting the Maximum property using a variable (ProgressBar1.Maximum = NumberOf). I have seen that done in code in several examples, but they do not discuss how to deal with the Properties Window. The values set in the Properties Window during design time, are interfering with my coded values. I have tried setting the Maximum value in the properties window to "0", but that does not work, nor does leaving it blank (says that "Property value not valid").
So the question is: How do I set my Maximum, Minimum, with code without a problem with the Properties causing a conflict?
So if I have this in my code:
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = NumberOf
How do I deal with the Design-Time Properties Window values?
Although my progress bar works (after a fashion), I am having trouble figuring out how the "properties" work. I wish to use a dynamic way of setting the Maximum property using a variable (ProgressBar1.Maximum = NumberOf). I have seen that done in code in several examples, but they do not discuss how to deal with the Properties Window. The values set in the Properties Window during design time, are interfering with my coded values. I have tried setting the Maximum value in the properties window to "0", but that does not work, nor does leaving it blank (says that "Property value not valid").
So the question is: How do I set my Maximum, Minimum, with code without a problem with the Properties causing a conflict?
So if I have this in my code:
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = NumberOf
How do I deal with the Design-Time Properties Window values?