Re: Clear



pictureBox1.Invalidate()

If you're using a picture box as a canvas for drawing on then you probably
shouldn't. Use a panel as a placeholder and draw in response to the panel's
Paint event.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"VJ" <vijaybalki@xxxxxxxxx> wrote in message
news:eZIwPScnFHA.3304@xxxxxxxxxxxxxxxxxxxxxxx
> How do I clear a graphics region & repaint a new drawing. The region is a
> image in a Picturebox control.
>
> Graphics g = Graphics.FromImage(pctImage.Image);
>
> 'Clear current graphics...
> How to ???
> 'Draw new graphics...
>
> Thanks
> VJ
>


.



Relevant Pages

  • Re: image maps - word 2007
    ... In Word it's a bit of trying to figure out where 'Escher 2', the new graphics ... Select a WMF file and insert it in the drawing ... Right click on the inserted graphic and choose Edit Picture, ... visible until you click on a segment. ...
    (microsoft.public.word.drawing.graphics)
  • Re: Ignored advice, am now in serious poo on graphics
    ... Then I put in a thread.sleep, after the draw in the Paint method, and noticed a strange thing - the image was shown for 1000 milliseconds, then disappears. ... If you're doing your own drawing, there's nothing in a PictureBox control that is useful to you. ... It would take a lot more than a single newsgroup post to address all of the complexities of graphics under Windows. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to destroy a system
    ... > Pascal Bourguignon wrote: ... Re graphics: A picture is worth 10K words -- but only those to ... If your job is to draw a picture, or edit a photography, then ...
    (comp.lang.scheme)
  • Re: Do I understand how Word deals with graphics?
    ... That's impressive Word graphics work on your web site ... it has been forwarded to some Microsoft ... Basically if you picture a 'floating' graphic being a picture you ... | you delte a drawing object. ...
    (microsoft.public.word.drawing.graphics)
  • Re: Print preview image in a picture box
    ... If you're printing the image as it has been drawn into the PictureBox then you can use PaintPicture to do it. ... This will enable you to "draw" the resultant metafile into a Form or a Picture Box or a Printer page or whatever and the drawing will take full advantage of the resolution of the current output device. ...
    (microsoft.public.vb.general.discussion)

Loading