FIX: Changing Default Printer Doesn't Effect Printer.Fonts (99705)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q99705 SYMPTOMS
If you change the default printer at run time, the Printer.Fonts
enumeration is not updated. The Printer.Fonts enumeration is updated only
after you print to the new default printer and use the EndDoc method.
WORKAROUND
To work around to this bug, choose one of these techniques:
- Use Printer.Print "" followed by Printer.EndDoc
- Call a DLL function which in turn calls the Windows API function
EnumFontFamilies or EnumFonts. For a DLL code sample that shows how
to enumerate fonts from a DLL, query on the following words in the
Microsoft Knowledge Base:
EnumFontFamilies AND EnumFonts
A disadvantage in using workaround 1 is that it will always cause a blank
page to be ejected. A disadvantage of workaround 2 is that you will need
to write a DLL using other Windows programming tools such as Microsoft
Visual C++.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been corrected in Visual
Basic version 4.0.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbbug kbfix kbprint KB99705 |
---|
|