473,387 Members | 1,553 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,387 software developers and data experts.

Clear Graphics

I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I’m not to sure how.

Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()

cmdClear_Click
Me.Panel.?????

--
thank You
Gus Chuchanis
Mar 6 '07 #1
4 7536
Gus Chuch wrote:
I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I’m not to sure how.

Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()

cmdClear_Click
Me.Panel.?????
Use the Clear(Color) method in the Graphics class.

--
Göran Andersson
_____
http://www.guffa.com
Mar 6 '07 #2
not to sure how to do the code for this any help?
--
thank You
"Göran Andersson" wrote:
Gus Chuch wrote:
I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I’m not to sure how.

Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()

cmdClear_Click
Me.Panel.?????

Use the Clear(Color) method in the Graphics class.

--
Göran Andersson
_____
http://www.guffa.com
Mar 6 '07 #3
On Mar 6, 6:28 pm, Gus Chuch <GusCh...@discussions.microsoft.com>
wrote:
not to sure how to do the code for this any help?
--
thank You

"Göran Andersson" wrote:
Gus Chuch wrote:
I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I'm not to sure how.
Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()
cmdClear_Click
Me.Panel.?????
Use the Clear(Color) method in the Graphics class.
--
Göran Andersson
_____
http://www.guffa.com

Should be something like:

Me.Panel1.CreateGraphics().Clear(Me.Panel1.BackCol or)

Thanks,

Seth Rowe

Mar 7 '07 #4
Gus Chuch wrote:
not to sure how to do the code for this any help?
Example:

Dim g As Graphics = Me.Panel1.CreateGraphics()
g.Clear(Color.Black)
g.Dispose()

--
Göran Andersson
_____
http://www.guffa.com
Mar 7 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Trimboli | last post by:
At http://www.trimboli.name/ I've created a list of the contents of the site, using graphics as the list bullets by including style attributes in the HTML. What I want to do is make the graphic top...
5
by: William Schubert | last post by:
Is there a common defintion of Clear that applies to both objects and collections? If so, where is it documented. My preconceived notion is that Clear means "reset the object to its initial...
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!
5
by: active | last post by:
In a PictureBox if I want to clear the Image or background do I simply use FromFile("") (just a guess) I did see about FromFile: If the file does not have a valid image format or if GDI+ does...
7
by: moondaddy | last post by:
I'm painting images onto a windows form using this method: e.Graphics.DrawImageUnscaled(m_ItemImage, x, y) every time I select a product. However, some products don't have an image so when a...
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...
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...
5
by: Kid Programmer | last post by:
Hello guys. I was wondering how you can clear the screen in a java program. Here is the code for my program: import javax.swing.SwingUtilities; import javax.swing.JFrame; import...
10
kspiros
by: kspiros | last post by:
I have a picture box which contains an image and some drawn ellipses. while a thread pass by the ellipses increase the alpha of the ellipse but when the tread leaves the ellipse range i can't change...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.