W
Willem
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
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