无法在 .NET 5.0 中使用 ToolStripContainer

问题描述

我需要在左侧创建工具条。但是工具箱没有任何 ToolStripContainer。

enter image description here

所以我尝试通过在设计文件中编码来手动添加 ToolStripContainer。 但是 ToolStripContainer 是用红叉画出来的。

 Private Sub InitializeComponent()
      Me.toolStripContainer1 = New System.Windows.Forms.ToolStripContainer()
      Me.SuspendLayout()
      Me.toolStripContainer1.Size = New System.Drawing.Size(635,407)
      Me.toolStripContainer1.TabIndex = 0
      Me.toolStripContainer1.Text = "ToolStripContainer1"

      Me.Controls.Add(Me.toolStripContainer1)
      Me.toolStripContainer1.LeftToolStripPanel.ResumeLayout(False)
      Me.toolStripContainer1.LeftToolStripPanel.PerformLayout()
      Me.ResumeLayout(False)
      Me.PerformLayout()
 End Sub 

我可以在 .Net 5.0 中使用 ToolStripContainer 吗

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)