Using .NEt 2.0, VS 2005, Windows Forms, VB.Net
How do you know if your VB.Net code has access to a windows resource (such as a printer from the code below). Lately we have been getting system. accessViolationException errors but they are not consistent. Is there a way in .NET to check ?
strDefaultPrinter = prtdoc.PrinterSettings.PrinterName
For Each strPrinter In PrinterSettings.InstalledPrinters
If strPrinter = strDefaultPrinter Then
prtExists = True