Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reads & Writes to Win95 Registry
Message
De
29/01/1999 16:22:05
 
 
À
29/01/1999 16:12:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00182021
Message ID:
00182033
Vues:
18
>Greetings All,
>
>I need to be able to select a list of printers from the registry, let the user select a new default printer, and write the value back to the registry. I have found a foundation class (registry.prg) that shipped with VFP 6.0, but I am having a difficult time getting it to work.
>
>My associate here uses Powerbuilder and he was able to get it to work in PB, so I am trying to follow his code so I can use VFP.
>
>Below is my first step.
>The "HKEY_CURRENT" phrase is the path in the registry of the printers.
>
>regfile = HOME(2)+"classes\registry.prg"
>oReg = NewObject("FoxReg",m.regfile)
>
>dimension aFoxOptions[1,2]
>
>cVal = oReg.GetKeyValue; ("HKEY_CURRENT_CONFIG\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS",@aFoxOptions)
>
>Can anyone point me in the right direction?

Is there a reason not to use GETPRINTER(), or populate the list with APRINTERS()?

>
>Thanks in advance.
>
>Scott
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform