Set Form window title and center the Form window on the desktop : Form Frame Window : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Form Frame Window »

 

Set Form window title and center the Form window on the desktop









    


using System;
using System.Windows.Forms;
using System.Drawing;

public class TestForm2 {
  static void Main() {
    Form simpleForm = new Form();

    simpleForm.Height = 200;
    simpleForm.Width = 200;

    simpleForm.Text = "This is the title";

    // Center the Form on the desktop
    simpleForm.StartPosition = FormStartPosition.CenterScreen;
    simpleForm.Visible = true;

    Application.Run(simpleForm);
  }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Form Frame Window