Incorrect Printer CurrentX and CurrentY

-1

enter image description here

About 10 years ago, the following code, could print "Test" exactly in x=0 and y=0.

But i don't know why in (Windows Xp Sp3) the x=0 is equal to x=10 and y=0 is equal to y=10 !

The printer device didn't change yet!

Can anyone help me?

Printer.ScaleMode = vbMillimeters
Printer.FontName = "Times New Roman"
Printer.FontSize = 7
Printer.FontBold = False
Printer.Orientation = 2
Printer.RightToLeft = False
Printer.FontItalic = False
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Print "Test"
Printer.EndDoc

Mahdi Jazini

Posted 2015-09-22T15:28:49.167

Reputation: 137

Answers

0

I have found the answer myself.

Just Change (Letter) To (A4) In the (Printer Preferences) in your operating system...

Look at the image i have attached to the message:

enter image description here

Mahdi Jazini

Posted 2015-09-22T15:28:49.167

Reputation: 137

0

I think 10 years ago you were using a different printer. With very few exceptions, printers have a non-printable area at the edge of the paper. With most lasers it's about 5mm, but some printers have larger print margins.

Windows normally will only try to print inside the printable area of the printer. That's where your 10mm comes from: your printer has 10mm margins

hdhondt

Posted 2015-09-22T15:28:49.167

Reputation: 3 244