Click here to Skip to main content
16,011,611 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
that's ok


class textbox :TextBox
{
protected override void InitLayout()
{
base.InitLayout();
BackColor = Color.Beige;
}
}
class lab :Label
{
protected override void InitLayout()
{
base.InitLayout();
BackColor = Color.Beige;
}
}




how can i use this class for all the label controls in the form...........like label1, label2, label3,
llbtime, lblname, lblcity...etc

and textbox .......

how can i apply or call this method...
Posted
Comments
[no name] 6-Sep-13 15:30pm    
You might consider getting a basic textbook on .NET programming and going through it.

Easiest way is just to drag them from the toolbox onto the design surface instead of the standard label. Once you have compiled the assembly, it should appear in a section at the top of the toolbox.
 
Share this answer
 
As a complement to OriginalGriff post,
if the component don't appear in the toolbox, get the bin (dll) from you project and drop it in the tool box, the control may appear now.

You'll need to recreate your controls in the forms you want to use the label, if they exist.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900