User controls in windows application.
How to create a textbox user control with properties and events in Windows Application.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khargesh RajputPosted Jan 27, 2015, 1:24 AM
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