07/06/2017, 13:40
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strPDFFile As String = Dir("d:\Test.pdf")
Dim PrintPDFFile As New ProcessStartInfo
Do Until strPDFFile Is Nothing
PrintPDFFile.UseShellExecute = True
PrintPDFFile.Verb = "print"
PrintPDFFile.WindowStyle = ProcessWindowStyle.Hidden
PrintPDFFile.FileName = strPDFFile
Process.Start(PrintPDFFile)
strPDFFile = Dir()
Loop
End Sub
End Class
bu kodda "Process.Start(PrintPDFFile)" bu satırda sorun yaşıyorum. Test.PDF isimli dosyayı yazdırması lazım ancak hata veriyor.
Verdiği hata ise Win32Exception was unhandled. Nerede hata yapıyorum ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strPDFFile As String = Dir("d:\Test.pdf")
Dim PrintPDFFile As New ProcessStartInfo
Do Until strPDFFile Is Nothing
PrintPDFFile.UseShellExecute = True
PrintPDFFile.Verb = "print"
PrintPDFFile.WindowStyle = ProcessWindowStyle.Hidden
PrintPDFFile.FileName = strPDFFile
Process.Start(PrintPDFFile)
strPDFFile = Dir()
Loop
End Sub
End Class
bu kodda "Process.Start(PrintPDFFile)" bu satırda sorun yaşıyorum. Test.PDF isimli dosyayı yazdırması lazım ancak hata veriyor.
Verdiği hata ise Win32Exception was unhandled. Nerede hata yapıyorum ?