Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2004, 12:58 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to change printer orientation from vb6

Hello
In my visual basic 6 application, i am using datareport, its width is larger then the paper size ,so i need to change printer orientation to landscape.I am working on windows 2000 professional and printer is on network using with windows xp pc.

I tried pageset.exe, but it is giving runtime error 9 "script out of range", at line where pageset's object is trying to change orientation to land scap.

My application is on windows2000 professional and server is windows xp professional with the printer.

best regards from me
 
Old September 14th, 2004, 12:56 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

PARVEZ DONT ASK DIFFICULT QUESTIONS,SO THAT NO ONE REPLY YOU

Pkhussain
 
Old December 23rd, 2006, 09:13 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This issue is solved ny using page.dll from microsoft.com, it changes the print orientation from land escape to potrate and vise versa at runtime.

Pkhussain
 
Old January 3rd, 2007, 03:30 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Printer is by default class library for handling the printing stuff from the VB code. You don't need any extra dll to use. To my knowledge, most of the work can be accomplished by this printer object.

Use this...

Printer.Orientation = vbPRORPortrait OR vbPRORLandscape

CONSTANTS (by default, use as needed)
vbPRORPortrait = 1
vbPRORLandscape = 2

With Regards,
Raghavendra Mudugal





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Print using Dot Matrix printer in VB6.0 sabsait Pro VB 6 5 October 10th, 2009 03:17 PM
Change Printer at run time for crystal rpt, VB6.0 fiiyo ASP.NET 1.0 and 1.1 Basics 0 September 19th, 2006 06:58 AM
PrintPreviewDialog1. Change printer option peterasimpson VB How-To 0 July 24th, 2006 06:44 AM
Easiest way to change the orientation of a DGrid macupryk General .NET 1 October 7th, 2004 11:25 AM
How to change the default printer donrafeal Pro VB 6 4 April 27th, 2004 11:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.