Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Default printer using System.Drawing.Printing

Reply
Thread Tools

Default printer using System.Drawing.Printing

 
 
Willem
Guest
Posts: n/a
 
      11-27-2004
Hi,

I'm using System.Drawing.Printing to print some simple
information.

Private WithEvents mDoc As New PrintDocument

The click event on a button has the

mDoc.Print()

command, which launch the event to start printing.

Private Sub mDoc_PrintPage

e.Graphics.DrawString("Hello", mFont, Brushes.Black,
xPos, yPos)

According the MSDN library this code should use the
default printer. But it doesn't work. When I add the code

mDoc.PrinterSettings.PrinterName("my printer name")

it works. But I want to use the default printer of user.
What is coming wrong?

Many thanks,

Willem
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set default printer with all-in-one printer/fax Flycaster Computer Support 1 03-19-2007 02:21 AM
Printing Page in Legal using IE when the default printer is set to Letter millind@gmail.com Javascript 1 02-17-2006 05:56 PM
Direct printing using non-default printer (IE only) gerb Javascript 2 12-29-2004 07:10 AM
Select Printer option now says Default Printer Puzzled Computer Support 1 10-14-2004 11:01 PM
How to change default printer in Windows using Perl Domenico Discepola Perl Misc 1 07-16-2004 07:31 PM



Advertisments