I have a C# Win Forms application where I dynamically draw buttons in a panel based on 2 properties in the class. Rows and Columns.
I also have a dialog box that opens,
You should not be doing any drawing outside of the Paint event of the form. This is why the form is not redrawing correctly. Move your custom drawing there and the redrawing should behave normally.
Paint