Unicode Controls & Classes for VB6 - Version 4

clsFontHDC Class

Permits you to assign a custom font to a specified Windows Device Contect
Automatically destroys the created font and restores the old one on the DC when terminates

Enums
Name Description
eFontHDCQualityType Font quality type
Events
Name Description
Properties
Name Type Description
hFont (Long) Gets the internal font handle
Methods
Name Type Description
Destroy Free resources used by this class, deletes created font handle and assign the original font to the used DC
SetFontToDC Create a font object and assign it to the specified Device Context
SetFontToDCStdFont Assign a standard VB6 font to a specified DC, internally creates a Windows font object
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