I've created a "Windows Form Application" using VS 2008.
In the project I've added a custom control. The problem I'm having is how to create an instance of the custom control to a Windows Form?
I've tried dragging directly to a form in the same project from the solution explorer, but a "can't do that" icon appears. When I try to add the control to the toolbox, it fails.
What am I doing wrong? Do I have to create a separate "Windows Forms Control Library" project then compile it into a DLL before I can use the custom control? The thing with that is the control is only really needed in this current project and not really any use to any other.
I've only ever used to VS 2003 & 2005 for ASP.NET purposes so aren't really that familiar with using Custom controls in Windows projects. Having looked back at previous .NET books on 2005, they appear to be pretty vague in this area also. On MSDN, there appears to be some sort of error relating to 2003 having problems showing custom controls in the toolbox, is this still applicable to 2005 and 2008?
Any help would be greatly appreciated.
Thanks.
In the project I've added a custom control. The problem I'm having is how to create an instance of the custom control to a Windows Form?
I've tried dragging directly to a form in the same project from the solution explorer, but a "can't do that" icon appears. When I try to add the control to the toolbox, it fails.
What am I doing wrong? Do I have to create a separate "Windows Forms Control Library" project then compile it into a DLL before I can use the custom control? The thing with that is the control is only really needed in this current project and not really any use to any other.
I've only ever used to VS 2003 & 2005 for ASP.NET purposes so aren't really that familiar with using Custom controls in Windows projects. Having looked back at previous .NET books on 2005, they appear to be pretty vague in this area also. On MSDN, there appears to be some sort of error relating to 2003 having problems showing custom controls in the toolbox, is this still applicable to 2005 and 2008?
Any help would be greatly appreciated.
Thanks.