[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB 6.0 printer.Papersize proble

Posted on 2004-03-23
5
Medium Priority
?
5,410 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
3 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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

864 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