【问题标题】:How do I view and edit Visual Basic Power Pack shapes in a Windows Form app with Visual Studio 2017?如何使用 Visual Studio 2017 在 Windows 窗体应用程序中查看和编辑 Visual Basic Power Pack 形状?
【发布时间】:2018-11-25 14:27:39
【问题描述】:

我在旧版本的 Visual Studio 中创建了一个 Windows 窗体应用程序。当我在 VS 2017 中打开它时,设计视图中没有显示任何 Power Pack 形状。我在参考资料中有 Power Pack dll。我尝试将它们添加到工具箱(常规、选择项目、.Net 框架组件),但缺少像矩形形状这样的形状。如何让它们显示在设计视图中或通过工具箱添加新的?

这里是对 Power Pack 的参考:

这是选择工具箱项,您可以看到缺少 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


【解决方案1】:

您正在查看错误的程序集。您需要查看Microsoft.VisualBasic.PowerPacks 程序集。

Visual Basic Power Packs Controls 默认不包含在 Visual Studio 中。首先你应该download 并安装它们。然后将它们添加到工具箱中:

右键单击 ToolBox选择项目 ...过滤器 for powerpacks → 检查控件 → 单击好的

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-19
    • 1970-01-01
    相关资源
    最近更新 更多