469,082 Members | 1,134 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,082 developers. It's quick & easy.

Printer.line Help Please.

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

Ian
Jul 17 '05 #1
2 8621
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... :)
Jul 17 '05 #2
"whirl" <wh***@whirl.org.uk> wrote in message
news:Zy********************@news-lhr.blueyonder.co.uk...
I really need some help on this one please.
I am trying to print a 12.1 x 12.1cm box to my printer.


Printer.ScaleMode = vbCentimeters
Printer.Line (0, 0)-(12.1, 12.1), vbRed, B

Mike


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tom Berry | last post: by
1 post views Thread by Sanjoy GuhaRoy via DotNetMonster.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.