Mini Kabibi Habibi

Current Path : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/wizards/
Upload File :
Current File : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/wizards/appwiz.vct

n�VERSION =   3.00
wzapplication�ccaption
cicon
clasticon
clastcaption
saveenvironment
restoreenvironment
beforereadevents
resetformscollection
Init
Destroy
PixelsGApplication class used as a framework for the Application Wizard (5.0).Class1	container
wzapplication�Width = 108
Height = 34
Visible = .F.
BackColor = 0,0,255
cstartupform = 
cstartupmenu = 
ccaption = 
cicon = 
clasticon = 
clastcaption = 
nformcount = 0
npixeloffset = 22
lcascadeforms = .T.
lreadevents = .T.
Name = "wzapplication"
	container!Arial, 0, 8, 5, 14, 11, 20, 3, 0
wzquickstartformPixelsaQuick start form class used as a start up form in the framework for the Application Wizard (5.0).Class26formwzquickstartform�� ����%Pe_�U

����UTHISFORMRELEASEClick,��1�2#)�.PROCEDURE Click
thisform.Release

ENDPROC
�Top = 211
Left = 285
Height = 27
Width = 84
FontSize = 8
Caption = "\<Close"
Default = .T.
TabIndex = 4
Name = "cmdClose"
wzquickstartformcmdClose
commandbutton
commandbutton\�� CC9O%����UM���T���������%������F�T�������U	LLENABLEDTHISPARENTLSTFORMS	LISTINDEXENABLED�����T��������%���
��6�B��T��C�����%�C����b�B��
����&lcCommand

���	�U
LNLISTINDEX	LCCOMMANDTHISPARENTLSTFORMS	LISTINDEXTHISFORM	ACOMMANDSHIDERELEASERefresh,��Click���1q�AA3�bAAQ�AA���2���
)CTop = 181
Left = 285
Height = 27
Width = 84
FontSize = 8
Caption = "\<Run"
Enabled = .F.
TabIndex = 3
Name = "cmdRun"
wzquickstartformcmdRun
commandbutton
commandbutton+Application Wizard framework class library.!Arial, 0, 8, 5, 14, 11, 20, 3, 0

wzaboutdialogPixelsClass�PROCEDURE Refresh
LOCAL llEnabled

llEnabled=(this.parent.lstForms.ListIndex>0)
IF this.Enabled#llEnabled
	this.Enabled=llEnabled
ENDIF

ENDPROC
PROCEDURE Click
LOCAL lnListIndex,lcCommand

lnListIndex=this.parent.lstForms.ListIndex
IF lnListIndex<1
	RETURN
ENDIF
lcCommand=thisform.aCommands[lnListIndex]
IF EMPTY(lcCommand)
	RETURN
ENDIF
thisform.Hide
&lcCommand
thisform.Release

