Mini Kabibi Habibi

Current Path : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/winapi/
Upload File :
Current File : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/winapi/regfox.sct

%�VERSION =   3.00dataenvironmentdataenvironmentDataenvironmentName = "Dataenvironment"
12formformForm1�DataSession = 2
Top = 6
Left = 12
Height = 329
Width = 566
DoCreate = .T.
Caption = "Read and Write VFP Registry Values"
MaxButton = .F.
HelpContextID = 81
Name = "Form1"
KPROCEDURE Deactivate
IF TYPE("THIS.c_solutions1") = "O" THEN
	THIS.c_solutions1.restoreHelp
ENDIF
ENDPROC
PROCEDURE Activate
THIS.c_solutions1.saveHelp
ENDPROC
PROCEDURE Destroy
RELEASE aFoxOptions
ENDPROC
PROCEDURE Init
IF  fontmetric(1, 'MS Sans Serif', 8, '') # 13 OR ;
	fontmetric(4, 'MS Sans Serif', 8, '') # 2 OR ;
	fontmetric(6, 'MS Sans Serif', 8, '') # 5 OR ;
	fontmetric(7, 'MS Sans Serif', 8, '') # 11
	this.setall('fontname', 'Tahoma')  
ELSE
	this.setall('fontname','MS Sans Serif')
ENDIF
this.setall('fontsize',8)

THISFORM.cmdRefresh.click
ENDPROC
�� ��>�%�a�U9%%�C�THIS.c_solutions1b�O��2�
������UTHISC_SOLUTIONS1RESTOREHELP
�����UTHISC_SOLUTIONS1SAVEHELP
<��UAFOXOPTIONS�%�C��
MS Sans Serif���$�
�!C��
MS Sans Serif���$��!C��
MS Sans Serif���$��!C��
MS Sans Serif���$�����!��C�fontname�Tahoma�������(��C�fontname�
MS Sans Serif�������C�fontsize�����
�����UTHISSETALLTHISFORM
CMDREFRESHCLICK
Deactivate,��Activate���Destroy���Init���1Q�A2�2q2d	��A��1d����		�@)�
commandbutton
commandbutton
cmdRefreshForm1�Top = 299
Left = 244
Height = 23
Width = 72
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Refresh"
TabIndex = 4
Name = "cmdRefresh"
�PROCEDURE Click
#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()+"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)  
thisform.lstFoxOptions.rowsource = "aFoxOptions"

cOptionValue = ""
cOptionName = "TALK"
m.nErrNum = oReg.GetFoxOption(m.cOptionName,@cOptionValue)  
thisform.cmdTalk.caption =  "\<Talk " + m.cOptionValue
thisform.cmdTalk.enabled = .T.
RELEASE PROC (m.regfile)

