473,811 Members | 2,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

winforms - change the default printer

Friends,

I need to change the default printer from code, with no
user iterativity. Any sample code? suggestion? C#,VB,
nevermind!.

Thanks
Pablo
Nov 20 '05 #1
2 7752
Hello,

"Pablo" <t-******@infocorp .com.uy> schrieb:
I need to change the default printer from code, with no
user iterativity. Any sample code? suggestion? C#,VB,
nevermind!.


A (untested) sample written in C (it will give you an idea on how to change
the default printer):

HOWTO: Retrieve and Set the Default Printer in Windows
http://support.microsoft.com/default...;EN-US;Q246772

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
Thanks for answering,
Anyway, if u have other suggestion please let me know.
Pablo.
-----Original Message-----
Hello,

"Pablo" <t-******@infocorp .com.uy> schrieb:
I need to change the default printer from code, with no
user iterativity. Any sample code? suggestion? C#,VB,
nevermind!.
A (untested) sample written in C (it will give you an

idea on how to changethe default printer):

HOWTO: Retrieve and Set the Default Printer in Windows
http://support.microsoft.com/default.aspx?scid=kb;EN- US;Q246772
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
.

Nov 20 '05 #3

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

Similar topics

0
957
by: Pablo | last post by:
Friends, I need to change the default printer from code, with no user iterativity. Any sample code? suggestion? C#,VB, nevermind!. Thanks Pablo
5
7127
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 specific printer (Mailing Label). At another site, the name could be completely different. Other than...
1
1673
by: Pablo | last post by:
Friends, I need to change the default printer from code, with no user iterativity. Any sample code? suggestion? C#,VB, nevermind!. Thanks Pablo
1
12226
by: goJoe | last post by:
Hello! i amn trying to add a Visuail basic 6 code to an excisting code that has the purpose to change the current default printer to another printer by name and then after the printer to change back to the old default printer again... Anyone knows how to do this easy??
1
18378
by: PCB | last post by:
Hi all! I have a subroutine that prints reports on a specific printer. The code works fine as long as all the printers available to the computer are on the network. However, if the computer also has a local printer, the report is prints locally. What I'm I doing wrong! The complete subroutine follows: Private Sub PrintReport(strReportName As String) On Error GoTo PrintReport_Err
7
20737
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
0
1706
by: elbetzio | last post by:
Evening, I've got a highly irritating bug with the reportviewer control that appears to be a show-stopper for one of our bigger applications we're writing. When I try and print more than 1 page of any given report, I the application hangs, a Window comes up saying "printing page 2 of y", and after a period of waiting for the mysterious page to print, VS2005 throws the following error:
8
2889
by: Phil Stanton | last post by:
Using Access 2000 (Yes I know there is no Printer specified) and an MDE File (Yes I know I can't open a report in design view). Is there any way using VBA of temporarily changing the report's printer from the default printer for that report to a PDF995 printer (so that i can print it to a file for subsequent emailing) then back to the default Epsom 830 printer? Thanks for any help Phil
0
1422
by: AP | last post by:
I have had this before in the past and just ignored it, but now I need a solution. Basically, using ACC2003 if I have one particular printer as the default, the reports will not open in design, preview, or print mode. If I change my default printer to some other printer it will work. Interesting point also is that I can print to the original printer as long as it is not set as the default?
0
9734
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10653
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7674
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5564
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4352
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
2
3876
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.