TunaAdmiral
MIS
Hi!
I recently deployed a program that prints a file to a network-shared printer. It was written in VB.NET 2003. The program works fine on numerous Windows XP machines, but fails miserably on Windows 2000 machines.
I keep receiving error: System.IO.FileNotFoundException "\\mycompany\HP8150A"
Does Windows 2000 have a problem resolving UNC path names?
The code in question is pasted below.
Any help would be appreciated!
Thanks!
'Target file (printer) selected here
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
p = "\\mycompany\HP8150A"
Button4.Enabled = True
End Sub
'Source file selected. FileCopy performed to Target printer.
g = "H:\Projects\files\barcode.pcl"
Dim f11 As New System.IO.FileInfo(g)
If f11.Exists() Then
FileCopy(g, p)
Else
MsgBox("Missing File barcode.pcl!", vbOKOnly & vbExclamation, "Error")
Form1.ActiveForm.Focus()
End If
I recently deployed a program that prints a file to a network-shared printer. It was written in VB.NET 2003. The program works fine on numerous Windows XP machines, but fails miserably on Windows 2000 machines.
I keep receiving error: System.IO.FileNotFoundException "\\mycompany\HP8150A"
Does Windows 2000 have a problem resolving UNC path names?
The code in question is pasted below.
Any help would be appreciated!
Thanks!
'Target file (printer) selected here
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
p = "\\mycompany\HP8150A"
Button4.Enabled = True
End Sub
'Source file selected. FileCopy performed to Target printer.
g = "H:\Projects\files\barcode.pcl"
Dim f11 As New System.IO.FileInfo(g)
If f11.Exists() Then
FileCopy(g, p)
Else
MsgBox("Missing File barcode.pcl!", vbOKOnly & vbExclamation, "Error")
Form1.ActiveForm.Focus()
End If