在一个WinForm我用Microsoft.VisualBasic.PowerPacks的矩形,椭圆和直线。
In a WinForm I use rectangles, ovals and lines of Microsoft.VisualBasic.PowerPacks.
是否有可能使一个变焦就可以了?怎么样?
Is it possible to make a zoom on it? How?
假设你只是用它们来画画,没有输入控件,做到这一点。
Assuming you are just using them to draw pictures, there are no input controls, do this.
1),将它们移动到用户控件 2)把表单上的用户控件 - 但设置可见=假 3)在窗体的负载,调用用户控件的DrawToBitmap,将其保存 4)在油漆...绘制位图的形式,根据您的变焦缩放它。 5)看家...如果该用户控件的变化,刷新位图;如果缩放或位图的变化,无效的形式。
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.
祝你好运; - )
上一篇:将 BitmapImage 设置为 null 时未释放内存设置为、内存、BitmapImage、null
下一篇:获取从TFS文件的变化来实现自定义&QUOT历史;怪"异常-behaviour自定义、来实现、异常、文件