Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Windows Priner Name in Upper Case
Message
De
11/12/2001 11:38:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Default Windows Priner Name in Upper Case
Divers
Thread ID:
00592724
Message ID:
00592724
Vues:
114
Hi,

I need to display a printer value on a form with the ability for the user to change it if necessary. In some cases I pass a printer name and other cases I must set the default windows printer. I am setting cPrinter=SET("PRINTER",2) to set the printer name to the windows default printer. I then use the cPrinter value to set the printer before printing reports.

The problem is the SET("PRINTER",2) value is the printer name in upper case which is not the invalid printer name. I must then run the following code to get the correct casing for the printer selected.


FOR i = 1 TO APRINTERS(gaPrinters)
IF cPrinter=UPPER(gaPrinters[i,1])
cPrinter=gaprinters(i,1)
EXIT
ENDIF
NEXT

It seems odd that thees values are inconsistent; one in upper case, the other is case sensitive. Is there another way to do this and avoid scanning the APRINTERS array or am I missing something?

TIA,

Susan Burnham
Sue Burnham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform