WindowStartPosition
-
Hi, I've set my WindowStartPosition for the form to be centered. I am also changing the size of the form in the FormLoad event as some of the group boxes are not visible. When the form displays on the screen it's centered based on the OLD size, not the new size. Is there a better place to resize the form so that it remains centered, or a way to force the centering somehow? Thank you,
Glenn
-
Hi, I've set my WindowStartPosition for the form to be centered. I am also changing the size of the form in the FormLoad event as some of the group boxes are not visible. When the form displays on the screen it's centered based on the OLD size, not the new size. Is there a better place to resize the form so that it remains centered, or a way to force the centering somehow? Thank you,
Glenn
Have a look here: How to Center A Form in VB.NET and C#[^]
-
Hi, I've set my WindowStartPosition for the form to be centered. I am also changing the size of the form in the FormLoad event as some of the group boxes are not visible. When the form displays on the screen it's centered based on the OLD size, not the new size. Is there a better place to resize the form so that it remains centered, or a way to force the centering somehow? Thank you,
Glenn
set the Form.Size (or Width, or Height, or both) in the Form's constructor. Or, if they are constant, why not set them in Visual Designer; I use the properties pane for such purpose. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).