Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between "print" and "printo" verbs when starting a process?

I suspect this may apply to multiple programming languages, but in this context I am referring to .NET.

When I use System.Diagnostics.Process.Start, I can include, as an argument, a System.Diagnostics.ProcessStartInfo object. One of the properties of ProcessStartInfo class is Verb (type of string). There is also a string[] property of Verbs which seems to contain the list of permitted values for Verb.

I notice that within the Verbs array there is a value for "Print" and a value for "PrintTo". What's the difference between the two? I tested both and they both seem to cause the file to print to my default printer.

like image 245
Sonny Boy Avatar asked Sep 08 '11 23:09

Sonny Boy


2 Answers

According to this MSDN article, PrintTo is basically present to support drag-and-drop operations for printing (dragging a document over a printer icon, for example). It sounds like it's probably not meant to be used by your code.

like image 107
Jon Skeet Avatar answered Oct 30 '22 03:10

Jon Skeet


The printto verb is normally used when the user drags a file and drops it on a printer shortcut. You need to supply at least two arguments, the first one is the file you want to get printed, the second one is the printer name. Registry entries on my machine use additional arguments but it is quite unclear to me what they may be.

like image 25
Hans Passant Avatar answered Oct 30 '22 03:10

Hans Passant