Share via


Printer.Fonts Property (Int32)

 

Gets all font names that are available for the current printer.

Namespace:   Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

public string this[
    int index
] { get; }
public:
property String^ default[
    int index
] {
    String^ get(int index);
}
member Fonts : 
        index:int -> string with get
Public ReadOnly Property Fonts (
    index As Integer
) As String

Parameters

  • index
    Type: System.Int32

    The index of the font within the collection.

Property Value

Type: System.String

Returns a String.

Remarks

The Fonts property works together with the FontCount property, which returns the number of font names available for the Printer object. Fonts available in Visual Basic vary according to the computer configuration, display devices, and printing devices. Use both the Fonts and the FontCount properties to obtain information about printer fonts.

Note

The order of fonts returned by Fonts may be different than the order returned by Visual Basic 6.0.

Note

Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Examples

The following example demonstrates how to retrieve the Fonts property values.

Dim Printer As New Printer
Dim i As Integer
For i = 0 To Printer.FontCount - 1
    Printer.Print(Printer.Fonts(i))
Next
Printer.EndDoc()

See Also

Printer Class
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace

bc1bcb98-e13b-4c68-a514-045c042dbf364e434922-3709-49c6-a69d-38120ed72d7a7f9351ea-cb3e-4615-8f70-5a29c165c1a7

Return to top