我在一個項目上工作,因爲我使得我的窗口不透明。在該標籤文本中的一個標籤由動態設置。設置文本後顯示如下圖像。標籤中的文本以窗口形式顯示不正確
在於88
是通過動態地設置文本的標籤。
和你好窩是由我作爲解決方案的一部分嘗試,但它不工作,它的代碼是在下面。
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Bitmap bitmap = new Bitmap(this.Width, this.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bitmap);
g.Clear(Color.Empty);
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
g.DrawString("hello world", new Font(this.Font.FontFamily, 48), Brushes.Blue, new Point(50, 50));
e.Graphics.DrawImage(bitmap, new Point(0, 0));
}
但也看起來像標籤文本。 i want label text like clear type text please help me for it.
它顯示爲像以前一樣的結果。 – Archit