Is there a reason you must use the API? Search VB help for "fonts". Unless you have an odd requirement, this task is best performed using ordinary calls in VB.
I was going to use the Printer or Screen object to retreive the system fonts, but I prefer to use an API Call to get them. Do you know if there is any such function?
hmmm . . . I have to agree with Alt255 on this one . . . why would you want to use an API for this? But if you really want to, check this one out . . .
Private Declare Function EnumFontFamiliesEx Lib "gdi32" Alias "EnumFontFamiliesExA" (ByVal hdc As Long, lpLogFont As LOGFONT, ByVal lpEnumFontProc As Long, ByVal lParam As Long, ByVal dw As Long) As Long
API Description EnumFontFamiliesEx enumerates all fonts installed in the system that match the font characteristics specified by a given LOGFONT structure. This function enumerates fonts based on a typeface name, character set, or both. This function, rather than EnumFontFamilies, is recommended for Win32-based applications.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.