473,513 Members | 3,895 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9221
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1991
by: Tom Berry | last post by:
We currently are trying our first transformation from VB6 to VB.Net. Of course, the Printer object is gone, but I'm having trouble finding the replacement syntax necessary to perform similar actions or set variables. We are interested in doing this inline (no pop-up dialog box). Specifically, where how would I replace the following...
0
2190
by: yulyos | last post by:
Hi, printing to the printer with vb.net from right to left how do i print to the printer from right to left with vb.net example in vb6: Printer.RightToLeft = True
1
5106
by: Sanjoy GuhaRoy via DotNetMonster.com | last post by:
I want to know what is the corresponding printer object of VB6 in VB.Net In VB 6 printer object was default and we could use it and call all its methods like 1.Printer.PaperSize 2.Printer.DrawWidth 3.Printer.Line How to use them in VB.Net if some can let me with some examples -- Message posted via http://www.dotnetmonster.com
11
9855
by: pamelafluente | last post by:
I am doing my own PrintDialog, and have placed there a combo with the printer names, as in the PrintDialog provided by VB.NET. Here is the question: how do I open the native windows printer dialog for the current printer, so that my current PrintDocument.PrinterSettings will be set according to the User choices ? Thanks -Pamela
0
939
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database and is unformatted. I display the text to my user in the listview. The textbox I create logically in the program, and I initialize the correct...
12
20379
by: lifeshortlivitup | last post by:
Hello all....I am brand new to this whole Java environment and have become stumped with an early homework assignment. It sounds simple enough, but after hours and hours of working on it I can't get it to give me the correct output. The problem calls for me to enter a four digit number and the number then needs to be output one digit per line...
5
1776
by: silvergost | last post by:
<?php int DMYToExcelSerialDate(int nDay, int nMonth, int nYear) { // Excel/Lotus 123 have a bug with 29-02-1900. 1900 is not a // leap year, but Excel/Lotus 123 think it is... if (nDay == 29 && nMonth == 02 && nYear==1900) return 60; // DMY to Modified Julian calculatie with an extra substraction of 2415019.
2
3394
by: wassimdaccache | last post by:
Dear all I am using windows server 2003 sp1. I am connecting a printer called BIRCH prp080 to my pc using the serial port. the printer is working well when I install the driver but the problem is when I restart the computer the printer won't work. Right click properties in my printer driver will show me the message below The...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.