Set a control font with FontDialog
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| C# Code Snippets |
| See also |
| edit |
This C# code snippet sets the font in a forms control using the FontDialog class.
using System.Windows.Forms; ... FontDialog fontDialog = new FontDialog(); if ( fontDialog.ShowDialog() != DialogResult.Cancel ) { textBox.Font = fontDialog.Font; }