PARAMETERS cBdd


SET TALK off
SET STATUS BAR OFF
SET SYSMENU off
SET DELETED on
SET CONFIRM OFF
SET NOTIFY off
SET SAFETY off
SET CENTURY ON
SET DATE TO DMY
SET FIXED OFF
SET DECIMALS TO 6
SET ESCAPE off

*** Clases para el manejo de Web
SET PATH TO ".\classes" ADDITIVE
SET PROCEDURE TO wwHTTP ADDITIVE   
SET PROCEDURE TO wwAPI ADDITIVE
SET PROCEDURE TO wwFTP ADDITIVE
SET PROCEDURE TO wwUtils ADDITIVE
SET PROCEDURE TO classes\wwEval ADDITIVE
*SET PROCEDURE TO source\compelec additive

*On Shutdown CloseApplication()



_screen.Visible = .t.
_screen.Caption = 'Ghost - Sistema Operacional para VisualFAC'
_screen.AutoCenter= .T.
_screen.Icon = 'logo.ICO'
_screen.AutoCenter = .t.
_screen.Closable = .t.

DECLARE Sleep IN Win32API INTEGER   

DO classes\wwapi.prg


cFileConfig = ALLTRIM(transform(SYS(11,DATE())))
cFileConfigIdc = cFileConfig+'.idc'

cFileConfig0 = ALLTRIM(transform(VAL(SYS(11,DATE()))-1))
cFileConfigIdc0 = cFileConfig0+'.idc'

IF FILE(cFileConfig0)
	DELETE FILE (cFileConfig0)
	DELETE FILE (cFileConfigIdc0)
ENDIF

DO prg\app.prg WITH cBdd 
oApp.loadGhost()
oApp.setGhost(.T.)

Do Form form\ghost
Read Events

*Function CloseApplication

	RELEASE oHTTP, oIP

   * Destroy BindWindowsEventsProxy object
   If Type("_vfp.BindWindowsEventsProxy")<>"U"
      _vfp.BindWindowsEventsProxy = Null
   Endif

   Set Library To

   	_SCREEN.WindowState = 0
   
	_SCREEN.WindowState = 2
	CLEAR ALL
	CLOSE ALL
	SET SYSMENU TO defa

   On Shutdown
   Clear Events
   If _vfp.StartMode > 0
      Quit
   Endif
*   Return
*ENDFUNC
