with AdjustWindowPos x and y can just be 0 and will move to center
Adjusts window or rectangle coordinates like mes and other QM functions do. If negative, adjusts so that the window would be at the right or bottom of the screen. If 0, adjusts so that the window would be at the center of the screen. Ensures that whole window is in the screen. Ensures that the window will be in the specified monitor.
a few more positions
center
x=0
y=0
top center
x=0
y=1
bottom center
x=0
y=-1
right center
x=-1
y=0
left center
x=1
y=0
Adjusts window or rectangle coordinates like mes and other QM functions do. If negative, adjusts so that the window would be at the right or bottom of the screen. If 0, adjusts so that the window would be at the center of the screen. Ensures that whole window is in the screen. Ensures that the window will be in the specified monitor.
a few more positions
center
x=0
y=0
top center
x=0
y=1
bottom center
x=0
y=-1
right center
x=-1
y=0
left center
x=1
y=0