How to Change Form Text Dynamically in Windows Form



Here we will see when we change text in textbox in then we have to change Form text in windows application. It’s pretty easy to changed text in windows application.

Step 1: Create Windows Form Application and Drag Textbox Control in your Windows Form.
Step 2: Now generate Text Changed () event of that control and Create Event Handle for Text Changed in Form Load.

CODE BEHIND:

public Form1()
        {
            InitializeComponent();
            txtInput.TextChanged += new EventHandler(txtInput_TextChanged);
        }
void txtInput_TextChanged(object sender, EventArgs e)
        {
            //Here assign the text to the This form text.
            this.Text = txtInput.Text;
        }

Run you Windows Form Application and Changed text in Textbox.


Related Posts

Previous
Next Post »

Thanks for comments.....