Click here to Skip to main content
15,913,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have many drawings in my code
i want to use them like objects(Events,change position,...etc)
is that possible?
note: without lose the points of draw edges
Posted
Updated 30-Nov-14 3:10am
v2
Comments
BillWoodruff 30-Nov-14 15:46pm    
Please describe in more detail what "drawings" are here. Are these images you imported, or created at run-time; are you talking about raster you have created in the Paint Event of a Form, or some Control ?
M. Daban 30-Nov-14 16:50pm    
Its crated at run-time
like drawRectangle
BillWoodruff 30-Nov-14 17:43pm    
Okay, so you are dealing with raster (pixels set in the Paint Event).

Is this Windows Forms ? WPF ? or ... ?

If Windows Forms, depending on what the "drawings" are, I may have some recommendations.
M. Daban 1-Dec-14 2:50am    
its Windows Form, am using graphics.FillPolygon
i want to freely move and resize the Polygon after draw it

1 solution

Yes - probably.
There are a couple of ways to do it, but probably the easiest is to implement them as UserControls - draw what you need in the Paint event, and you can have whatever Events you want to provide.

See here: MSDN UserControl[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900