I currently have a working program that creates one colored pixel in a Bitmap, displays the bitmap in a pictureBox, and "jiggles" the pixel by making it move in a random direction by 1 pixel every time a button is clicked.
 
I want to make the pixel move automatically until a Stop button is pressed.
 
I have tried
 
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
 
for the code in the "Start" button, but the program just hangs indefinitely without updating the pictureBox at all.
 
Any suggestions?
	
		
			
		
		
	
				
			I want to make the pixel move automatically until a Stop button is pressed.
I have tried
			
				VB.NET:
			
		
		
		While 1 <> 2
     Pixel.move() 'move the pixel in a random direction
     Me.outputBox.Image = bmp 'update the picturebox
     System.Threads.Thread.Sleep(100) 'wait
End Whilefor the code in the "Start" button, but the program just hangs indefinitely without updating the pictureBox at all.
Any suggestions?
 
	 
 
		
 
 
		 
 
		