【发布时间】:2018-11-25 14:27:39
【问题描述】:
我在旧版本的 Visual Studio 中创建了一个 Windows 窗体应用程序。当我在 VS 2017 中打开它时,设计视图中没有显示任何 Power Pack 形状。我在参考资料中有 Power Pack dll。我尝试将它们添加到工具箱(常规、选择项目、.Net 框架组件),但缺少像矩形形状这样的形状。如何让它们显示在设计视图中或通过工具箱添加新的?
这是选择工具箱项,您可以看到缺少 RectangleShape:
这是定义矩形的代码:
private Microsoft.VisualBasic.PowerPacks.RectangleShape StandardFiltersToUseRectangleShape;
this.StandardFiltersToUseRectangleShape = new Microsoft.VisualBasic.PowerPacks.RectangleShape();
this.StandardFiltersToUseRectangleShape.BorderWidth = 3;
this.StandardFiltersToUseRectangleShape.Location = new System.Drawing.Point(626, 82);
this.StandardFiltersToUseRectangleShape.Name = "StandardFiltersToUseRectangleShape";
this.StandardFiltersToUseRectangleShape.Size = new System.Drawing.Size(600, 15);
this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] {
this.StandardFiltersToUseRectangleShape,
this.FiltersToBuildRectangleShape});
【问题讨论】:
-
您正在查看错误的程序集。您需要查看
Microsoft.VisualBasic.PowerPacks.dll。
标签: winforms visual-studio-2017 windows-forms-designer shapes powerpacks