Custom Control DLL Reference Greyed Out in Toolbox
I'm trying to add a custom panel to my toolbox using a dll file, but when I add it as a reference it only appears as greyed out - and this is only after I click "Show All" in the toolbox.
Everything builds fine in the Class Library project I used to create the custom control. Here is the simple code:
Code:
Imports System.Windows.Forms
Public Class pnDoubleBuffered
Inherits Windows.Forms.Panel
Public Sub New()
MyBase.New()
SetStyle(ControlStyles.OptimizedDoubleBuffer Or ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint, True)
SetStyle(ControlStyles.ResizeRedraw, True)
Me.UpdateStyles()
End Sub
End Class
I build the project, open my main project where I want to use the control. Then I click "Choose All" from the toolbox and add the reference using ".NET Frameworks Components". I find my dll file and click OK. Then nothing is added to the toolbox. I manage to see the control greyed out when I click the "Show All" option.
This is my first attempt at a dll custom control. What am I doing wrong?
Re: Custom Control DLL Reference Greyed Out in Toolbox
Hmmm... I used your code and file in my project and the same thing happened BUT then tried both yours and my code and file in a NEW project and both showed up in the toolbox correctly.
So I'm at least making progress, thanks!
Some setting must be off in my actual project. Any ideas?