Solved

VB 6.0 printer.Papersize proble

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 45
mapShare challenge 13 69
eclipse package explorer vs project explorer view 2 33
Path to Python 9 48
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now