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

Name Description
eFontHDCQualityType Font quality type
Name Description
Name Type Description
hFont (Long) Gets the internal font handle
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
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