Get the font in a FontDialog : Font Dialog : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Font Dialog »

 

Get the font in a FontDialog








    
 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


public class MainClass {
    private FontDialog fontDlg = new FontDialog();
    private Font currFont = new Font("Times New Roman", 12);

    public static void Main() {
        FontDialog fontDlg = new FontDialog();
        if (fontDlg.ShowDialog() != DialogResult.Cancel) {
            Console.WriteLine(fontDlg.Font);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Font Dialog