I'm working on a web browser in C#, so I made a splash screen for it. However, the splash screen isn't located at the center of the screen when it starts up. So is there a way to center the form on startup?
Working code:
public splash()
{
InitializeComponent();
StartPosition = FormStartPosition.CenterScreen;
}
To center your form in the application screen, open the form in design view. View the Form Properties. Set the "Auto Center" property to "Yes".
Specify the default form in Access OptionsClick the File tab, and then under Help, click Options. Click Current Database. Under Application Options, in the Display Form list, select the form that you want to display when the database starts. Click OK, and then close and reopen the database to display the startup form.
Press F5 to build and run the application. Click on the button in the main form to display the sub form. Now, when you press the button in the sub form, the form will be hidden.
StartPosition = FormStartPosition.CenterScreen;
MSDN FormStartPosition Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With