FontFamily.GetName メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As FontFamily Dim language As Integer Dim returnValue As String returnValue = instance.GetName(language)
戻り値
この FontFamily の名前を指定の言語で表す String。

ニュートラル言語を指定するには、language パラメータに 0 を指定します。使用できる言語とサブ言語の一覧については、Winnt.h ヘッダー ファイルを参照してください。Visual Studio をインストールしている場合、このヘッダー ファイルは、通常、Visual Studio のインストール ディレクトリを基準としたディレクトリ (\\VC\PlatformSDK\Include) にあります。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub GetName_Example(ByVal e As PaintEventArgs) ' Create a FontFamily object. Dim myFontFamily As New FontFamily("Arial") ' Get the name of myFontFamily. Dim familyName As String = myFontFamily.GetName(0) ' Draw the name of the myFontFamily to the screen as a string. e.Graphics.DrawString("The family name is " & familyName, _ New Font(myFontFamily, 16), Brushes.Black, New PointF(0, 0)) End Sub
public void GetName_Example(PaintEventArgs e) { // Create a FontFamily object. FontFamily myFontFamily = new FontFamily("Arial"); // Get the name of myFontFamily. string familyName = myFontFamily.GetName(0); // Draw the name of the myFontFamily to the screen as a string. e.Graphics.DrawString( "The family name is " + familyName, new Font(myFontFamily, 16), Brushes.Black, new PointF(0, 0)); }
public: void GetName_Example( PaintEventArgs^ e ) { // Create a FontFamily object. FontFamily^ myFontFamily = gcnew FontFamily( "Arial" ); // Get the name of myFontFamily. String^ familyName = myFontFamily->GetName( 0 ); // Draw the name of the myFontFamily to the screen as a string. e->Graphics->DrawString( String::Format( "The family name is {0}", familyName ), gcnew System::Drawing::Font( myFontFamily,16 ), Brushes::Black, PointF(0,0) ); }
public void GetName_Example(PaintEventArgs e) { // Create a FontFamily object. FontFamily myFontFamily = new FontFamily("Arial"); // Get the name of myFontFamily. String familyName = myFontFamily.GetName(0); // Draw the name of the myFontFamily to the screen as a string. e.get_Graphics().DrawString("The family name is " + familyName, new Font(myFontFamily, 16), Brushes.get_Black(), new PointF(0, 0)); } //GetName_Example

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からFontFamily.GetName メソッドを検索する場合は、下記のリンクをクリックしてください。

- FontFamily.GetName メソッドのページへのリンク