Mini Kabibi Habibi

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

3hVERSION =   3.00dataenvironmentdataenvironmentDataenvironmentName = "Dataenvironment"
12frmsolution..\solution.vcxformfrmTrack�Height = 405
Width = 433
DoCreate = .T.
BorderStyle = 2
Caption = "Fun with Access/Assign Methods"
HelpContextID = 232
oshape = 
Name = "frmTrack"
C_solutions1.Top = 372
C_solutions1.Left = 96
C_solutions1.Name = "C_solutions1"
Behindscenes1.Top = 372
Behindscenes1.Left = 12
Behindscenes1.TabIndex = 15
Behindscenes1.Name = "Behindscenes1"
Shape2.Top = 12
Shape2.Left = 12
Shape2.Height = 60
Shape2.Width = 408
Shape2.Name = "Shape2"
Label1.Caption = "Access/assign methods can be used for a variety of useful purposes. The examples below show them being used for data validation, dynamic object instantiation, and collection support."
Label1.Height = 42
Label1.Left = 24
Label1.Top = 24
Label1.Width = 384
Label1.TabIndex = 2
Label1.Name = "Label1"
Label4.TabIndex = 1
Label4.Name = "Label4"
Cmdclose1.Top = 372
Cmdclose1.Left = 348
Cmdclose1.TabIndex = 16
Cmdclose1.Name = "Cmdclose1"
�PROCEDURE caption_assign
LPARAMETERS vNewVal
THIS.CAPTION = UPPER(m.vNewVal)

ENDPROC
PROCEDURE oshape_access
#DEFINE NOSHAPE_LOC	"The shape object does not yet exist, so is being added now." 

IF VARTYPE(THIS.oShape)#"O"
	WAIT WINDOW NOSHAPE_LOC TIMEOUT 1
	THIS.AddObject("shpColor","Shape")
	THIS.oShape = THIS.shpColor
	WITH THIS.oShape
		.BackColor = RGB(255,0,0)
		.height = 24
		.width = 84
		.Top = 200
		.Left = 304
		.Visible = .T.
	ENDWITH
ELSE
	THIS.oShape.BackColor = RGB(255,255,0)
ENDIF
RETURN THIS.oshape

ENDPROC
PROCEDURE oshapecolor_access
#DEFINE YELLOW_LOC	"Yellow"
#DEFINE RED_LOC	"Red"

IF THIS.oShape.BackColor = 255
	RETURN RED_LOC
ELSE
	RETURN YELLOW_LOC
ENDIF

ENDPROC
PROCEDURE this_access
#DEFINE NOPEM1_LOC			"The property " 
#DEFINE NOPEM2_LOC			" does not exist, so will be added to this form." 
#DEFINE NEWPROPVALUE_LOC 	"Hello World"	

LPARAMETER tcMember
IF VARTYPE(tcMember)="C" AND !EMPTY(tcMember)
	IF !PEMSTATUS(THIS,tcMember,5)
		WAIT WINDOW NOPEM1_LOC+UPPER(tcMember)+NOPEM2_LOC TIMEOUT 2
		THIS.AddProperty(tcMember,NEWPROPVALUE_LOC)
	ENDIF
ENDIF
RETURN THIS

ENDPROC
PROCEDURE mybuttons_access
LPARAMETERS m.nIndex
LOCAL i
DO CASE
CASE VARTYPE(m.nIndex)="L"			&&collection object
	RETURN THIS.btnCollection
CASE VARTYPE(m.nIndex)="C"			&&named collection
	RETURN THIS.&nIndex.
OTHERWISE
	RETURN THIS.mybuttons[m.nIndex]	&&collection index
ENDCASE

ENDPROC
PROCEDURE cleanup
IF TYPE("THIS.btnCollection.BaseClass")="C"
	THIS.RemoveObject("btnCollection")
ENDIF
STORE "" TO THIS.myButtons

ENDPROC
PROCEDURE QueryUnload
THIS.CleanUp()
DoDefault()
ENDPROC
PROCEDURE Init
DODEFAULT()
FOR i = 1 TO THIS.ControlCount
	IF UPPER(THIS.Controls[m.i].BaseClass) = "COMMANDBUTTON"
		IF VARTYPE(THIS.myButtons[1])="O"
			DIMENSION THIS.myButtons[ALEN(THIS.myButtons)+1]
		ENDIF
		THIS.myButtons[ALEN(THIS.myButtons)] = THIS.Controls[m.i]
	ENDIF
ENDFOR

