Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows directory
Message
From
04/03/2000 04:38:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00341648
Message ID:
00341649
Views:
22
>Theres a key in the registry that shows the Windows directory on your computer. Say, if I chose to rename \WINDOWS as my WINDOWS directory to \WIN95, it would show "\WIN95". How would I do that in VFP6?
Hi Charles,
#Define ERROR_SUCCESS 0
#Define C_EXTNOFOUND_LOC "No information available for selected application."
#Define C_NOREGFILE_LOC "The REGISTRY.PRG file needed for this sample could not be found in \Samples\Classes."
Local cExtn,cAppKey,cAppName,nErrNum,cNewKey
Local oReg,regfile
cAppKey = ""
cAppName = ""

regfile = HOME(2)+"classes\registry.prg"
If !FILE(m.regfile)
Messagebox(C_NOREGFILE_LOC)
Return
Endif

oReg = NewObject("FileReg",m.regfile)
* ex. THIS.SetRegKey("ResWidth","640",;
* "Software\Microsoft\VisualFoxPro\4.0\Options",;
* HKEY_CURRENT_USER)
Previous
Reply
Map
View

Click here to load this message in the networking platform