Solved

VB 6.0 printer.Papersize proble

Posted on 2004-03-23
5
5,396 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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…
Progress

707 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