| |

VerySource

 Forgot password?
 Register
Search
View: 883|Reply: 3

Novice help form centering problem

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-5 13:30:01
| Show all posts |Read mode
Help form centered:
   Created a window with the windowstate property set to 2. How can this window be centered in full screen when the window is running?
The form is not large, but it is now located in the upper left corner of the full screen
Please advise, thanks
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-6 06:42:01
| Show all posts
When the StartUpPosition property is set to 2 the windowstate property is set to 0
Was centered
But when the windowstate property is set to 2, you are sitting on the corner. . .
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-6 23:27:01
| Show all posts
At the bottom of the right property bar, there is a computer screen with the starting position of the form in the middle, and you can drag it to the middle of the screen with the mouse.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-7 20:00:01
| Show all posts
Or write code in form_load
me.move (screen.width-me.width) / 2, (screen.height-me.height) / 2
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list