How do you change the text in the Titlebar in Windows Forms?

Dmitry Makovetskiyd picture Dmitry Makovetskiyd · Feb 24, 2011 · Viewed 210k times · Source

I am trying to set a condition that would change the writing inside the title bar...

But how do I change the title bar text?

Answer

Ali Reza Kalantar picture Ali Reza Kalantar · Mar 4, 2013

For changing the Title of a form at runtime we can code as below

public partial class FormMain : Form
{
    public FormMain()
    {
        InitializeComponent();
        this.Text = "This Is My Title";
    }
}