c# - How do you draw a Control? -


how draw control?

i'm not talking usercontrol/custom control (or i?), talking using gdi draw own custom shape, , give properties , events, mynotsostraightthickline.clicked, or mynotsostraightthickline.color, etc.

how make things you've drawn gdi+ clickable, selectable, movable, events , properties other controls inherit, making disposable whenever needed?

you'll have draw each thing want, , capture mouse move events , mouse click events determine whether have clicked part of each element. tricky if dealing diagonals , ellipses, may have determine full list of possible x + y coordinates (on per pixel basis) each of elements possible positions on creation , compare on mouse move/click events.

and recording colours, properties of picturebox content @ location of move/click event, or perhaps better same objects mirror of properties of controls drawing, way create objects , take properties drawing them, simpler.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -