It has nothing to do with DoEvents.
1. You should manage the layout with the visual designer.
2. To change the layout of a designer view in your code then:
a. Make the change in Panel_Resize event.
b. Or prevent the layout from handling the resize event.