ESRI.ArcGIS.ADF.Local
GetIFontDispFromFont Method
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.COMSupport Namespace > OLE Class : GetIFontDispFromFont Method




font
A Font object.
The GetIFontDispFromFont method can be used to convert an existing .NET System.Drawing.Font object into a Stdole.StdFont object.

Syntax

Visual Basic (Declaration) 
Public Shared Function GetIFontDispFromFont( _
   ByVal font As Font _
) As Object
Visual Basic (Usage)Copy Code
Dim font As Font
Dim value As Object
 
value = OLE.GetIFontDispFromFont(font)
C# 
public static object GetIFontDispFromFont( 
   Font font
)

Parameters

font
A Font object.

Return Value

A stdole.StdFont object.

Example

[C#]
[Visual Basic .NET]
C#Copy Code
System.Drawing.Font dotNetFont = new System.Drawing.Font("Castellar", 25.0F); 

ESRI.ArcGIS.Display.ITextSymbol textSym = new ESRI.ArcGIS.Display.TextSymbolClass() as ESRI.ArcGIS.Display.ITextSymbol; 

textSym.Font = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIFontDispFromFont(dotNetFont) as stdole.IFontDisp;
C#Copy Code
Dim dotNetFont As New System.Drawing.Font("Castellar", 25.0F) 

Dim textSym As ESRI.ArcGIS.Display.ITextSymbol = New ESRI.ArcGIS.Display.TextSymbolClass 

textSym.Font = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIFontDispFromFont(dotNetFont)

See Also

© 2010 All Rights Reserved.