I am drawing a rectangle, sleeping for a few milliseconds--then I want to clear the rectangle, but I can't figure out how. (The rectangle is sitting over a graphic so I can't simply cover it up with another rectangle)
graphics.DrawRectangle(p, innerRectangle)
System.Threading.Thread.Sleep(75)
Next I want to clear the rectange...
simply remove the Mouseup event then. Though you would want to toss the rectangle at that point into a variable so you can keep it. Also as I said the drawing is not persistant, meaning that if you minimize the form or cover it with another window, it will not redraw the rectangle.
You can draw filled shapes by selecting which shape you want, click picturebox and drag mouse to get which size you want. But THIS can happens when I drag. When I use refresh(); , shapes -which previously drawn- deletes itself.
You need to redraw the graphic (or at least the part of it under the rectangle). If this is a picture box or something similar, use Invaldiate() to force a repaint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With