开发者

Zoom a Rectangle in .NET

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

Is it possible 开发者_StackOverflowto make a zoom on it? How?


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 ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