I want to Use Progressbar1.Increment but I wanna use Integer but the problem is that the maximum value of integer is over 100 so i want to set the Integer.Maxvalue to 5 but it got an error when I tried using Integer.MaxValue(5) and Integer.MaxValue = 5, So I need to the the Maxvalue to 5
PS:I use Vb 2005 Express Editon*
*I`m a student what do you think?
Your issue isn’t with the progress bar. Your issue is that you’re creating random numbers that are larger than you require.
Use one of the overloads of
Random.Next(). This code will return an integer x; 0 <= x < 5