PDA

Click to See Complete Forum and Search --> : User Control question *RESOLVED*


DJ_Catboy
Nov 14th, 2003, 02:58 AM
Hi,

I am trying to develop a user control (a customized combo box). I have got as far as coding a few simple sections (setting background colour, etc...) to see it working, but I can't figure out how to add a custom control to a form. Probably a real newbie question....! Do I have to do it through code? If so, will I see a sample of my control at the place I specify?

I hope somebody can help me,
Thanks in advance,
DJ

MasterBlaster
Nov 14th, 2003, 11:18 AM
If you are using VS.net to develop your control, add a blank form to your project. You control should be available via the toolbox in the my user controls section.

DJ_Catboy
Nov 14th, 2003, 11:23 AM
Hi,

Thanks for your help. However, I do not see a "My user controls" section! Is there somewhere that I need to "switch it on" ?

DJ

MasterBlaster
Nov 14th, 2003, 11:55 AM
Right click on the toolbox and select show all tabs.

DJ_Catboy
Nov 17th, 2003, 08:15 AM
Hi,

OK so this is getting a little bit frustrating! I did that but did not get a tab called "My User Controls". Just thought I would point out that i am running VS.NET 2002 - does that matter?

Thanks for your help and apologies for being dumb!
DJ

MasterBlaster
Nov 17th, 2003, 11:25 AM
It may make a difference. I'm using 2003 and it is on my toolbox. Compile your user control. Click on the tools menu. Hopefully you will have Add/Remove toolbox Items listed there. Click it and add your control to the toolbox that way.

DJ_Catboy
Nov 18th, 2003, 02:32 AM
Many thanks for your help. I have managed to sort it out now. For interest sake, you browse from the toolbox and then point to a .NET DLL (the compiled project with the user control in it) and then hey presto it appears!

Thanks,
DJ