scottaherbst
Technical User
Hi I'm using vb.net 2003 and have started getting this error message
"Unhandled exception of type system.nullreferenceexception object variable or with block variable not set."
It gets stopped in this procedure at the line:
Private Sub shuffle_source(ByRef image_array As Array,_ ByVal cycles As Integer)
Private Sub shuffle_source(ByRef image_array As Array,_ ByVal cycles As Integer)
Randomize()
Dim rndPosition As New Random_(DateTime.Now.Millisecond)
For i As Integer = 1 To 4
For i2 As Integer = 1 To image_array.Length_
swap(image_array(rndPosition.Next(0,_ image_array.Length)), image_array(rndPosition.Next(0,_ image_array.Length)))
Next i2
Next i
Label13.Image = image_array(0)
Label14.Image = image_array(1)
Label15.Image = image_array(2)
End Sub
What's strange is that it ran fine until I added a timer that made the screen blink when another timer wound down. Any ideas?
"Unhandled exception of type system.nullreferenceexception object variable or with block variable not set."
It gets stopped in this procedure at the line:
Private Sub shuffle_source(ByRef image_array As Array,_ ByVal cycles As Integer)
Private Sub shuffle_source(ByRef image_array As Array,_ ByVal cycles As Integer)
Randomize()
Dim rndPosition As New Random_(DateTime.Now.Millisecond)
For i As Integer = 1 To 4
For i2 As Integer = 1 To image_array.Length_
swap(image_array(rndPosition.Next(0,_ image_array.Length)), image_array(rndPosition.Next(0,_ image_array.Length)))
Next i2
Next i
Label13.Image = image_array(0)
Label14.Image = image_array(1)
Label15.Image = image_array(2)
End Sub
What's strange is that it ran fine until I added a timer that made the screen blink when another timer wound down. Any ideas?