Solved

VB 6.0 printer.Papersize proble

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

Industry Leaders: 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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

756 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