PDA

View Full Version : Problem with changing paper size in VB6+WinXP


kdotb
08-09-2005, 05:27 AM
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 = 5760 '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.
kamalesh_cb@yahoo.com

BigIke
08-09-2005, 05:37 AM
Maybe you're reffering to Visual Basic? This is a support forum for vBulletin, a forum software.