Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with VFP on Terminal Services
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01122489
Message ID:
01122501
Views:
21
Russell,

I'm not an expert on TS, but I think your CATCH code is dangerous in that it does not handle the case where a user cancels the GETPRINTER() dialog (returning '') or where your 2nd SET PRINTER command throws its own error.

I would try wrapping your CATCH code in its own nested TRY/CATCH. My changes in lowercase. Untested.
TRY
  SET PRINTER TO NAME (PrinterName)
CATCH
   try
     local lcPrinter
     lcPrinter = GETPRINTER()
     if not empty( lcPrinter )
       set printer to (lcPrinter)
     endif
   catch
     messagebox( "Problem with printer selection ...", ... )
   endtry
ENDTRY


Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform