Я написал этот фрагмент кода, но не уверен, что сделаю это. правильный путь:
Код: Выделить всё
Bitmap b = new Bitmap(pictureBox1.Width, pictureBox1.Height);
Graphics g = Graphics.FromImage(b);
g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height)); // i used this code to make the background color white
g.DrawString("some text", new Font("Times New Roman", 20), new SolidBrush(Color.Red), new PointF(10, 10));
pictureBox1.Image = b;
Есть ли способ изменить цвет фона без перерисовки текста?
Подробнее здесь: https://stackoverflow.com/questions/305 ... -draw-text