Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 13th, 2004, 12:58 AM
Registered User
 
Join Date: May 2004
Location: Riyadh, Riyadh, Saudi Arabia.
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
Reply With Quote
  #2 (permalink)  
Old September 14th, 2004, 12:56 AM
Registered User
 
Join Date: May 2004
Location: Riyadh, Riyadh, Saudi Arabia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Pkhussain
Reply With Quote
  #3 (permalink)  
Old December 23rd, 2006, 09:13 AM
Registered User
 
Join Date: May 2004
Location: Riyadh, Riyadh, Saudi Arabia.
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
Reply With Quote
  #4 (permalink)  
Old January 3rd, 2007, 03:30 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:17 AM.


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