Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get all the settings in IDE vs. run-time?
Message
From
01/02/2017 17:09:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01647262
Message ID:
01647291
Views:
60
Likes (1)
Another code for vfp options settings
*vfp/menu/tools/options fires a dialog boxes when can set al vfp configurations.
*if click on button " set as default" all these configurations are wrote in registry
*this code retrieves all this vf registry  settings (found 193)  with native registry class.


#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 oReg,regfile
Local cOptionValue,cOptionName,nErrNum
Public aFoxOptions

regfile = Home(2)+"classes\registry.prg"
If !File(m.regfile)
	regfile = Home(1)+"samples\classes\registry.prg"
	If !File(m.regfile)
		Messagebox(C_NOREGFILE_LOC)
		Return
	Endif
Endif

Set Procedure To (m.regfile) Additive
oReg = Createobject("FoxReg")
Dimension aFoxOptions[1,2]
m.nErrNum = oReg.EnumFoxOptions(@aFoxOptions)
Create Cursor ycurs (Option c(40),Value c(100))
Appe From Array aFoxOptions

Browse  Name ybrow   Title "VFP registry settings: "+Trans(Reccount())  Nowait    &&window as oop object
With ybrow
    .GridLines=0
    .RecordMark=.F.
    .Width=300
    .Left=100
    .SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255)  , RGB(190,235,200))", "Column")
    .FontBold=.T.
    locate
Endwith

aFoxOptions=null
release aFoxOptions
Release Proc (m.regfile)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform