This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Create Default FontDisp Snippet (ArcObjects .NET 10.4 SDK) |
Generate a default FontDisp object.
///<summary>Generate a default FontDisp object.</summary> /// ///<returns>An stdole.IFontDisp interface</returns> /// ///<remarks></remarks> public stdole.IFontDisp CreateDefaultFontDisp() { stdole.IFontDisp fontDisp=new stdole.StdFontClass() as stdole.IFontDisp; // Dynamic Cast fontDisp.Bold=false; fontDisp.Name="Arial"; fontDisp.Italic=false; fontDisp.Underline=false; fontDisp.Size=16; return fontDisp; }
'''<summary>Generate a default FontDisp object.</summary> ''' '''<returns>An stdole.IFontDisp interface</returns> ''' '''<remarks></remarks> Public Function CreateDefaultFontDisp() As stdole.IFontDisp Dim fontDisp As stdole.IFontDisp=CType(New stdole.StdFont, stdole.IFontDisp) ' Explicit Cast With fontDisp .Bold=False .Name="Arial" .Italic=False .Underline=False .Size=16 End With Return fontDisp End Function