You can see this recent thread about zooming with drawing in Paint event and scale variables (PictureBox inside a Panel, by same thing for any control)
Drawing on a Panel (System.Drawing.Drawing2D)
I'm completely new to using the drawing facilities in vb.net
Nevertheless I've managed to create a prototype drawing on a Panel.
It's just a rectangle with the top right corner bevelled, then there are a couple of circles tangential to the bevel. The dimensions of the rectangle and bevel size and angle are from textboxes. (It's sort of the worlds worst cad program).
Because the bevel can be small relative to the size of the rectangle I have translated and zoomed so that no matter the size of the rectangle the bevel always fills the panel.
Currently more or less the whole code is in the paint event of the Panel including the translate and zoom requirements.
What I want is to be able to press a button and zoom out so the whole rectangle is shown, but I don't know how to do it.
I'm wondering if I should only have the actual drawing elements in the Panel Paint event and have all the calcs as form variables including translate and scale variables?
Anyway, what is the correct way to go about drawing on a panel or does anyone know of any good examples or tutorials.
Just want to avoid thirty two prototypes.