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:
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.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
This is my first attempt at a dll custom control. What am I doing wrong?





Reply With Quote