Using ShellExecute PrintTo

M

Marcel Sammut

Greetings,
I am converting a VB6 application to .net and am having troubles trying to
print a document directley to the printer. My VB6 app used the API
ShellExecute method to accomplish this, however, needed the printer name,
driver and port. All which were obtainable using the Printer object in VB6.
Now in .net, I've tried using the System.Drawing.Printing namespace to do
this, but that is unsatisfactory. So I went back to the API ShellExecute
method. However, I am only able to obtain the printer name property of the
selected printer. In order to use ShellExecute, I must also obtain the
printer port and driver.
Does anyone know how to obtain the printerport and printerdriver properties
of a selected printer?

Thanks,
Marcel Sammut
(e-mail address removed)
 
T

Tony Edgecombe

Marcel,

I think you'll find the port and driver are legacy information from
Windows 3.1, you don't need to use them to print.

Tony Edgecombe
www.frogmorecs.com/ng
Software for printing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top