PrintGetValidPrinters Method

Introduction

 

PrintGetValidDPIArray Method This function is for printing purposes


 

This method returns a SafeArray of possible DPI settings for a printer. The array is a one dimensional array that pairs the x and y DPIs together. The first element is the x DPI for the first available DPI setting, the second element is the y DPI for the first available DPI setting, the third is the x for the second DPI setting, etc.

 

Syntax

sArray = FlpGrf.PrintGetValidDPIArray

 

The PrintGetValidDPIArray Method has these parts:

Part

Description

FlpGrf

An object expression that evaluates the Flipper Graph Control object.

sArray

The safe array returned by the method.

 

Remarks

Use this method to get the possible resolutions of the printer. Then you can use PrintQuality and PrintYResolution to set the resolution of the printer.
This method returns a SafeArray. If your programming environment does not support SafeArray, you will not be able to use this method.
Here are examples on how to use SafeArrays in Visual Basic, MS Access, and Visual Fox Pro:
VB, MS Access

Dim aDPIArray As Variant
Dim X As Integer

aDPIArray = FlpGrf1.PrintGetValidDPIArray
For X = LBound(aDPIArray) To UBound(aDPIArray) Step 2
     xRes = aDPIArray(X) 'xresolution
     yRes = aDPIArray(X + 1) 'yresolution
Next X


Visual FoxPro

WITH THISFORM
     aDPIArray = FlpGrf1.PrintGetValidDPIArray
     nNumElements = ALEN(aDPIArray)
     For X = 1 To nNumElements
           xRes = aDPIArray(X) 'xresolution
           yRes = aDPIArray(X + 1) 'yresolution
     Next
ENDWITH

 


 

See Also

All Print Routines



PrintGetValidPrinters Method

 

 

Last modified on: Friday, August 16, 2002