ENDPROC
uFontSize = 8
Height = 215
Left = 10
TabIndex = 2
Top = 25
Width = 266
IntegralHeight = .T.
Name = "lstForms"
wzquickstartformlstFormslistboxlistboxlabel[About form class used as an About dialog in the framework for the Application Wizard (5.0).2form
wzaboutdialog�� ����%Pe_�U

����UTHISFORMRELEASEClick,��1�2#)�.PROCEDURE Click
thisform.Release

ENDPROC
mTop = 215
Left = 285
Height = 27
Width = 84
FontSize = 8
Caption = "OK"
Default = .T.
Name = "cmdOK"

wzaboutdialogcmdOK�FontSize = 8
Caption = "\<Select a form to run."
Height = 17
Left = 10
Top = 10
Width = 111
TabIndex = 1
BackColor = 192,192,192
Name = "lblForms"
wzquickstartformlblFormslabeliPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = -23
Top = 224
Width = 52
Name = "Image29"
wzquickstartformImage29imageimagewzquickstartform
commandbutton
commandbutton��� ss�u%J�2��U������UTHISPARENTCMDRUNCLICK�������"%�C�goAppb�O�C����9�B��T������%�C����`�B��T��CC��@��T��C�.���%�������T����.mnx����� T��CC���=��.mnx���%�C�0
����B��F��Q������%�C�_menu�
��#�B��T��������	����)~�CC�
�@�forms�
C�g�	��?�T��CC������T��CC�
�����K%�C���C���CC��@�launcher�CC��@�
\<quick start����.����C�����T����������	�����T��	���������Q��%������o�T�������������U
LCMENUFILELCPROMPT	LCCOMMANDLNATPOSGOAPPCSTARTUPMENU_MENUTHISFORM
NFILECOUNT	ACOMMANDS	LEVELNAMEITEMNUMPROMPTCOMMANDTHISADDITEM	LISTCOUNT	LISTINDEXPARENTCMDRUNREFRESH������UTHISPARENTCMDRUNREFRESH ������
����UNBUTTONNSHIFTNXCOORDNYCOORDTHISINTERACTIVECHANGEDblClick,��Init`��InteractiveChange���MouseUp���131"AA�AA1Q�AAA�QAA�AA�AAq1�A�AA331�2.I�-��3/�B7)sMPROCEDURE DblClick
this.parent.cmdRun.Click

ENDPROC
PROCEDURE Init
LOCAL lcMenuFile,lcPrompt,lcCommand,lnAtPos

IF TYPE("goApp")#"O" OR ISNULL(goApp)
	RETURn
ENDIF
lcMenuFile=goApp.cStartupMenu
IF EMPTY(lcMenuFile)
	RETURN
ENDIF
lcMenuFile=LOWER(FULLPATH(lcMenuFile))
lnAtPos=AT(".",lcMenuFile)
IF lnAtPos=0
	lcMenuFile=lcMenuFile+".mnx"
ELSE
	lcMenuFile=ALLTRIM(LEFT(lcMenuFile,lnAtPos-1))+".mnx"
ENDIF
IF NOT FILE(lcMenuFile)
	RETURN
ENDIF
SELECT 0
USE (lcMenuFile) AGAIN SHARED ALIAS _menu
IF NOT USED("_menu")
	RETURN
ENDIF
thisform.nFileCount=0
DIMENSION thisform.aCommands[1]
SCAN ALL FOR LOWER(ALLTRIM(LevelName))=="forms" AND VAL(ItemNum)>0
	lcPrompt=ALLTRIM(MLINE(Prompt,1))
	lcCommand=ALLTRIM(MLINE(Command,1))
	IF EMPTY(lcPrompt) OR EMPTY(lcCommand) OR LOWER(ALLTRIM(lcPrompt))=="launcher" OR ;
			LOWER(ALLTRIM(lcPrompt))=="\<quick start"
		LOOP
	ENDIF
	this.AddItem(lcPrompt)
	thisform.nFileCount=thisform.nFileCount+1
	DIMENSION thisform.aCommands[thisform.nFileCount]
	thisform.aCommands[thisform.nFileCount]=lcCommand
ENDSCAN
USE IN _menu
IF this.ListCount>0
	this.ListIndex=1
ENDIF
this.parent.cmdRun.Refresh

ENDPROC
PROCEDURE InteractiveChange
this.parent.cmdRun.Refresh

ENDPROC
PROCEDURE MouseUp
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.InteractiveChange

ENDPROC
iPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = -23
Top = -28
Width = 52
Name = "Image28"
Image28imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = -23
Top = 140
Width = 52
Name = "Image27"
wzquickstartformImage27imageimagewzquickstartform{PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode=23 OR nKeyCode=27
	this.Release
ENDIF

ENDPROC
hPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = -23
Top = 56
Width = 52
Name = "Image26"
Image26imageimagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 38
Top = 260
Width = 52
Name = "Image25"
wzquickstartformImage25imageimagefPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 38
Top = 8
Width = 52
Name = "Image24"
wzquickstartformImage24imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 102
Top = 224
Width = 52
Name = "Image21"
wzquickstartformImage21imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 102
Top = -28
Width = 52
Name = "Image20"
wzquickstartformImage20imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 164
Top = 261
Width = 52
Name = "Image17"
wzquickstartformImage17imageimagegPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 164
Top = 9
Width = 52
Name = "Image16"
wzquickstartformImage16imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 224
Top = 224
Width = 52
Name = "Image13"
wzquickstartformImage13imageimageiPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 226
Top = -28
Width = 52
Name = "Image12"
wzquickstartformImage12imageimagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 288
Top = 266
Width = 52
Name = "Image9"
wzquickstartformImage9imageimagewzquickstartformImage8�� ���%����U8����%��������1�
�����UNKEYCODE
NSHIFTALTCTRLTHISRELEASEKeyPress,��1���A2p)�gPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 288
Top = 14
Width = 52
Name = "Image8"
imageimagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 288
Top = 182
Width = 52
Name = "Image5"
wzquickstartformImage5imageimagegPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 288
Top = 98
Width = 52
Name = "Image3"
wzquickstartformImage3imageimagewzquickstartformImage1image�Height = 250
Width = 375
DoCreate = .T.
AutoCenter = .T.
BorderStyle = 2
Caption = "About"
FontSize = 8
MaxButton = .F.
MinButton = .F.
KeyPreview = .T.
WindowType = 1
AlwaysOnTop = .T.
Name = "wzaboutdialog"
hPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 347
Top = 224
Width = 52
Name = "Image1"
imagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 347
Top = -28
Width = 52
Name = "Image7"
wzquickstartformImage7imageimagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 257
Top = 304
Width = 52
Name = "Image6"
wzquickstartformImage6imageimagehPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 347
Top = 140
Width = 52
Name = "Image4"
wzquickstartformImage4imageimagegPicture = foxqstrt.bmp
BackStyle = 0
Height = 58
Left = 347
Top = 56
Width = 52
Name = "Image2"
wzquickstartformImage2imageimage�nfilecount Number of files in the form file list.
^acommands[1,0] Array of commands executed for each item in the forms list.
2�� �x%&�l�Ut&�G&(�Ut&�G&(�UnG2�G�Gk(��MACHINE��GA�G	 �G
(��	��G�G�G$(����G_ �G;(��.��G.�G^�U8����%��������1�
�����UNKEYCODE
NSHIFTALTCTRLTHISRELEASE
Deactivate,��Activate>��LoadP��KeyPress���1Qa3Qa3aa!aa�aa�a�aa3���A27Vw���)PROCEDURE Deactivate
ACTIVATE SCREEN
SET MESSAGE TO

ENDPROC
PROCEDURE Activate
ACTIVATE SCREEN
SET MESSAGE TO

ENDPROC
PROCEDURE Load
SET TALK OFF
SET ESCAPE OFF
SET COLLATE TO 'MACHINE'
SET COMPATIBLE OFF
SET CONFIRM ON
SET DECIMALS TO 9
SET EXACT OFF
SET EXCLUSIVE OFF
SET MEMOWIDTH TO 1024
SET MULTILOCKS ON
SET POINT TO '.'
SET SAFETY OFF
SET UDFPARMS TO VALUE

ENDPROC
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode=23 OR nKeyCode=27
	this.Release
ENDIF

ENDPROC
�DataSession = 2
Height = 250
Width = 375
DoCreate = .T.
AutoCenter = .T.
BorderStyle = 2
Caption = "Quick Start"
FontSize = 8
KeyPreview = .T.
BackColor = 192,192,192
nfilecount = 0
Name = "wzquickstartform"
�cstartupform Form (SCX) which is executed when the application object is shown.
cstartupmenu Menu (MPR) which is executed when the application object is shown.
ccaption Caption of the application object.
cicon Icon of the application object.
clasticon Last icon setting of _screen before application object was intantiated.
clastcaption Last caption setting of _screen before application object was intantiated.
nformcount Forms collection count for application object.
npixeloffset Number of pixels which offset multiple instances of the same form.
lcascadeforms Specifies whether forms are cascaded if multiple instances of the same form are opened in the same top and left positions of the desktop.
lreadevents Enable READ EVENTS within ReadEvents method.
*show Displays the application.
*release Releases the application from memory.
*doform Executes an SCX form.
*doreport Executes an FRX report.
*dolabel Executes an LBX label
*domenu Executes an MPR menu.
*clearevents Clears any pending read events.
*readevents Starts read events mode.
*doprogram Executes a PRG, APP, or EXE program.
*setcaption Sets the caption of the application.
*seticon Sets the icon of the application.
*saveenvironment Saves environment settings.
*restoreenvironment Restores environment settings.
^aforms[1,0] Forms collection for application object.
*filenotfoundmsgbox Displays a File Not Found messagebox.
*getcaption Returns the caption of the application.
*geticon Returns the icon of the application.
*beforereadevents Method executed before READ EVENTS is executed when ReadEvents is called.
*onshutdown Occurs when the user attempts to exit Visual FoxPro.
*releaseforms Release all application forms from memory.
*releaseform Release specifc or active form from memory.
^aformnames[1,0] Form name collection for application object.
*resetformscollection Reset arrays and counters of forms collection.
*refreshformscollection Refresh forms collection arrays and counters.
��� ��T�%^53�U:�����C��������C������
����UNSTYLETHISDOMENUCSTARTUPMENUDOFORMCSTARTUPFORM
READEVENTS1%�C��
���B�-���
����<��UTHISRELEASEFORMSCLEAREVENTS�������#�������	�
�����
�T��C����%�C����f�B�-���-T��CC�tcClassb�C�
CC��@��6��T��CC��@��%��.�
����)T���CC���
�.scx��.vcx6���%�C�0
�����C�����B�-���&T��CC�������,�6��
%��������	���(�������M%�C�	����C�this.aForms[lnCount]b�O	�CC�	���
	���������	���B�-������
����T��������#�������������T����������%�C��
����
G~(����T�������C��N��L%��
�'C�this.aForms[this.nFormCount]b�O	�CC�����
	��������������������J���������T�
�����
����<%�������
	�CC�����@�form	����T��C������T�
�����T������T������%�C������	������	���(������v�T��C�	����#%�C�oForm2b�O�C�����.��8%�����C��C���	�C��C���	��r�T�
��
����T����������%����
����T����
���%��������T���������%��
��������������U
TCFILENAMETCCLASSTLNOMULTIPLEINSTANCESTLNOSHOW
LCFILENAMELCCLASSOFORMOFORM2LCNAMELNCOUNTLNTOPLNLEFT
LCFORMNAMELNFORMCOUNTTHISFILENOTFOUNDMSGBOX
NFORMCOUNT
AFORMNAMESAFORMSSHOWREFRESHFORMSCOLLECTION
LCASCADEFORMS	BASECLASSTOPLEFTNAMEWINDOWSTATENPIXELOFFSET��������T��C����%�C����7�B�-���T��CC��@��%��.�
��t�T����.frx���%�C�0
������C�����B�-���
%������?���(!"����?������U
TCFILENAMETLPRINT
LCFILENAMETHISFILENOTFOUNDMSGBOX��������T��C����%�C����7�B�-���T��CC��@��%��.�
��t�T����.lbx���%�C�0
������C�����B�-���
%������*���(!"����*������U
TCFILENAMETLPRINT
LCFILENAMETHISFILENOTFOUNDMSGBOX�������T��C����%�C����3�B�-���T��CC��@��%��.�
��p�T����.mpr���#%�C�0
�CC���@�mpr	����T��C��mpx����%�C�0
������C�����B�-���
����U
TCFILENAME
LCFILENAMETHISFILENOTFOUNDMSGBOX�U&
����%������9��UTHISBEFOREREADEVENTSLREADEVENTS�������T��C����%�C����3�B�-���T��CC��@��%��.�
��p�T����.prg���#%�C�0
�CC���@�prg	����T��C��fxp����%�C�0
������C�����B�-���
����U
TCFILENAME
LCFILENAMETHISFILENOTFOUNDMSGBOXQ���%�C�	tcCaptionb�C��+�B�-���T������T�9�����U	TCCAPTIONTHISCCAPTIONCAPTIONN���%�C�tcIconb�C��(�B�-���T������T�9�����UTCICONTHISCICONICON'T����9���T����9���UTHISCLASTCAPTIONCAPTION	CLASTICONICONw$%�C���
��9���
	��6�T�9�������$%�C���
��9���
	��p�T�9�������UTHISCLASTCAPTIONCAPTION	CLASTICONICON8���.B�C�File "��" not found.��9��x��U
TCFILENAMECAPTIONB�����UTHISCCAPTIONB�����UTHISCICONE:%�C�Are you sure you want to exit?�$�9��x���>�8��UCAPTIONs���
����+������l�T������+%�CC�����
������h�B�-����ULNFORMCOUNTTHISREFRESHFORMSCOLLECTION
NFORMCOUNTRELEASEFORMAFORMS����%�C���_�1%�C�_screen.ActiveFormb�O�C�9����O�B�-�����9������#%�C�toFormb�O�C������B�-���
�����
����UTOFORM
ACTIVEFORMRELEASETHISREFRESHFORMSCOLLECTIONNT�����������������T����T������UTHIS
NFORMCOUNTAFORMS
AFORMNAMES�����
T�����+������m�:%�C�this.aForms[lnCount]b�O�CC����
	��|�T������.�������(�������!T������C������T��������!T������C������T������������T��������%������F�!��#��������������%��������
�����ULNCOUNTLNCOUNT2THIS
NFORMCOUNTAFORMS
AFORMNAMESRESETFORMSCOLLECTION
����
����UTHISSAVEENVIRONMENTRESETFORMSCOLLECTION�
����UTHISRESTOREENVIRONMENTshow,��release���doform��doreport8��dolabelQ��domenuj	��clearevents�
��
readevents�
��	doprogram�
��
setcaption��seticon~��saveenvironment���restoreenvironmentD
��filenotfoundmsgbox�
��
getcaption>��geticona��
onshutdown���releaseforms���releaseform���resetformscollection���refreshformscollection���Init���Destroy.��1q21�3!qA�q311���qA�1�AqAa���1qAAA�q1����aA��A��q��Q1AA�AAAAAAAAAA�aA3�q��qA1QAqA����A3�q��qA1QAqA����A3qq��qA1QA1aAqA�3Q3�QA3qq��qA1QA1aAqA�3q�qA�3q�qA�3!!3A!AA!A3q�3�3�3�AA3q�Q�qAA3qqA��1qA�A�3��3��Q�AA���AqAAA1AA�A3��3Q�2w��	�	P�	j]d�%
txB
�����@����N��o���q���������l�����������d���c������1�^���7�=d<)�oPROCEDURE show
LPARAMETERS nStyle

this.DoMenu(this.cStartupMenu)
this.DoForm(this.cStartupForm)
this.ReadEvents

ENDPROC
PROCEDURE release
IF NOT this.ReleaseForms()
	RETURN .F.
ENDIF
this.ClearEvents
RELEASE this

ENDPROC
PROCEDURE doform
LPARAMETERS tcFileName,tcClass,tlNoMultipleInstances,tlNoShow
LOCAL lcFileName,lcClass,oForm,oForm2,lcName,lnCount,lnTop,lnLeft
LOCAL lcFormName,lnFormCount

lcFileName=ALLTRIM(tcFileName)
IF EMPTY(lcFileName)
	RETURN .F.
ENDIF
lcClass=IIF(TYPE("tcClass")=="C",LOWER(ALLTRIM(tcClass)),"")
lcFileName=LOWER(FULLPATH(lcFileName))
IF NOT "."$lcFileName
	lcFileName=lcFileName+IIF(EMPTY(lcClass),".scx",".vcx")
ENDIF
IF NOT FILE(lcFileName)
	this.FileNotFoundMsgBox(lcFileName)
	RETURN .F.
ENDIF
lcFormName=IIF(EMPTY(lcClass),lcFileName,lcFileName+","+lcClass)
IF tlNoMultipleInstances
	FOR lnCount = 1 TO this.nFormCount
		IF this.aFormNames[lnCount]==lcFormName AND ;
				TYPE("this.aForms[lnCount]")=="O" AND ;
				NOT ISNULL(this.aForms[lnCount])
			this.aForms[lnCount].Show
			RETURN .F.
		ENDIF
	ENDFOR
ENDIF
this.RefreshFormsCollection
this.nFormCount=this.nFormCount+1
DIMENSION this.aForms[this.nFormCount],this.aFormNames[this.nFormCount]
this.aFormNames[this.nFormCount]=lcFormName
IF NOT EMPTY(lcClass)
	SET CLASSLIB TO (lcFileName) ADDITIVE
	this.aForms[this.nFormCount]=CREATEOBJECT(lcClass)
	IF NOT tlNoShow AND TYPE("this.aForms[this.nFormCount]")=="O" AND ;
			NOT ISNULL(this.aForms[this.nFormCount])
		this.aForms[this.nFormCount].Show
	ENDIF
ELSE
	DO FORM (lcFileName) NAME this.aForms[this.nFormCount] LINKED NOSHOW
ENDIF
lnFormCount=this.nFormCount
this.RefreshFormsCollection
IF this.lCascadeForms AND this.nFormCount>=lnFormCount AND ;
		LOWER(this.aForms[this.nFormCount].BaseClass)=="form"
	oForm=this.aForms[this.nFormCount]
	lnTop=oForm.Top
	lnLeft=oForm.Left
	lcName=oForm.Name
	IF WEXIST(lcName) AND oForm.WindowState#2
		FOR lnCount = 1 TO (this.nFormCount-1)
			oForm2=this.aForms[lnCount]
			IF TYPE("oForm2")#"O" OR ISNULL(oForm2)
				LOOP
			ENDIF
			IF lcName==oForm2.Name AND WLROW(lcName)=WLROW(oForm2.Name) AND ;
					WLCOL(lcName)=WLCOL(oForm2.Name)
				lnTop=lnTop+this.nPixelOffset
				lnLeft=lnLeft+this.nPixelOffset
			ENDIF
		ENDFOR
		IF oForm.Top#lnTop
			oForm.Top=lnTop
		ENDIF
		IF oForm.Left#lnLeft
			oForm.Left=lnLeft
		ENDIF
	ENDIF
ENDIF
IF NOT tlNoShow
	this.aForms[this.nFormCount].Show
ENDIF

ENDPROC
PROCEDURE doreport
LPARAMETERS tcFileName,tlPrint
LOCAL lcFileName

lcFileName=ALLTRIM(tcFileName)
IF EMPTY(lcFileName)
	RETURN .F.
ENDIF
lcFileName=LOWER(FULLPATH(lcFileName))
IF NOT "."$lcFileName
	lcFileName=lcFileName+".frx"
ENDIF
IF NOT FILE(lcFileName)
	this.FileNotFoundMsgBox(lcFileName)
	RETURN .F.
ENDIF
IF tlPrint
	REPORT FORM (lcFileName) TO PRINTER PROMPT
ELSE
	REPORT FORM (lcFileName) PREVIEW
ENDIF

ENDPROC
PROCEDURE dolabel
LPARAMETERS tcFileName,tlPrint
LOCAL lcFileName

lcFileName=ALLTRIM(tcFileName)
IF EMPTY(lcFileName)
	RETURN .F.
ENDIF
lcFileName=LOWER(FULLPATH(lcFileName))
IF NOT "."$lcFileName
	lcFileName=lcFileName+".lbx"
ENDIF
IF NOT FILE(lcFileName)
	this.FileNotFoundMsgBox(lcFileName)
	RETURN .F.
ENDIF
IF tlPrint
	LABEL FORM (lcFileName) TO PRINTER PROMPT
ELSE
	LABEL FORM (lcFileName) PREVIEW
ENDIF

ENDPROC
PROCEDURE domenu
LPARAMETERS tcFileName
LOCAL lcFileName

lcFileName=ALLTRIM(tcFileName)
IF EMPTY(lcFileName)
	RETURN .F.
ENDIF
lcFileName=LOWER(FULLPATH(lcFileName))
IF NOT "."$lcFileName
	lcFileName=lcFileName+".mpr"
ENDIF
IF NOT FILE(lcFileName) AND LOWER(JUSTEXT(lcFileName))=="mpr"
	lcFileName=FORCEEXT(lcFileName,"mpx")
ENDIF
IF NOT FILE(lcFileName)
	this.FileNotFoundMsgBox(lcFileName)
	RETURN .F.
ENDIF
DO (lcFileName)

ENDPROC
PROCEDURE clearevents
CLEAR EVENTS

ENDPROC
PROCEDURE readevents
this.BeforeReadEvents
IF this.lReadEvents
	READ EVENTS
ENDIF

ENDPROC
PROCEDURE doprogram
LPARAMETERS tcFileName
LOCAL lcFileName

lcFileName=ALLTRIM(tcFileName)
IF EMPTY(lcFileName)
	RETURN .F.
ENDIF
lcFileName=LOWER(FULLPATH(lcFileName))
IF NOT "."$lcFileName
	lcFileName=lcFileName+".prg"
ENDIF
IF NOT FILE(lcFileName) AND LOWER(JUSTEXT(lcFileName))=="prg"
	lcFileName=FORCEEXT(lcFileName,"fxp")
ENDIF
IF NOT FILE(lcFileName)
	this.FileNotFoundMsgBox(lcFileName)
	RETURN .F.
ENDIF
DO (lcFileName)

ENDPROC
PROCEDURE setcaption
LPARAMETERS tcCaption

IF TYPE("tcCaption")#"C"
	RETURN .F.
ENDIF
this.cCaption=tcCaption
_screen.Caption=tcCaption

ENDPROC
PROCEDURE seticon
LPARAMETERS tcIcon

IF TYPE("tcIcon")#"C"
	RETURN .F.
ENDIF
this.cIcon=tcIcon
_screen.Icon=tcIcon

ENDPROC
PROCEDURE saveenvironment
this.cLastCaption=_screen.Caption
this.cLastIcon=_screen.Icon

ENDPROC
PROCEDURE restoreenvironment
IF NOT EMPTY(this.cLastCaption) AND NOT _screen.Caption==this.cLastCaption
	_screen.Caption=this.cLastCaption
ENDIF
IF NOT EMPTY(this.cLastIcon) AND NOT _screen.Icon==this.cLastIcon
	_screen.Icon=this.cLastIcon
ENDIF

ENDPROC
PROCEDURE filenotfoundmsgbox
LPARAMETERS tcFileName

RETURN MESSAGEBOX([File "]+tcFileName+[" not found.],16,_screen.Caption)

ENDPROC
PROCEDURE getcaption
RETURN this.cCaption

ENDPROC
PROCEDURE geticon
RETURN this.cIcon

ENDPROC
PROCEDURE onshutdown
#DEFINE EXIT_LOC	"Are you sure you want to exit?"
IF MESSAGEBOX(EXIT_LOC,36,_screen.Caption)=6
	QUIT
ENDIF

ENDPROC
PROCEDURE releaseforms
LOCAL lnFormCount

this.RefreshFormsCollection
DO WHILE this.nFormCount>0
	lnFormCount=this.nFormCount
	IF NOT this.ReleaseForm(this.aForms[lnFormCount]) OR this.nFormCount=lnFormCount
		RETURN .F.
	ENDIF
ENDDO

ENDPROC
PROCEDURE releaseform
LPARAMETERS toForm

IF PARAMETERS()=0
	IF TYPE("_screen.ActiveForm")#"O" OR ISNULL(_screen.ActiveForm)
		RETURN .F.
	ENDIF
	_screen.ActiveForm.Release
ELSE
	IF TYPE("toForm")#"O" OR ISNULL(toForm)
		RETURN .F.
	ENDIF
	toForm.Release
ENDIF
this.RefreshFormsCollection

ENDPROC
PROCEDURE resetformscollection
this.nFormCount=0
DIMENSION this.aForms[1],this.aFormNames[1]
this.aForms=.NULL.
this.aFormNames=""

ENDPROC
PROCEDURE refreshformscollection
LOCAL lnCount,lnCount2

lnCount=1
DO WHILE lnCount<=this.nFormCount
	IF TYPE("this.aForms[lnCount]")=="O" AND NOT ISNULL(this.aForms[lnCount])
		lnCount=lnCount+1
		LOOP
	ENDIF
	FOR lnCount2 = lnCount TO (this.nFormCount-1)
		this.aForms[lnCount2]=this.aForms[lnCount2+1]
		this.aForms[lnCount2+1]=.NULL.
		this.aFormNames[lnCount2]=this.aFormNames[lnCount2+1]
		this.aFormNames[lnCount2+1]=""
	ENDFOR
	this.nFormCount=this.nFormCount-1
	IF this.nFormCount=0
		EXIT
	ENDIF
	DIMENSION this.aForms[this.nFormCount],this.aFormNames[this.nFormCount]
ENDDO
IF this.nFormCount=0
	this.ResetFormsCollection
ENDIF

ENDPROC
PROCEDURE Init
this.SaveEnvironment
this.ResetFormsCollection

ENDPROC
PROCEDURE Destroy
CLEAR EVENTS
this.RestoreEnvironment

ENDPROC
formform