If I have made a form with multiple labels (some dynamic labels) how can I add Anti aliasing to the labels and remove/ make the form background transparent.
Also how do I make the form background invisible so its just the labels left?
(I experimented with some stuff that are commented out in the code, that's somewhat works)*
Using visual studio
Currently how it is:
How I want it to be:
C#
using System;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
using System.Threading;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
Thread thread1;
public Form1()
{
InitializeComponent();
/*// Problem code:
this.Paint += new System.Windows.Forms.PaintEventHandler(this.SmoothingFonts_Paint);
//end*/
thread1 = new Thread(new ThreadStart(Thread_test));
thread1.IsBackground = true;
thread1.Start();
}
public void Thread_test()
{
int i = 0;
while (true)
{
i++;
label2.Text = Convert.ToString(i);
Thread.Sleep(1000);
}
}
/*//Problem code:
private void SmoothingFonts_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Font TextFont = new Font("Segoe UI", 48, FontStyle.Bold);
Color myColor = Color.FromArgb(30, 35, 42);
SolidBrush myBrush = new SolidBrush(myColor);
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
e.Graphics.DrawString("TestTEXT 2", TextFont, myBrush, 20, 20);
}
//end*/
}
}