How to set Printer.Height in WinXP through VB6

  • Thread starter k cb via AccessMonster.com
  • Start date
K

k cb via AccessMonster.com

Hi, all.

I am having troubles with changing paper size in VB6+WinXP.
I have the following code for testing.
'show current paper width and height
Debug.print Printer.Width
Debug.print Printer.Height

Printer.ScaleMode = vbInches
'change the paper size
Printer.Width = 12240 '8.5 inch
Printer.Height = 5700 '4 inch


The original paper size is A4. If things work out correctly, I should get
12240 and 5700 after change the paper size using Printer.Width and
Printer.Height. However, the paper size is still not the size I define
(8.5"x4")

The same piece of code run perfectly ok on a Win98 machine. I am woudering
if this is a bug in VB6. And in addition i know how to "Add a new form" -
in WinXp
through Printer->Server Property. I want to do it by code.

Thanks,

Kamalesh.
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top