ENDPROC
PROCEDURE Cmdclose1.Click
THISFORM.CleanUp()
DoDefault()
ENDPROC
�� ���	%�#D��U���T���C�
�f��UVNEWVALTHISCAPTION=%�C�����O���KR,�����;The shape object does not yet exist, so is being added now.�� ��C�shpColor�Shape����T��������������T��C�����^��T�����T���T��T�����T���0��T�	�a�����*�T����C������^���B�����U
THISOSHAPE	ADDOBJECTSHPCOLOR	BACKCOLORHEIGHTWIDTHTOPLEFTVISIBLEA%��������#�B��Red���:�B��Yellow���UTHISOSHAPE	BACKCOLOR����%�C����C�C��
	����%�C����h
����VR,�����
The property C�f�/ does not exist, so will be added to this form.����C��Hello World������	B����UTCMEMBERTHISADDPROPERTY�	��
�����
H�����C�
����L��@�B������C�
����C��o�RETURN THIS.&nIndex.
2���B�C�
������UNINDEXITHIS
BTNCOLLECTION	MYBUTTONSd0%�C�THIS.btnCollection.BaseClassb�C��M���C�
btnCollection�����J���(���UTHISREMOVEOBJECT	MYBUTTONS
��C����	��C��UTHISCLEANUP�	��C�������(�������-%�CC�
����f�
COMMANDBUTTON����%�CC������O�������C������%T���C����C�
��������UITHISCONTROLCOUNTCONTROLS	BASECLASS	MYBUTTONS
��C����	��C��UTHISFORMCLEANUPcaption_assign,��
oshape_accessf��oshapecolor_access���this_accessV��mybuttons_access=��cleanup���QueryUnload���Init���Cmdclose1.Click���1qA3��1q�����A��A�3t���A3u�qa�AA�3�q�q�q��1A3�A3��2�����AQAA3��1Pt I��~&$��5/�?B4a|I7��MA��Y)��oshape
oshapecolor
*caption_assign 
*oshape_access 
*oshapecolor_access 
^mybuttons[1,0] 
*this_access 
*mybuttons_access 
*cleanup 
shapeshapeShape1frmTrackUTop = 156
Left = 12
Height = 192
Width = 252
SpecialEffect = 0
Name = "Shape1"
textboxtextboxText1frmTrackxFontName = "MS Sans Serif"
FontSize = 8
Height = 22
Left = 240
TabIndex = 4
Top = 84
Width = 120
Name = "Text1"
PPROCEDURE InteractiveChange
THISFORM.Caption = ALLTRIM(THIS.Value)

ENDPROC
�� ����%h���UT���C�����UTHISFORMCAPTIONTHISVALUEInteractiveChange,��1Q2E)�labellabelLabel5frmTrack�AutoSize = .T.
FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "Type into the textbox to see the form's caption automatically formatted in UPPERCASE."
Height = 28
Left = 12
Top = 84
Width = 219
TabIndex = 3
Name = "Label5"
numfieldaccess_assign.vcxtextbox	Numfield1frmTrackoAlignment = 3
Value = 123
Height = 22
Left = 240
TabIndex = 6
Top = 120
Width = 120
Name = "Numfield1"
labellabelLabel2frmTrack�AutoSize = .T.
FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "Type in an amount less than 0 and tab out."
Height = 15
Left = 12
Top = 120
Width = 202
TabIndex = 5
Name = "Label2"

commandbutton
commandbuttoncmdColorfrmTrack�Top = 168
Left = 276
Height = 23
Width = 144
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Get \<color of shape below"
TabIndex = 13
Name = "cmdColor"
�PROCEDURE Click
#DEFINE COLORSELECT_LOC		"The shape color is "
WAIT WINDOW COLORSELECT_LOC + THISFORM.oShapeColor TIMEOUT 1

ENDPROC
�� ����%t���U-*R,�����The shape color is ����UTHISFORMOSHAPECOLORClick,��1�2)�
commandbutton
commandbuttoncmdValuefrmTrack�Top = 240
Left = 276
Height = 23
Width = 144
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Get form's FOO Value"
TabIndex = 14
Name = "cmdValue"
=PROCEDURE Click
MESSAGEBOX(TRANS(THISFORM.Foo))

ENDPROC
�� ���%Shb�U��CC��_�x��UTHISFORMFOOClick,��122)�
commandbutton
commandbuttoncmdCollection2frmTrack�Top = 204
Left = 24
Height = 23
Width = 228
FontName = "MS Sans Serif"
FontSize = 8
Caption = "THISFORM.MyButtons[1].Name"
TabIndex = 9
Name = "cmdCollection2"
KPROCEDURE Click
MESSAGEBOX(TRANS(THISFORM.MyButtons[1].Name))

