dim psinfo as new processstartinfo psinfo.verb="print" psinfo.createnowindow=false psinfo.filename="d:/imgfolder/0001.jpg" process.start(psinfo)
For Each file In IO.Directory.GetFiles(folderPath) Try Dim psi As New ProcessStartInfo(file ) If psi.Verbs.Contains("print") Then psi.Verb = "print" psi.UseShellExecute = True psi.WindowStyle = ProcessWindowStyle.Hidden psi.CreateNoWindow = True Process.Start(psi).WaitForExit() Else MessageBox.Show("No 'print' verb associated with file extension " & IO.Path.GetExtension(file)) End If Catch ex As Exception MessageBox.Show(ex.ToString()) End Try Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)