也许这个问题很简单,但我正在使用OpenTK和WinForms,问题是我在工具箱中找不到GLcontrol,所以我在Form1.Designer.cs中手动添加了它,以下是代码:
#region Windows Form Designer generated code /// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
glcontrol1 = new OpenTK.GLControl();
this.SuspendLayout();
//
// glControl1
//
//
// Form1
//
this.Controls.Add(glcontrol1);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 561);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}
#endregion
OpenTK.GLControl glcontrol1;
问题出在我打开 Form1 的设计模式时,它会显示以下消息:
"无法从程序集中加载类型 OpenTK.ToolkitOptions..."
"变量 glcontrol1 未声明或未赋值"
我希望知道如何将 GLcontrol 添加到工具箱中,有人知道吗?请注意,不要删除任何 HTML 标签。