How to get the form at design time to the center of the screen
-
When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.
-
When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.
-
When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.
I had to check this out, and I see the same thing. But to me it seems quite natural. When I create a new text file, I start writing in the upper left hand corner, too. All sorts of boes and forms, frames and whatever to be filled in, I feel it natural to fill left to rigth, top to bottom. If I want to drag a box larger, I alway drag the lower right corner (so the old contents stays in the same positions, unless it is flowing, of course. Personal taste varies. But I am starting to ask myself why the window is centered when you work with a WPF app. I think upper left would be better.
-
When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.
Were you looking for the
StartPosition
property of your form? You can set that to "CenterScreen".Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Were you looking for the
StartPosition
property of your form? You can set that to "CenterScreen".Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakThat only affects what your form looks like when you're at run-time. I was wondering if I can get the form positioned closer to the center of the screen at design-time, but I don't think that can be changed.
-
That only affects what your form looks like when you're at run-time. I was wondering if I can get the form positioned closer to the center of the screen at design-time, but I don't think that can be changed.
No, you can't. If you want that, switch to WPF, but you're going to have to rewrite your entire app to do that.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
No, you can't. If you want that, switch to WPF, but you're going to have to rewrite your entire app to do that.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak