我在旧版本的 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});