The Starting Position

  • Thread starter Thread starter Visually Seen #
  • Start date Start date
V

Visually Seen #

Hello everyone,

I'm manually creating my windows forms.
And that means going into Notepad, and writing the designer.cs and
class.cs and static void Main(), all by myself.
I only have the .NET Framework SDK and Redistrubutable.

To the point:
To set the size in a form, you write:
this.Size = new Size(500, 500);

How do you set the form's starting position to centre,
I'm pretty sure it's something like:
this.StartPosition = Window.StartPosition.Centre;
, but it doesn't compile.

Visually Seen Sharp
 
How do you set the form's starting position to centre,
I'm pretty sure it's something like:
this.StartPosition = Window.StartPosition.Centre;
, but it doesn't compile.

Hi,

The enumeration which contains the possible values for the property is
FormStartPosition:

form1.StartPosition = FormStartPosition.CenterScreen

Regards - Octavio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top