The attached zip shows what I mean.
With the designer I have a panel. It is anchored left-top.
In code I want to move it to the center of the form. No problem.
When the user (me) resizes the form, the panel jumps back to top left.
This is probably as designed.
I can prevent resizing, and that works. But for this application I want to resize.
I can add the centering code in the _Resize event. But there will be a flicker as the panel jumps back and forth to the top- left and then to the center.
Using centering anchors in the designer changes the panels size, which is not what I want.
Any suggestions?
With the designer I have a panel. It is anchored left-top.
In code I want to move it to the center of the form. No problem.
When the user (me) resizes the form, the panel jumps back to top left.
This is probably as designed.
I can prevent resizing, and that works. But for this application I want to resize.
I can add the centering code in the _Resize event. But there will be a flicker as the panel jumps back and forth to the top- left and then to the center.
Using centering anchors in the designer changes the panels size, which is not what I want.
Any suggestions?