如何使用Visual Studio 2017在Windows窗体应用程序中查看和编辑Visual Basic Power Pack形状?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何使用Visual Studio 2017在Windows窗体应用程序中查看和编辑Visual Basic Power Pack形状?相关的知识,希望对你有一定的参考价值。

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

以下是Power Pack的参考:enter image description here

这是选择工具箱项,您可以在其中看到缺少RectangleShape:enter image description here

这是定义矩形的代码:

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装配。

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

右键单击ToolBox→选择项目...→过滤电源组→检查控件→单击确定。

enter image description here

以上是关于如何使用Visual Studio 2017在Windows窗体应用程序中查看和编辑Visual Basic Power Pack形状?的主要内容,如果未能解决你的问题,请参考以下文章

如何设置 TFS 2013 以使用 Visual Studio 2013 或 Visual Studio 2017 构建

visual studio2017社区版如何空格操作?

如何在 Visual Studio 2017 中使用 Qt 库?

如何使用 Visual Studio 2017 在 Windows 上构建 OpenSSL?

Intel parallel studio 2017 集成在visual studio 2013 中,现在如何集成到visual studio 2015

如何在 Visual Studio 2017 中使用 C# 8?