UserControl

G

Guest

I created a usercontrol for my winForm (its a grid that will be used on
multiple forms), now how can i add the usercontrol to the form(s)?

thx
 
N

Nicholas Paldino [.NET/C# MVP]

Barney,

When you compile your project, you should see your user control show up
in your toolbox. At that point, you can use it like any other control.

If you want to see the control in your toolbox when the control project
is not in the solution, then you have to right click on the toolbox to
configure it, and then browse to the assembly containing the control.

Hope this helps.
 
Y

yohaas

Click on Project > Add User Control. Or right click on the file in
solution explorer and choose Add User Control.


Joseph
 
G

Guest

I added the usercontrol to my active project just like i do for a asp.net
app. I compliled the project but I'm not seeing it on the toolbox. am i
missing something?


Nicholas Paldino said:
Barney,

When you compile your project, you should see your user control show up
in your toolbox. At that point, you can use it like any other control.

If you want to see the control in your toolbox when the control project
is not in the solution, then you have to right click on the toolbox to
configure it, and then browse to the assembly containing the control.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Barney said:
I created a usercontrol for my winForm (its a grid that will be used on
multiple forms), now how can i add the usercontrol to the form(s)?

thx
 
C

Champika Nirosh

In Toolbox you got to look in the "My User Controls" tab before looking at
it make sure to open the control in design mode, In the same time note that
this way you can see the control only when you have the control under ur
main project..

If you have created ur usercontrol in another solution/ project then you
have to add it manually browse it and add it using Customize Tool Box window

Nirosh.

Barney said:
I added the usercontrol to my active project just like i do for a asp.net
app. I compliled the project but I'm not seeing it on the toolbox. am i
missing something?


Nicholas Paldino said:
Barney,

When you compile your project, you should see your user control show up
in your toolbox. At that point, you can use it like any other control.

If you want to see the control in your toolbox when the control project
is not in the solution, then you have to right click on the toolbox to
configure it, and then browse to the assembly containing the control.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Barney said:
I created a usercontrol for my winForm (its a grid that will be used on
multiple forms), now how can i add the usercontrol to the form(s)?

thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top