ENDPROC
�� ����%f{u�U��CCC����_�x��UTHISFORM	MYBUTTONSNAMEClick,��1�2@)�
commandbutton
commandbuttoncmdCollection1frmTrack�Top = 168
Left = 24
Height = 23
Width = 228
FontName = "MS Sans Serif"
FontSize = 8
Caption = "THISFORM.MyButtons.Count"
TabIndex = 8
Name = "cmdCollection1"
IPROCEDURE Click
MESSAGEBOX(TRANS(THISFORM.MyButtons.Count))

ENDPROC
�� ��d�%cxr�U��CC���_�x��UTHISFORM	MYBUTTONSCOUNTClick,��1A2>)�
collectionaccess_assign.vcxcustom
btnCollectionfrmTrackGTop = 372
Left = 72
Height = 17
Width = 24
Name = "btnCollection"

commandbutton
commandbuttoncmdCollection3frmTrack�Top = 240
Left = 24
Height = 23
Width = 228
FontName = "MS Sans Serif"
FontSize = 8
Caption = 'THISFORM.MyButtons["cmdClose1"].Caption'
TabIndex = 10
Name = "cmdCollection3"
VPROCEDURE Click
MESSAGEBOX(TRANS(THISFORM.MyButtons["cmdClose1"].caption))
ENDPROC
�� ����%r���U$!��CCC�	cmdClose1���_�x��UTHISFORM	MYBUTTONSCAPTIONClick,��11K)�
commandbutton
commandbuttoncmdCollection4frmTrack�Top = 276
Left = 24
Height = 23
Width = 228
FontName = "MS Sans Serif"
FontSize = 8
Caption = "THISFORM.MyButtons.Item[1].BaseClass"
TabIndex = 11
Name = "cmdCollection4"
UPROCEDURE Click
MESSAGEBOX(TRANS(THISFORM.MyButtons.Item[1].BaseClass))

ENDPROC
�� ����%t���U��CCC�����_�x��UTHISFORM	MYBUTTONSITEM	BASECLASSClick,��1�2J)�labellabelLabel3frmTrack�AutoSize = .T.
FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "Collections"
Height = 15
Left = 25
Top = 149
Width = 51
TabIndex = 7
Name = "Label3"

commandbutton
commandbuttoncmdCollection5frmTrack�Top = 312
Left = 24
Height = 23
Width = 228
FontName = "MS Sans Serif"
FontSize = 8
Caption = '...MyButtons["cmdClose1"].Caption = "Exit"'
TabIndex = 12
Name = "cmdCollection5"
4PROCEDURE Click
#DEFINE CMDEXITCAPTION_LOC	"E\<xit"

THISFORM.MyButtons[2].caption = CMDEXITCAPTION_LOC
*THISFORM.MyButtons.Item[2].caption = CMDEXITCAPTION_LOC
*THISFORM.MyButtons["cmdClose1"].caption = CMDEXITCAPTION_LOC
*THISFORM.MyButtons.Item["cmdClose1"].caption = CMDEXITCAPTION_LOC

ENDPROC
�� ��94%p��U"T��������E\<xit��UTHISFORM	MYBUTTONSCAPTIONClick,��1�5))�JArial, 0, 9, 5, 15, 12, 21, 3, 0
MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0
collectionx�Height = 405
Width = 433
DoCreate = .T.
BorderStyle = 2
Caption = "Fun with Access/Assign Methods"
HelpContextID = 1231617
oshape =
Name = "frmTrack"
C_solutions1.Top = 372
C_solutions1.Left = 96
C_solutions1.Name = "C_solutions1"
Behindscenes1.Top = 372
Behindscenes1.Left = 12
Behindscenes1.TabIndex = 15
Behindscenes1.Name = "Behindscenes1"
Shape2.Top = 12
Shape2.Left = 12
Shape2.Height = 60
Shape2.Width = 408
Shape2.Name = "Shape2"
Label1.Caption = "Access/assign methods can be used for a variety of useful purposes. The examples below show them being used for data validation, dynamic object instantiation, and collection support."
Label1.Height = 42
Label1.Left = 24
Label1.Top = 24
Label1.Width = 384
Label1.TabIndex = 2
Label1.Name = "Label1"
Label4.TabIndex = 1
Label4.Name = "Label4"
Cmdclose1.Top = 372
Cmdclose1.Left = 348
Cmdclose1.TabIndex = 16
Cmdclose1.Name = "Cmdclose1"