|
-
Aug 25th, 2009, 06:44 PM
#1
Thread Starter
Hyperactive Member
Clear a Rectangle I've drawn?
Hello again 
So; I've drawn this rectangle
vb Code:
Dim zr As New Rectangle(100, 100, 100, 100)
e.Graphics.DrawRectangle(Pens.Red, zr)
and I want to clear it.
any idea?
-
Aug 25th, 2009, 06:56 PM
#2
Re: Clear a Rectangle I've drawn?
e.Graphics.Clear or something like that.
-
Aug 25th, 2009, 06:58 PM
#3
Re: Clear a Rectangle I've drawn?
If you want to clear only that part, just draw over it again. Drawing twice clears it.
-
Aug 25th, 2009, 06:58 PM
#4
Thread Starter
Hyperactive Member
Re: Clear a Rectangle I've drawn?
 Originally Posted by Vectris
e.Graphics.Clear or something like that.
That clears the whole page. -.-
-
Aug 25th, 2009, 07:05 PM
#5
Re: Clear a Rectangle I've drawn?
Well you should be painting it in the Paint event, so invalidate the control that you are painting this on, but don't redraw the rectangle.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|