Wednesday, February 18, 2015

How to Display Windows Forms in center of the Screen in C#

When you are developing a Windows form applications in Visual Studio, by default at the run time the form is not position to center of the screen or center of its parent form. This starting position property can be easily set by using following code segment.



 
this.StartPosition = FormStartPosition.CenterScreen; 
This is my testing project, so you can open the code window of form. 

Here you can the code segment 
this.StartPosition = FormStartPosition.CenterScreen;
 Run the project and you will see that the form will be shown in the middle of the screen.
Do not forget to leave your comments below.

1 comment:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete