Hello,
I have a small piece of code to launch a file and print it to desired printer. The code is as follows:
This code works perfect will all files extensions except ".jpg". As soon as i try with ".jpg" Microsoft Photo Editor opens and goes to "not responding" mode.
When I use "print" verb it works well.
I've verified that proper command is given to printto verb in file association.
"C:\Program Files\Common Files\Microsoft Shared\PhotoEd\ PHOTOED.EXE" /pt "%1" "%2" "%3" "%4"
If I manually open a jpg file in Microsoft Photo and print; it works well.
I've tried reinstalling the photo editor but no luck. I'm unable to figure out what's the problem with printto verb.
Please help me.
Regards,
Piyush
I have a small piece of code to launch a file and print it to desired printer. The code is as follows:
Code:
objProcess.StartInfo.FileName = "C:\test.jpg"; objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden | ProcessWindowStyle.Minimized; objProcess.StartInfo.UseShellExecute = true; objProcess.StartInfo.CreateNoWindow = true; objProcess.StartInfo.ErrorDialog = false; objProcess.StartInfo.Arguments = "HP Lazer Jet 1010"; objProcess.StartInfo.Verb = "Printto"; objProcess.Start();
When I use "print" verb it works well.
I've verified that proper command is given to printto verb in file association.
"C:\Program Files\Common Files\Microsoft Shared\PhotoEd\ PHOTOED.EXE" /pt "%1" "%2" "%3" "%4"
If I manually open a jpg file in Microsoft Photo and print; it works well.
I've tried reinstalling the photo editor but no luck. I'm unable to figure out what's the problem with printto verb.
Please help me.
Regards,
Piyush
Comment