Pacifico437 Posted June 30, 2023 Report Posted June 30, 2023 Buongiorno, benchè alla proprietà del Form inserisco: "CenterScreen", noto che il Form rispetto al video è inerito verso l'alto. ho usato il seguente codice con esito negativo e gradirei un suggerimento per risolvere. Anticipatamente ringrazio e fiducioso, saluto. Domenico. int x, y; x = (this.Width - Form1.Width) / 2; y = (this.Height - Form1.Height) / 2; Form1.Location = new Point(x, y);
drugo66 Posted July 1, 2023 Report Posted July 1, 2023 Ciao, strano: this.StartPosition = FormStartPosition.CenterScreen; a me funziona senza problemi, sia impostato da codice che dall'editor grafico. In ogni caso, se vuoi utilizzare this.Location = new Point(x, y); devi prima impostare this.StartPosition = FormStartPosition.Manual; Buon lavoro.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now