Answer the question
In order to leave comments, you need to log in
How to flatten all objects on a form (winforms)?
How can I smooth all objects on the form? Moreover, during editing everything looks fine, but at startup it turns out terrible pixelation. Making a smoothed User Control for each element is not an option. I want to do everything at
once
. Do not offer.
Answer the question
In order to leave comments, you need to log in
I found how to fix the problem (maybe someone will need it).
You just need to optimize for a high DPI value.
In Program.cs we write:
[STAThread]
static void Main() {
if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MyForm()); //редактируем как нужно
}
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question