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;
편집 : OpenTK.GLControl의 위치에, 난 그냥 선택, 도구 상자의 일반 섹션을 마우스 오른쪽 버튼으로 클릭 시도 않았다 "항목을 선택합니다 ..."라고
및 검색 .dll. GLControl이 도구 상자의 일반 범주에 추가되었습니다. 그래서 왜 어려울 지 모르겠습니다. 그러나 위와 같은 형식으로 작업하도록 강요하면 어쨌든 프로젝트에 적용되거나 프로젝트와 관련되지 않은 이유에 대해 더 나은 오류나 설명을 제공하게됩니다.