473,563 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change the system default printer to Landscape system wide

I want to programmaticall y 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 2869
Dear ...?

On Fri, 3 Jun 2005 09:24:42 -0400
" Just Me" <gr****@a-znet.com> wrote:
I want to programmaticall y 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.dmOrie ntation
member.

---
MVP kaok = MVP.ChangeMvpCa tegory("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 programmaticall y 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.dmOrie ntation
member.

---
MVP kaok = MVP.ChangeMvpCa tegory("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
1999
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 actions or set variables. We are interested in doing this inline (no pop-up dialog box). Specifically, where how would I replace the following...
0
554
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 settings dailogue box is appeared and need to set the orientation to landscape. I need to give my user a facility to print it in Landscape...
5
7113
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 the printer destination for special reports such as stickers and mailing labels. The Mailing Label report is, of course, designed here for a...
0
2502
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 browser control), and I can't seem to find a way to make sure the bloody thing prints in landscape....... Any pointers welcome!!
2
13621
by: Sean McKaharay | last post by:
I want to find out how I can change the page orientation of a printer.
11
2222
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 losing some data in the last. What i want is if at all, the line is big, it should take landscape proprety in place of Portrait.. Does anyone...
7
20690
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 printer's physical margins using VB coding? Cheers -- Osmotion Blue
2
4379
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
4133
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? txtfile.WriteLine(xmlhttp.responseText) txtfile.Close 'enable this to print 'oWS.Run "NotePad.exe /p " + path ...
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.