Windows-API-Code-Pack-1.1
Windows-API-Code-Pack-1.1 copied to clipboard
Activeform shrinks when I open Folder dialog
I start my App and the form is the size I specified. I then click a button to set the folder in a text box as below. When the dialog runs the active form shrinks in size. It shrinks so small it is hard to use. I tried a workround to get size before I open dialog and restore it after but even that is not good. Maybe it is to do with the Desktop size in "Display scale and layout" which I have set to 125%. Maybe this dialog tries to set it to 100%? If you need more info please just get in touch.
Here is the test code I am using. CommonOpenFileDialog folderDialog = new CommonOpenFileDialog();
folderDialog.InitialDirectory = "C:\\temp";
folderDialog.RestoreDirectory = true;
folderDialog.IsFolderPicker = true;
if (folderDialog.ShowDialog() == CommonFileDialogResult.Ok)
{
txtbx_save_as.Text = folderDialog.FileName;
}
Just to make sure, is this winforms or WPF?
Sorry to jump in on this. Yes, this is WinForms. I had the same issue in my application. Try rebuilding your application for .NET Framework >=4.7 with HighDPI awareness enabled in the app.config and manifest file.
I am having similar issue with .Net Framework 4.8. is there any update on this issue? @contre / @zizwiz