How to call the Print Photos application that ships with Windows 7 with .NET.

I am creating a C # application that creates .JPG. I really like the system where you can right-click on .JPG in Windows 7 and select Print . I would like to call this from my C # application in order to reproduce the process. How can I do that? I would rather not go through the lengthy process of creating my own dialogs when the functionality is already built into Windows 7.

+4
source share
1 answer

There is no answer for centuries, and I finally found it. So simple. Here he is:

 Process p = new Process(); p.StartInfo.FileName = "file_name.jpg"; p.StartInfo.Verb = "Print"; p.Start();
Process p = new Process(); p.StartInfo.FileName = "file_name.jpg"; p.StartInfo.Verb = "Print"; p.Start(); 

Please note that the files must be .jpg , otherwise it can do something completely different or, most likely, nothing.

+5
source

Source: https://habr.com/ru/post/1399297/


All Articles