Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with VFP on Terminal Services
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01122489
Message ID:
01122501
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform