i have this class for example:
class labeledtext
{
private TextBox tb;
private Label l;
public labeledtext(Form frm)
{
tb = new TextBox();
l = new Label();
frm.Controls.Add(tb);
frm.Controls.Add(l);
}
public void SetCaption(string cpt)
{
l.Text = cpt;
}
public string text()
{
return tb.Text;
}
}
I want to make an object from this class, that can be used in any other project, as a visual object. I want to use it like a text box, drag it from toolbox to my form and put it and so on. how can i do this? I use visual studio 2010, if it is important.