hi,
Im trying to write a method to print all pictures stored in a directory. I found several ways to do this, but all of them send the output directly to the printer. What I want, is the Photo Printing Wizard to be shown, so that users can set up the page arrangement (for example, choose how many pics to print in one page).
I tried to use the Process class, with the following ProcessStartInfo arguments
Dim info As New ProcessStartInfo() info.Verb = "print" info.FileName = path info.LoadUserProfile = True info.WindowStyle = ProcessWindowStyle.Normal
this is the "closest" solution to my goal; but it works only for a file at time. if I try to pass the directory path to FileName, instead of a single file path, I get a File Not Found error
Dim info As New ProcessStartInfo() Dim files = "C:\Pictures"
Dim printer As String = "...." (user's printer name Dim command = String.Format("/C rundll32 shimgvw.dll ImageView_PrintTo /pt {0} {1}", Chr(34) & files & Chr(34), Chr(34) & printer & Chr(34)) info.FileName = "cmd.exe" info.Arguments = command info.LoadUserProfile = True info.WindowStyle = ProcessWindowStyle.Normal
this, instead, prints all of the pictures in directory, but does not show Photo Printer Wizard.
Im searching for a solution but I cant find it. any suggestions?