Board index » Visual Studio » Error/Exception Handling Question?
|
stumoor
|
Error/Exception Handling Question?
Visual Studio300
List: I'm trying to get my app to play nice with multiple printers. I'm using the PrinterDlg form from Microsoft. One of the printers here objects strongly to having its properties set, whereas the other happily complies with even nonsensical things I ask it to do. So when I choose the laserjet, I get an error: NewPrinter.PaperSize = printDlg.PaperSize (and similar statements) That the property is "ReadOnly." My first instinct is when I enter the block of statements that sets the printer properties to us "On Error Resume Next" My concern is that this function might be called from most anywhere, and I don't want to undo the error handling of the calling context. If I do: On Error Resume Next ' Set various printer properties On Error Goto 0 Does that restore the error trapping of the calling context, or do I need to do something more complex in this situation? Thanx Charles - |
