************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file
specified
at
System.Drawing.Printing.StandardPrintController.OnEndPrint(PrintDocument
document, PrintEventArgs e)
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnEndPrint(PrintDocume
nt document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument
document)
at System.Drawing.Printing.PrintDocument.Print()
at iCopy.Printer.Print(Int16 copies) in D:\...\iCopy.vb:line 652
at iCopy.appControl.Copy(Int16 copies, Boolean preview, Int16 Scaling,
Boolean MultiplePages) in D:\...\iCopyControl.vb:line 306
at iCopy.mainFrm.ScanMultiplePages_Click(Object sender, EventArgs e) in
D:\...\mainfrm.vb:line 223
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs
e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
l'eccezione è lì, alla riga pd.print() che poi richiama l'evento printpage del print document.
Questa è la routine in cui si verifica l'eccezione, alla riga 652 che è pd.Print():
Public Sub Print(Optional ByVal copies As Short = 1)
If _images.Count = 0 Then Throw New ArgumentException("No images in image buffer")
pd.PrinterSettings.Copies = copies
pd.Print()
End Sub