Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 WinForm 中,我使用 Microsoft.VisualBasic.PowerPacks 的矩形、椭圆和线条。
是否可以对其进行缩放?如何?
假设您只是使用它们来绘制图片,没有输入控件,请执行此操作。
1)将它们移动到用户控件 2)将用户控件放在表单上 - 但设置可见 = false 3)在表单的加载中,调用用户控件的 DrawToBitmap,将其保存 4)在绘画中......将位图绘制到形式,根据您的缩放比例缩放它。 5)家务...如果用户控件发生变化,刷新位图;如果缩放或位图更改,则使表单无效。
祝你好运 ;-)