Sharkadder
August 3rd, 2009, 11:07 AM
alright dudes/dudettes, i have a question about removing shapes in C#.
firstly i am wanting to draw a small circle on the screen at the co-ordinates where the mouse is clicked, then i wish to remove this circle when a button is pressed. Now i could create as many circle as i like and then click on the button and they would all need to be removed.
For this i could use the GDI+ or picture boxes but i am unsure which would be the best way to go. Picture boxes are fine but i don't want to be having picture boxes all over the place. However when when using GDI+ i am unsure how to delete a shape i have previously drawn.
So what is the best way in C# using .net framework to draw and remove shapes on the screen? I am just after using the GDI+ and any form controls in .net framework 3.5, no dll extensions.
p.s. i do not wish to remove all GDI+ graphics when the button is clicked, just the circles in which have been drawn. I know how to draw circles on the screen using GDI+ and how to use form controls but i do not know how to remove a shape drawn with the GDI+.
Thanks
firstly i am wanting to draw a small circle on the screen at the co-ordinates where the mouse is clicked, then i wish to remove this circle when a button is pressed. Now i could create as many circle as i like and then click on the button and they would all need to be removed.
For this i could use the GDI+ or picture boxes but i am unsure which would be the best way to go. Picture boxes are fine but i don't want to be having picture boxes all over the place. However when when using GDI+ i am unsure how to delete a shape i have previously drawn.
So what is the best way in C# using .net framework to draw and remove shapes on the screen? I am just after using the GDI+ and any form controls in .net framework 3.5, no dll extensions.
p.s. i do not wish to remove all GDI+ graphics when the button is clicked, just the circles in which have been drawn. I know how to draw circles on the screen using GDI+ and how to use form controls but i do not know how to remove a shape drawn with the GDI+.
Thanks