1

In a WinForm I use rectangles, ovals and lines of Microsoft.VisualBasic.PowerPacks.

Is it possible to make a zoom on it? How?

serhio
  • 28,010
  • 62
  • 221
  • 374

1 Answers1

1

Assuming you are just using them to draw pictures, there are no input controls, do this.

1) Move them to a usercontrol
2) Put the usercontrol on the form - but set visible=false
3) In the load of the form, call the usercontrol's DrawToBitmap, saving it
4) In the paint ... Draw the bitmap to the form, scaling it per your zoom.
5) housekeeping...If the usercontrol changes, refresh the bitmap; if zoom or bitmap change, invalidate the form.

Good luck ;-)

FastAl
  • 6,194
  • 2
  • 36
  • 60
  • interesting approach :) I use the UserControl with shapes however to select and edit some of its properties. – serhio Jun 11 '10 at 07:38