473,379 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How to change the system default printer to Landscape system wide

I want to programmatically change the paper orientation of the systems
default printer in such a way that the new orientation shows for the printer
under:

Start/Printer and Faxes

Can anyone tell me how to do that?
I have some unmanaged code that no longer works for some unknown reason.

Thanks
Nov 21 '05 #1
2 2860
Dear ...?

On Fri, 3 Jun 2005 09:24:42 -0400
" Just Me" <gr****@a-znet.com> wrote:
I want to programmatically change the paper orientation of the systems
default printer in such a way that the new orientation shows for the printer


Same as Visual Basic 6.0's way. You should use Win32 API
"SetPrinter()". and check PRINTER_INFO_2.pDevMode.dmOrientation
member.

---
MVP kaok = MVP.ChangeMvpCategory("for C# 2004-2005.");
kaok.Web = "http://www.antoine.st/";

Nov 21 '05 #2
Thanks, I have it working
"Kaoru Kodaka" <ka**@venus.dti.ne.jp> wrote in message
news:20**********************@venus.dti.ne.jp...
Dear ...?

On Fri, 3 Jun 2005 09:24:42 -0400
" Just Me" <gr****@a-znet.com> wrote:
I want to programmatically change the paper orientation of the systems
default printer in such a way that the new orientation shows for the
printer


Same as Visual Basic 6.0's way. You should use Win32 API
"SetPrinter()". and check PRINTER_INFO_2.pDevMode.dmOrientation
member.

---
MVP kaok = MVP.ChangeMvpCategory("for C# 2004-2005.");
kaok.Web = "http://www.antoine.st/";

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tom Berry | last post by:
We currently are trying our first transformation from VB6 to VB.Net. Of course, the Printer object is gone, but I'm having trouble finding the replacement syntax necessary to perform similar...
0
by: hari krishna | last post by:
hi, i am using window.print to print some details that are fetched on to an ASPX page. since its a long list, it should be printed in Landscape. when window.print command is executed, a printer...
5
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is...
0
by: Marc Scheuner [MVP ADSI] | last post by:
Folks, How can I get the default printer (not just its name - the "whole" thing), and change its paper orientation to landscape? I'm trying to print a hosted HTML document (inside a web...
2
by: Sean McKaharay | last post by:
I want to find out how I can change the page orientation of a printer.
11
by: krishnamaddi | last post by:
Hi Friends, I am having some doubt. I want to print an ASP Page, for this i need to use java script. the problem is while printing if the line is too big, i can't print those data properly . i am...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
2
by: satnamsarai | last post by:
it is possible to change page orientation to landscape from asp.net page? I am using window.print() dialog to print a page and I would like that page to print automatically in landscape view.
3
drhowarddrfine
by: drhowarddrfine | last post by:
I have a simple vbscript that extracts a web page, saves it to a file, then uses notepad to print that file to the default printer. What can I do to make it print to a specified non-default printer?...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.