title: Problem with random number generator Same Numbers
body: <p>I have a problem with a random number between two variables. It always gives me the same number between two numbers. Not a random numbers between two numbers.</p>
  
  <pre><code>
      Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
          Randomize()
          Dim rnd As New Random
          Dim minval As Integer
          Dim maxval As Integer
  
          minval = 1000 / grempamin.Value
          maxval = 1000 / grempamax.Value
  
          Timer1.Interval = rnd.Next(maxval, minval)
  
          If MouseButtons = MouseButtons.Left Then
              apimouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
              apimouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
          End If
      End Sub
  </code></pre>