本文整理匯總了C#中System.Drawing.Font.Height屬性的典型用法代碼示例。如果您正苦於以下問題:C# Font.Height屬性的具體用法?C# Font.Height怎麽用?C# Font.Height使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Drawing.Font
的用法示例。
在下文中一共展示了Font.Height屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FontConstructor3
//引入命名空間
using System;
using System.Drawing;
using System.Windows.Forms;
public class FontConstructor3 : Form
{
public FontConstructor3()
{
Text = "Font Constructor";
Size = new Size(350,200);
FontFamily ff = new FontFamily("Times New Roman");
Font fnt = new Font(ff, 12, FontStyle.Bold | FontStyle.Italic);
Font = fnt;
RichTextBox rtxt = new RichTextBox();
rtxt.Text = "first line.\n" +
"This is a second line of text.";
rtxt.Text += "\nFont Name:\t" + Font.Name;
rtxt.Text += "\nFont Family:\t" + Font.FontFamily;
rtxt.Text += "\nFont Styles:\t" + Font.Style;
rtxt.Text += "\nFont Size:\t" + Font.Size;
rtxt.Text += "\nFont Height:\t" + Font.Height;
rtxt.Text += "\nFont Units:\t" + Font.Unit;
rtxt.Multiline = true;
rtxt.Dock = DockStyle.Fill;
rtxt.Parent = this;
}
static void Main()
{
Application.Run(new FontConstructor3());
}
}