User controls in windows application.
How to create a textbox user control with properties and events in Windows Application.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Jan 26, 2015, 8:24 PM EST
private void btngeneratetextbox_Click(object sender, EventArgs e)
{
TextBox wc = new TextBox();
this.Controls.Add(wc);
wc.TextChanged+=wc_TextChanged;
}
void wc_TextChanged(object sender, EventArgs e)
{
//var box = (TextBox)sender;
MessageBox.Show("TEXT CHANGED");
}
for more visit
http://www.c-sharpcorner.com/Blogs/15535/
http://visualcsharptutorials.com/windows-forms/dynamically-adding-controls