Printer.Print in VB.Net


I have some VB6.0 code that uses Printer.Print, the conversion process says I can't use that any more...what do I use instead?

I can't seem to find an easy answer in my MSDN


Who is Participating?
The following links from the MSDN should be of assisstance;

You will want to add a PrintDocument component to your form, which will provide the ability to send data to the printer once again. I think there is a 'component-less class' way of doing it too, but the Component method should work fine.

Using the component, you should put the component on your form and then put your code to handle the printing in the 'PrintDocument.PrintPage' event handler. You should then be able to simply call the 'PrintDocument.print' method to fire your stuff to your printer.

Good luck!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.