473,326 Members | 2,076 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,326 software developers and data experts.

Changing default printer

How can I change by program the default printer in VB.net if I have two
printers connected in one computer?
I want to print diferents reports in diferents printers connected in one
computer and I want to change the default printer depending of the report.

Please help us.
Rigoberto
Nov 21 '05 #1
6 6694
I'm not sure if this helps:

Add a pagesetup dialog to your form

Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem18.Click
'page setup
PageSetupDialog1.Document = PrintDocument2
PageSetupDialog1.Document.DefaultPageSettings.Colo r = False
PageSetupDialog1.Document.DefaultPageSettings.Land scape = True
PageSetupDialog1.ShowNetwork = True
PageSetupDialog1.PrinterSettings.PrinterName = "Acrobat PDFWriter"
PageSetupDialog1.ShowDialog()
End Sub

"rquintana" wrote:
How can I change by program the default printer in VB.net if I have two
printers connected in one computer?
I want to print diferents reports in diferents printers connected in one
computer and I want to change the default printer depending of the report.

Please help us.
Rigoberto

Nov 21 '05 #2
"rquintana" <rq*******@discussions.microsoft.com> schrieb:
I want to print diferents reports in diferents printers connected in one
computer and I want to change the default printer depending of the report.


See (complete thread):

<URL:http://groups.google.de/groups?threadm=%23Cv9v3W%24EHA.208%40TK2MSFTNGP12. phx.gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Mr MVP,

Why did you point the user to that page when the bottom Microsoft article is
in VB 6 & you aren't prepared to convert it to VB.NET?

On last question: Will you put my name forward for the MVP program, as I
have been programming for 25 years in Assembly, C, C++, a little HTML/ASP, VB
3 - VB.NET & a little C#? 99.9% (18 hours a day approx.) of my time spent
coding in VB.NET.

"Herfried K. Wagner [MVP]" wrote:
"rquintana" <rq*******@discussions.microsoft.com> schrieb:
I want to print diferents reports in diferents printers connected in one
computer and I want to change the default printer depending of the report.


See (complete thread):

<URL:http://groups.google.de/groups?threadm=%23Cv9v3W%24EHA.208%40TK2MSFTNGP12. phx.gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
Mr MVP,
My name is Herfried.
Why did you point the user to that page when the bottom Microsoft article
is
in VB 6 & you aren't prepared to convert it to VB.NET?
Even MVP's days only have 24 hours.
On last question: Will you put my name forward for the MVP program, as I
have been programming for 25 years in Assembly, C, C++, a little HTML/ASP,
VB
3 - VB.NET & a little C#? 99.9% (18 hours a day approx.) of my time spent
coding in VB.NET.


For being awarded as an MVP, it does not matter how many hours a day one
spends using a certain product or how many "languages" one speaks.

How do I become an MVP?
<URL:http://mvps.org/about/mvp.html>

More information on the MVP program:

<URL:http://mvp.support.microsoft.com/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
I have read those articles & have also e-mailed the webmaster some time ago.
See below:

Thank you for interest in the Microsoft Most Valuable Professional (MVP)
Program.
MVPs are a diverse group of individuals from around the world who have two
things in common – expertise in one or more of Microsoft’s products or
technology areas, and a willingness to share their knowledge and their
experiences with others.
If you would you like to be considered, please send us the following
information:
First Name, Last Name
Email address, and/or online alias
Product or Technology of expertise:
Where we can find you, or your nominee (e.g. newsgroup, web site, message
board, book, magazine, school, conference, etc.)
Mail the above information to mv***@microsoft.com
Kindest Regards,
MVP Global Administrator
mv***@microsoft.com

I spend around 18 hours a day either programming or programming/answering
questions in the forums & have done since 1997. So, I think I am in it for
the long haul, don't you?

"Herfried K. Wagner [MVP]" wrote:
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
Mr MVP,


My name is Herfried.
Why did you point the user to that page when the bottom Microsoft article
is
in VB 6 & you aren't prepared to convert it to VB.NET?


Even MVP's days only have 24 hours.
On last question: Will you put my name forward for the MVP program, as I
have been programming for 25 years in Assembly, C, C++, a little HTML/ASP,
VB
3 - VB.NET & a little C#? 99.9% (18 hours a day approx.) of my time spent
coding in VB.NET.


For being awarded as an MVP, it does not matter how many hours a day one
spends using a certain product or how many "languages" one speaks.

How do I become an MVP?
<URL:http://mvps.org/about/mvp.html>

More information on the MVP program:

<URL:http://mvp.support.microsoft.com/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
Crouchie,

"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
I spend around 18 hours a day either programming or programming/answering
questions in the forums & have done since 1997. So, I think I am in it for
the long haul, don't you?


I am not able to decide who is awarded and who not. From my own experience,
I can only tell you that it took more than a half year of very active
participation in Microsoft public newsgroups until I was awarded.
Nevertheless, there is no guarantee that somebody is awarded at all, and
when he/she is awarded. MVP ist nothing for people who "want to be MVP",
it's a side-effect of regular and voluntary participation and willingness to
help/share.

So, if you want to become an MVP, post to the groups or other communities
monitored by Microsoft so that Microsoft Support Engineers etc. will become
aware of you.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7

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

Similar topics

1
by: Pablo | last post by:
Friends, how can i get the name of the default printer??. I'm working with winforms. VB,C#, nevermind. Thanks a lot Pablo
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
3
by: Rick R | last post by:
We need to change the paper size for the default printer before printing a PDF file from within a VB.Net application. printDocument printerSettings is not appropriate as there is no document to...
0
by: Karthick_Microsoft | last post by:
Actually, in my ASP.Net application, i have a requirement of automatically changing the default printer. I did a OCX using VB and put it on the web page. The client machines do not have local...
4
by: Pete Smith | last post by:
I am using the PrintDocument for my print application. Currently it is printing to the default printer. How to change to a different printer? VB.Net 2003 & .Net Framework 1.1. Thank you,
1
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
4
by: c_shah | last post by:
How to change and set default printer using Visual Basic 2005 The following works within my VB 2005 application but does any one have better alternative. /**** Dim wshnetwork As Object =...
0
by: Koert | last post by:
Hi all, I have some problems with the printersettings (I use the .net framework 1.1). I create a new document pd = new PrintDocument The pd.DefaultPageSettings are the ones defined by the...
8
by: ncsthbell | last post by:
Is there a way to change my default printer using vb? I have some reports I want to print to a certain printer and some to a different one. I have a routine that loops through all of the reports to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.