Returns the number of pixels per twip or twips per pixel for Screen, Form and Printer object.
# = object.PixelsPerTwipX # = object.PixelsPerTwipY
# = form.TwipsPerPixelX # = form.TwipsPerPixelY # = Printer.TwipPerPixelX # = Printer.TwipPerPixelY
object | : Screen, Form, Printer |
form | : Screen, Form |
These properties return the number of pixels per twip or twips per pixel for the device of the Screen, a Form, or a Printer. For instance, for a Printer object, twips per pixel are 4.8 for 300dpi (1440/300), 2.4 for 600dpi (1440/600), 2.0 for 720 dpi (1440/720), 0.5 for 2880 dpi (1440/2880)
Note: For the Printer object the last two properties are TwipPerPixelX and TwipPerPixelY (the 's' after Twip is omitted) but they perform the same function.
Debug.Show
OpenW 1
Trace Me.PixelsPerTwipX
Trace Me.PixelsPerTwipY
Trace Me.TwipsPerPixelX
Trace Me.TwipsPerPixelY
Trace Screen.PixelsPerTwipX
Trace Screen.PixelsPerTwipY
Trace Screen.TwipsPerPixelX
Trace Screen.TwipsPerPixelY
SetPrinterHDC Printer.hDC
Trace Printer.PixelsPerTwipX
Trace Printer.PixelsPerTwipY
Trace Printer.TwipPerPixelX
Trace Printer.TwipPerPixelY
A form is part of the screen, and is actually a property of the Screen object (Screen.Forms), and thus returns the same values.
1 Twip (the base unit of GFA-BASIC 32 OLE) is 1/20 Point = 1 /1440 inch.
{Created by Sjouke Hamstra; Last updated: 03/03/2018 by James Gaite}