GLControl 未出现在工具箱中

GLControl is not showing up in toolbox

在学校学习计算机图形学 class 我被分配在我的项目中使用 GLControl。我已经下载并安装了 OpenTK 和 OpenTK.GLControl。这两个参考都出现在我的解决方案资源管理器中的项目参考选项卡中。我一直在尝试找出如何将 GLControl 添加到我的工具箱中。

我尝试过的东西

  1. 我已经完成了工具 -> 选择工具箱工具 -> (select GLControl),但 select 无法添加到工具箱
  2. 我已尝试按照网上有人建议的那样将该工具的引用拖到工具栏。
  3. 我已经卸载了我的 nuget 包并重新安装了它们。
  4. 哭了几个小时,希望它能起作用。

如果没有这种控制,我无法到达任何地方,如果有什么我可以做的,我会怎么做才能完成这项工作。

作为大量使用 OpenTK 的 GLControl (SGDK2) 的 IDE 的作者,我可以告诉你我从来没有将 GLControl 放在工具箱中,而且我不认为我会想要。这并不是您在设计时要处理的那种控件。相反,我只是在我的表单中添加了一个虚拟控件(面板),然后进入设计器代码文件(例如 Form1.Designer.cs)并将每次出现的 System.Windows.Forms.Panel 替换为 OpenTK.GLControl。我对控件所做的几乎所有事情都在代码中,因此设计器集成并不是那么重要。

  /// <summary>
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// </summary>
  private void InitializeComponent()
  {
     this.panel1 = new OpenTK.GLControl();
     this.SuspendLayout();
     // 
     // panel1
     // 
     this.panel1.Location = new System.Drawing.Point(32, 37);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(223, 175);
     this.panel1.TabIndex = 0;
     // 
     // Form1
     // 
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(284, 261);
     this.Controls.Add(this.panel1);
     this.Name = "Form1";
     this.Text = "Form1";
     this.ResumeLayout(false);

  }

  #endregion

  private OpenTK.GLControl panel1;

编辑:

就是说,我只是尝试右键单击工具箱的常规部分,选择 "Choose Items..." 并浏览到 OpenTK.GLControl.dll 的位置。这将 GLControl 添加到我的工具箱中的常规类别。所以我不确定你为什么会遇到困难。但希望将其强制采用如上所示的形式将无论如何将其纳入您的项目,或者为您提供更好的错误或解释为什么它不适用于您的项目。