Public Shadows Property ControlFont() As stdole.IFontDisp Get Dim fntTmp As New Drawing.Font(MyBase.Font.Name, MyBase.Font.Size, MyBase.Font.Style, _ System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Return ActiveXControlHelpers.GetIFontDispFromFont(fntTmp) End Get Set(ByVal value As stdole.IFontDisp) MyBase.Font = ActiveXControlHelpers.GetFontFromIFontDisp(value) End Set End Property
Get
System.Drawing.GraphicsUnit.Point,
Set(ByVal value As stdole.IFontDisp)
MyBase.Font = ActiveXControlHelpers.GetFontFromIFontDisp(value)
End Set
Friend Shared Shadows Function GetFontFromIFontDisp(ByVal obj As Object) As Font Return AxHost.GetFontFromIFontDisp(obj) End Function Friend Shared Shadows Function GetFontFromIFont(ByVal obj As Object) As Font Return AxHost.GetFontFromIFont(obj) End Function Friend Shared Shadows Function GetIFontDispFromFont(ByVal font As Font) As stdole.IFontDisp Return TryCast(AxHost.GetIFontDispFromFont(font), stdole.IFontDisp) End Function