I've been working on a Windows Forms application, and have recently added a simple settings page that allows the user to select a folder for where the output goes. The OpenFileDialog is ugly and not nice to use, so I've added in the Windows API CodePack to get access to the CommonOpenFileDialog- all good there.
When I open the CommonOpenFileDialog, the Windows form application shrinks to a smaller size, as shown in the image attached.
On the left is the program normally, on the right is with the dialog open:
I've tried checking the size of the Form before and after, that's not changing, so I'm hitting a bit of a brick wall. Any information would be useful, I can provide more details if needed.
Code to open the form is:
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.DefaultDirectory = selectedFolderTextBox.Text;
dialog.IsFolderPicker = true;
if (dialog.ShowDialog() != CommonFileDialogResult.Ok) return;
selectedFolderTextBox.Text = dialog.FileName;