namespace WindowsFormsApplication1
{ publicpartialclass Form1 : Form { //Decalre As Global For Use Anywhere... TextBox txtMyNewTextBox = new
TextBox();
privatevoid button1_Click(object
sender, EventArgs e) { //Set The Location On The
Form Using X & Y Axes... txtMyNewTextBox.Location =
new Point(12,
12);
//It Will Add New Textbox To
Form Runtime... this.Controls.Add(txtMyNewTextBox); }
//Using Below You Can Retrieve value Of
New Textbox... privatevoid
button2_Click(object sender, EventArgs e) {
//You
Can Store It In Variable….
string store= txtMyNewTextBox.Text;
//You Can Store It In Another
Textbox Also… TextBox1.Text = txtMyNewTextBox.Text; } }
}
0 comments
Comments
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
Join the conversation! Your thoughts help the community grow.