Unicode Controls & Classes for VB6 - Version 4

clsFontHDC.SetFontToDCStdFont Method

Assign a standard VB6 font to a specified DC, internally creates a Windows font object

Syntax
Public Sub SetFontToDCStdFont (ByVal lHdc As Long, _
ByRef oFont As StdFont, _
Optional ByVal lForeColor As Long = -1&, _
Optional ByVal iQualityType As eFontHDCQualityType = efhat_default, _
Optional ByVal iCharWeightInc As Integer = 0, _
Optional ByVal bForce96DPI As Boolean = False)
Parameters
Parameter Description
ByVal lHdc As Long
ByRef oFont As StdFont
Optional ByVal lForeColor As Long = -1&
Optional ByVal iQualityType As eFontHDCQualityType = efhat_default
Optional ByVal iCharWeightInc As Integer = 0
Optional ByVal bForce96DPI As Boolean = False
Remarks
Dim oMemDC As clsMEMDC
Set oMemDC = New clsMEMDC
oMemDC.CreateDC UserControl.ScaleWidth, UserControl.ScaleHeight

Dim oFontToDC As clsFontHDC
Set oFontToDC = New clsFontHDC
oFontToDC.SetFontToDCStdFont oMemDC.Hdc, UserControl.Font