473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Clear the drawing are C#

Hi
I created a small C# windows application.Now when I click the clear button which I have created, I want the whole drawing to be erased.
How can it be achieved?.
Need some help
Thanks in advance
Oct 10 '07 #1
3 8425
Plater
7,872 Expert 4TB
Do you have the Graphics object for the drawing?
Oct 10 '07 #2
Do you have the Graphics object for the drawing?
Yes sir, I DO have the graphics object for the drawing
Oct 10 '07 #3
Plater
7,872 Expert 4TB
Yes sir, I DO have the graphics object for the drawing
Well then just use:
Expand|Select|Wrap|Line Numbers
  1. mygraphics.Clear(mycolor);
  2.  
Where mygraphics is your Graphics object and mycolor is the color you wish to clear it with.
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Peter | last post by:
I want to draw some lines on a widget. This works ok, but when I want to redraw, the old lines are still there. How do I clear or refresh the widget, so I can draw a new set of lines? Code...
2
by: Tomomichi Amano | last post by:
Hello How can I delete (clear) lines that were made useing Graphics.DrawLine() ? Thanks in advance! Have a nice day!
2
by: zbcong | last post by:
hello in my program,i have following method,it copy a jpg file to clipboard,and works well: Private Sub CopyImage() Dim file As System.IO.Stream =...
21
by: StriderBob | last post by:
Situation : FormX is mdi child form containing 2 ListViews ListView1 contains a list of table names and 4 sub items with data about each table. ListView2 contains a list of the columns on each...
3
by: JD | last post by:
Is it possible to have a clear backstyle for a lable control? I want to write some text on a lable and I want the background of the label to match the color of the control I am placing the label...
0
by: Flack | last post by:
I have pasted at the end of this message a small sample program I whipped up to do some testing. It's a form with a datagrid and two buttons. Each button clears the dataTable that is the source...
0
by: BlipBlip | last post by:
This is quite an annoying problem while Internet Explorer does not properly display colors of generated and streamed .png images. Below is quite simple code to produce a square rendered with #767676....
11
by: Slickuser | last post by:
I have this function that will fill the ellipse every 10 seconds with specific x,y,w,h. Now I want do the the reverse, to clear the ellipse with given x,y using Timer at every 30s. Or I have...
32
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.