Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select printer and save printer name in a field
Message
De
22/03/2007 16:32:57
 
 
À
22/03/2007 16:28:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01207341
Message ID:
01207345
Vues:
13
Here is the code from my combo:
***************************************************************************
*!*	Method:			ecncbpPrinter
*!*	Purpose:		Populate combo with printers from user's sys
*!*	Author:			bxk 09.27.04
*!*	Parameters:
*!*	Returns:
*!*	Modifications:	
***************************************************************************
LOCAL li

FOR li = 1 TO APRINTERS(THIS.aContents)
	*   Note below that you are adding a leading space. This
	*   prevents a network printer in Windows NT from appearing
	*   disabled in the combo due the leading "\"
	THIS.aContents[li, 1] = SPACE(1) + THIS.aContents[li, 1]
ENDFOR

DODEFAULT()

IF LEFT(THIS.DISPLAYVALUE, 1) # SPACE(1)
	THIS.DISPLAYVALUE = SPACE(1) + THIS.DISPLAYVALUE
ENDIF

RETURN
HTH

Bruce

>Hi
>I want a user to select a printer from the installed printers and retain the printer name in a setup database field to be used later. I use the following now but cannot select network printers. Your input will be appreciated.
>*** init screen, shows in a combo box
>With Thisform.container2.combo1
> .RowSourceType= 5 && array
> .RowSource="ar_printers(Alen(ar_printers,1),1)"
> .DisplayValue=1
>ENDWITH
>** cPr printer name to be saved in the database.
>cPr= thisform.container2.combo1.value
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform