OpenTKのGLControl(SGDK2)を大量に使用するIDEの著者として、私は決してGLControlをツールボックスに入れていないと言いますが、私はしたくないと思います。これは、設計時に対処したいコントロールの種類ではありません。代わりに私のフォームにダミーのコントロール(Panel)を追加して、デザイナーコードファイル(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;
EDIT:OpenTK.GLControlの場所に、私はちょうど選択、ツールボックスの[全般]セクションを右クリックしてみました「項目を選択してください...」と言っ
と閲覧.dll。これにより、私のツールボックスのGeneralカテゴリにGLControlが追加されました。だからあなたがなぜ難しいのかわからない。しかし、うまくいけば、上記のようなフォームにそれを強制して、あなたのプロジェクトに取り込むか、あなたのプロジェクトでうまくいかない理由について、より良いエラーや説明を与えるでしょう。