Question Creating A Custom User Control...

IVIr

Member
Joined
Apr 13, 2006
Messages
7
Programming Experience
5-10
I've never created a custom user control.

Anyway, for the first time I wanted to. I added it a new blank one via: Project > Add User Control. I got it to the point where I wanted to test it in my form and (stupid question) but how do I get it onto my form?

It didn't automatically appear on my toolbox. It is of course in my Solution Explore, but I can't get it to click and drag from there.

I don't know what to do. There's probably something I have to do to eithe compile of add it to my project, but I don't know what. I would love some help.

Maybe I should explain further...
All I did was open up my user Control and add a ListView item edit it's properties to format it they way I want. Then I opened up the code for my control and changed it so it looked like this:


VB.NET:
Public Class ViewBill

Private Sub ViewBill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Disp.Width = Me.Width
Disp.Height = Me.Height
End Sub
End Class


What I'm assuming is there's a lot more I have to do to get it to recognize it as a control. What is that?
 
When I have a custom control like that in my project I'll write the control and compile the whole project (run it then exit after it's loaded works well), then it shows up in the toolbox at the very top.
 
Back
Top