FormStartPosition.CenterScreen : Form Frame Window « GUI Windows Form « C# / C Sharp
- C# / C Sharp
- GUI Windows Form
- Form Frame Window
FormStartPosition.CenterScreen
using System.Drawing;
using System.Windows.Forms;
class FormProperties
{
public static void Main()
{
Form form = new Form();
form.Text = "Form Properties";
form.BackColor = Color.BlanchedAlmond;
form.Width *= 2;
form.Height /= 2;
form.FormBorderStyle = FormBorderStyle.FixedSingle;
form.MaximizeBox = false;
form.Cursor = Cursors.Hand;
form.StartPosition = FormStartPosition.CenterScreen;
Application.Run(form);
}
}
Related examples in the same category