I'm working on a Windows Forms app in Visual Studio 2022. I've recently upgraded the framework from .NET 4 to .NET 8 and started development on another (Win11) laptop I haven't used before.
Just noticed that, when running my app (either in Debug
or Release
mode), after I stop the run process, the Visual Studio's designer gets stuck for a couple of seconds (4-5) before it increases the width of my form. Not drastically, but something noticeable, as my components aren't aligned anymore.
I am also using Krypton for my components, including my form. This means that my form inherits not from the vanilla Form
, but from the KryptonForm
class. However, I'm not sure if this has any influence on the outcome.
Read a similar question on SO, and it was stated that the problem may be from the AutoScaleMode
, to be found under my MainForm.Designer.cs
. The flag was indeed set to AutoScaleMode.Dpi
, but even after replacing it with AutoScaleMode.Font
or even AutoScaleMode.None
, the form continued to grow up.
This doesn't only happen at runtime, but also when I (completely) close the designer tab of my form and reopen it. 3-4 seconds of delay, while the form gets resized and I can get back to my job.
I don't think pictures are necessary, but let me know if you need additional information (such as properties, code, etc.).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744895999a4599700.html
评论列表(0条)