whirl wrote:
Hi.
I really need some help on this one please.
I am trying to print a 12.1 x 12.1cm box to my printer.
I have found this code bit I just cant work out what the numbers mean. I
know they are something to do with X/Y coordinates but what do the values
actually mean .
Printer.Line (1000, 2000)-(5000, 4000), vbRed, B
Printer.EndDoc
What would I have to do to make the box 12.1 x 12.1 cm
Please help if you can
Look at methods/properties of Printer object...
Line....
(x1, y1) Optional. Single values indicating the coordinates of the
starting point for the line or rectangle. The ScaleMode property
determines the unit of measure used. If omitted, the line begins at the
position indicated by CurrentX and CurrentY.
The ScaleMode property syntax has these parts:
Part Description
object An object expression that evaluates to an object in the Applies
To list.
value An integer specifying the unit of measurement, as described in
Settings.
Settings
The settings for value are:
Constant Setting Description
vbUser 0 Indicates that one or more of the ScaleHeight, ScaleWidth,
ScaleLeft, and ScaleTop properties are set to custom values.
VbTwips 1 (Default) Twip (1440 twips per logical inch; 567 twips per
logical centimeter).
VbPoints 2 Point (72 points per logical inch).
VbPixels 3 Pixel (smallest unit of monitor or printer resolution).
vbCharacters 4 Character (horizontal = 120 twips per unit; vertical =
240 twips per unit).
VbInches 5 Inch.
VbMillimeters 6 Millimeter.
VbCentimeters 7 Centimeter.
Amazing what you can find in the online help... :)