UserControl

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Click on Project > Add User Control. Or right click on the file in
solution explorer and choose Add User Control.


Joseph
 
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
 
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
 
Back
Top