I removed backColor from the form and added a pictureBox. After that I'm trying to draw a string. But It looks really ugly with these white pixels. Could y'all help me, please?

Here is a screenshot of the problem: https://i.stack.imgur.com/MKJS5.png

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    {
        e.Graphics.DrawString("Hello World!", new Font("Microsoft Sans Serif", 20f), new SolidBrush(Color.Black), 20, 20);
    }
}
1

There are 1 best solutions below

0
Corpus On BEST ANSWER

Thank y'all so much! I've solved the problem with:

e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;