new Font(fontRegular, FontStyle.Italic); : Font : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Font »

 

new Font(fontRegular, FontStyle.Italic);








    
 


using System;
using System.Drawing;
using System.Windows.Forms;

class BoldAndItalic : Form {
    public static void Main() {
        Application.Run(new BoldAndItalic());
    }
    public BoldAndItalic() {
        Text = "Bold and Italic Text";
        ResizeRedraw = true;
    }
    protected override void OnPaint(PaintEventArgs pea) {
        DoPage(pea.Graphics, ForeColor, ClientSize.Width, ClientSize.Height);
    }
    protected void DoPage(Graphics grfx, Color clr, int cx, int cy) {

        float x = 0;
        float y = 0;

        grfx.DrawString("text", new Font(this.Font, FontStyle.Bold), new SolidBrush(Color.AliceBlue), x, y);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Font