private void btnfont_Click(object sender, EventArgs e)
{
try
{
if (fontDialog1.ShowDialog() == DialogResult.OK)
{
Font font = fontDialog1.Font;
TypeConverter tc = TypeDescriptor.GetConverter(typeof(Font));
string fontString = tc.ConvertToString(font);
txtFont.Text = fontString;
}
}
catch (Exception ex)
{
Utils.LogHandler.HandleError(ex);
}
}
No comments:
Post a Comment