1

I have created new WinForm project and have installed SharpGL package for WinForms: Install-Package SharpGL.WinForms, but appropriate controls did not appear in toolbox.

How to make them appear?

note: This samples https://github.com/dwmkerr/sharpgl/tree/master/source/SharpGL/Samples/WinForms already has SharpGL controls in toolbox.

try_1: When I click 'choose items...' in toolbox context menu "choose item" window is opened but starts loading and hang visual studio.

try_2: I also tryed to set Options -> Windows Forms Designer -> AutoToolboxPopulate to true and rebuild solution but it doesn't work.

try_3: Waited a while in "choose item" window, clicked browse button and navigate to SharpGLWinForms.dll in packages folder, klicked ok but only GLColourPiker had been added into toolbox. (I wanted OpenGLControl and other control of this lib)

try_4: Repeat try_3 several times and appropriate controls finally appeared. But why I had repeat this step to get the result. What wrong I did?

Yaros
  • 75
  • 8

1 Answers1

0

Had same problem. In order to make designer work with this control I had to make it somehow visible in my Toolbox.

So in my project I:

  1. Created new UserControl that I named 'GLViewportControl' and made it inherit from SharpGL.OpenGLControl instead of plain UserControl.
  2. Enabled DrawFPS in designer just to check.
  3. Rebuild.
  4. Designer fails.
  5. Rebuild.
  6. Designer works.
  7. Profit.
  8. Good Luck.
Arek Bal
  • 712
  • 8
  • 13