Stop using Thread.Sleep: that causes your whole thread - in this case the UI thread, which dos all the work of handling the display and all user input - to be suspended.
And even if it wasn't, that code is a loop inside a Click event handler.
Which means that the screen doesn't get updated and mouse clicks don't work until you leave the method!
Throw away the loop - Windows in general and C# in particular don't work like that outside of console applications.
Add a Timer to your form. Set the Interval property to 100 and start it.
Add a class level bool called "moving" and start if as false.
In your Button click event, invert the start of your "moving" variable.
Handle the Tick event for the timer.
In the handler, check "moving". If it's true, do your code inside the loop once, and once only. )This will mean moving
i
to class level as well. If it's false, do nothing.
BTW: That's not the best way to do the job, and it's actually dangerous. For the moment, at the end of any method, call Dispose on all the Graphics items you created:
g1.Dispose();
g2.Dispose();
If you don't, your application will crash sooner than you think...
There are betters ways, such as doing the drawing code in the Form Paint event, but that's for later, I suspect.