ENDPROC
]�� DD�E%����U����������7��(T��C��Q�classes\registry.prg��%�C�
�0
���-T��C�Q�samples\classes\registry.prg��%�C�
�0
����`��C�TThe REGISTRY.PRG file needed for this sample could not be found in \Samples\Classes.�x��B���G+(��
���T��C�FoxReg�N����������T�
��C�����T���	��aFoxOptions��
T�����T���TALK��T�
��C�
����
�� T�����\<Talk �
���T���
�a��
<���
���UOREGREGFILECOPTIONVALUECOPTIONNAMENERRNUMAFOXOPTIONSENUMFOXOPTIONSTHISFORM
LSTFOXOPTIONS	ROWSOURCEGETFOXOPTIONCMDTALKCAPTIONENABLEDClick,��1��q�!�!AAA�a2q����2�)Dbehindscenes..\solution.vcx
commandbutton
Behindscenes1Form1<Top = 299
Left = 12
TabIndex = 2
Name = "Behindscenes1"
cmdclose..\solution.vcx
commandbutton	Cmdclose2Form19Top = 300
Left = 480
TabIndex = 5
Name = "Cmdclose2"
c_solutions..\solution.vcxcustomC_solutions1Form1FTop = 301
Left = 54
Height = 18
Width = 25
Name = "C_solutions1"
listboxlistbox
lstFoxOptionsForm1�FontName = "MS Sans Serif"
FontSize = 8
ColumnCount = 2
ColumnWidths = "150,250"
RowSourceType = 5
Height = 159
Left = 10
TabIndex = 1
Top = 132
Width = 542
ItemTips = .T.
Name = "lstFoxOptions"
�PROCEDURE DblClick
#DEFINE CRLF	CHR(13)+CHR(10)
#DEFINE OPTION_LOC	"Option: "
#DEFINE VALUE_LOC	"Value: "

MESSAGEBOX(OPTION_LOC+THIS.List(THIS.ListIndex,1)+CRLF+VALUE_LOC+THIS.List(THIS.ListIndex,2))
ENDPROC
�� ���&%����UPM��C�Option: C�����C�
 C�
 �Value: C������x��UTHISLIST	LISTINDEXDblClick,��1�1�)�labellabelLabel1Form1�FontName = "MS Sans Serif"
FontSize = 8
Caption = "Option"
Height = 17
Left = 12
Top = 113
Width = 40
TabIndex = 0
Name = "Label1"
labellabelLabel2Form1�FontName = "MS Sans Serif"
FontSize = 8
Caption = "Value"
Height = 17
Left = 167
Top = 113
Width = 40
TabIndex = 0
Name = "Label2"

commandbutton
commandbuttoncmdTalkForm1�Top = 299
Left = 166
Height = 23
Width = 72
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Talk"
Enabled = .F.
TabIndex = 3
Name = "cmdTalk"
PROCEDURE Click
#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

regfile = HOME(2)+"classes\registry.prg"
IF !FILE(m.regfile)
	regfile = HOME()+"samples\classes\registry.prg"
	IF !FILE(m.regfile)
		MESSAGEBOX(C_NOREGFILE_LOC)
		RETURN
	ENDIF
ENDIF

SET PROCEDURE TO (m.regfile) ADDITIVE
oReg = CreateObject("FoxReg")

* This sample gets a Fox Option
cOptionValue = ""
cOptionName = "TALK"
m.nErrNum = oReg.GetFoxOption(m.cOptionName,@cOptionValue)  
m.cOptionValue = IIF(m.cOptionValue="ON","OFF","ON")

* This sample sets a Fox Option
m.nErrNum = oReg.SetFoxOption(m.cOptionName,m.cOptionValue)  
thisform.cmdTalk.caption =  "\<Talk " + m.cOptionValue

DIMENSION aFoxOptions[1,2]
m.nErrNum = oReg.EnumFoxOptions(@aFoxOptions)  
thisform.lstFoxOptions.rowsource = "aFoxOptions"

ENDPROC
��� kkN�%�"��U���������(T��C��Q�classes\registry.prg��%�C�
�0
����-T��C�Q�samples\classes\registry.prg��%�C�
�0
����`��C�TThe REGISTRY.PRG file needed for this sample could not be found in \Samples\Classes.�x��B���G+(��
���T��C�FoxReg�N��
T�����T���TALK��T�
��C�
������*T�
��C�
��ON�	�OFF��ON6��T�
��C�
��
����� T���	��\<Talk �
����
�������T�
��C�
����T���
��aFoxOptions��UOREGREGFILECOPTIONVALUECOPTIONNAMENERRNUMGETFOXOPTIONSETFOXOPTIONTHISFORMCMDTALKCAPTIONAFOXOPTIONSENUMFOXOPTIONS
LSTFOXOPTIONS	ROWSOURCEClick,��1���!�!AAA�a����2q�2)kshapeshapeShape3Form1bTop = 17
Left = 11
Height = 86
Width = 541
BackStyle = 0
SpecialEffect = 0
Name = "Shape3"
labellabelLabel7Form1]FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "You can retrieve Visual FoxPro settings from the Registry. Here, the Options dialog settings are shown (as persisted by the Set As Default button). The capitalized entries correspond to SET commands."
Height = 42
Left = 21
Top = 24
Width = 519
TabIndex = 0
Name = "Label7"
labellabelLabel8Form1�AutoSize = .T.
FontName = "MS Sans Serif"
FontSize = 8
Caption = " Instructions "
Height = 15
Left = 19
Top = 8
Width = 62
TabIndex = 0
Name = "Label8"
labellabelLabel3Form1FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "The Talk button shows how you can toggle the value of a Registry setting. Double-click on an item to see details if value is cutoff."
Height = 32
Left = 21
Top = 68
Width = 380
TabIndex = 0
Name = "Label3"
JArial, 0, 9, 5, 15, 12, 32, 3, 0
MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0
�DataSession = 2
Top = 6
Left = 12
Height = 329
Width = 566
DoCreate = .T.
Caption = "Read and Write VFP Registry Values"
MaxButton = .F.
HelpContextID = 1231532
Name = "Form1"