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.
No comments:
Post a Comment