Solved

VB 6.0 printer.Papersize proble

Posted on 2004-03-23
5
5,392 Views
Last Modified: 2011-10-03
HI All

In vb6.0
printer.papersize=256 ' User Define

Statement working fine in all other Window O/s other then
Window2000.Displaying "Invalid Property" Error Message.

Dear friedns I'm expecting your Help.
Advance Thanks for your Help
0
Comment
Question by:newmancroos_s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 50 total points
ID: 10665024
1. I've used W2000 and you can't do the "Printer.PaperSize = 256". So, If you want it to be usable on both systems then you need to code in an error trap:

   Printer.ScaleMode = vbInches
   Printer.ScaleHeight = 11
   Printer.ScaleWidth = 8

   On Error Goto PaperErr
   Printer.Papersize=256
   On Error Goto <your original error handler>

   Printer.EndDoc
   Exit Sub
   
<your original error handler>:
   Exit Sub
PaperErr:
   If Err.Number = 380 Then Resume Next
   Resume <your original error handler>
   
2. It'll only mean centimetres if you do:
   Printer.ScaleMode = vbCentimeters
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 10665025
HOWTO: Find PaperSize for Custom Print Sizes Under Windows NT and Windows 2000
http://support.microsoft.com/?kbid=304639
0
 

Author Comment

by:newmancroos_s
ID: 10674348
I Already completed the project in VB6.0 and it is running under Windows98 correctly.We have used many preprinted reports.when we run under window2000,we try to reomve  the papersize=256 but the alignment is changed.
Please help me to do this in windows2000 without change the alignment

Thanking you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question