Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"No Fonts Installed" (Common Dialog)

Status
Not open for further replies.

klibby

Programmer
May 30, 2001
51
0
0
US
I've had this problem before a long time ago... but I forgot how i fixed it...

My problem is that when I go to use a common dialog...
-----------
With ComDlg
.ShowFont
Fontname = .FontName
End With
-----------

When it gets to .ShowFont, it gives me an error saying:
"There are no fonts installed.
Open the Fonts folder from the Control Panel to install fonts."

Even though, I check in fonts in control panel and sure enough, there they are, I can use them in any other app.... and I can change fonts in say labels and textboxes in the same VB program.... I just cant use the fonts using a common dialog


Any clues on how to fix this?

 
Here is an excerpt from MSDN:

Before you use the ShowFont method, you must set the Flags property of the CommonDialog control to one of three constants or values: cdlCFBoth or &H3, cdlCFPrinterFonts or &H2, or cdlCFScreenFonts or &H1. If you don't set Flags, a message box is displayed advising you that "There are no fonts installed," and a run-time error occurs.

Josh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top