private void AeroLabel_Paint(object sender, PaintEventArgs e) { if (null != ctr) { GlassText gt = new GlassText(); //gt.FillBlackRegion(ctr.CreateGraphics(), this.ClientRectangle); //Brush b = Brushes.Transparent; //e.Graphics.Clear(Color.Transparent); //e.Graphics.FillRectangle(b, this.Bounds); gt.DrawTextOnGlass(ctr.Handle, this.Text, this.Font, this.Bounds, 10); } }
private void fMain_Paint(object sender, PaintEventArgs e) { if (GlassText.IsCompositionEnabled()) { e.Graphics.Clear(Color.Black); Rectangle clientArea = new Rectangle(0, pnlTop.Height, this.ClientRectangle.Width, this.ClientRectangle.Height - pnlTop.Height); Brush b = new SolidBrush(this.BackColor); e.Graphics.FillRectangle(b, clientArea); GlassText glasstxt = new GlassText(); glasstxt.FillBlackRegion(pnlTop.CreateGraphics(), pnlTop.ClientRectangle); glasstxt.DrawTextOnGlass(pnlTop.Handle, lblAppTitle.Text, lblAppTitle.Font, lblAppTitle.Bounds, 5); } }