//---------------------------------------------------------------------------

#include <vcl.h>
#include "tsplash.h"
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("src\clientes.cpp", gestionClientes);
USEFORM("src\tsplash.cpp", Splash);
USEFORM("src\agentes.cpp", gestionAgentes);
USEFORM("src\imprimirClientes.cpp", imprimirCarteraClientes);
USEFORM("src\cuentaPolizas.cpp", gestionCuentaPolizas);
USEFORM("src\imprimirCuentaPolizas.cpp", imprCuentaPolizas);
USEFORM("src\imprimirFichaCliente.cpp", imprFichaCliente);
USEFORM("src\login_dlg.cpp", login);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try {//outer finally
        try
        {
                 Application->Initialize();
                 Splash = new TSplash(NULL);
                 Splash->Show();
                 Splash->Repaint();
                 
                 Application->CreateForm(__classid(TgestionClientes), &gestionClientes);
                 Application->Run();
        }
        catch (Exception &exception)
        {
                 Application->ShowException(&exception);
        }
        catch (...)
        {
                 try
                 {
                         throw Exception("");
                 }
                 catch (Exception &exception)
                 {
                         Application->ShowException(&exception);
                 }
	}
}
__finally{
	if(Splash)
	    delete Splash;
}  
        return 0;
}
//---------------------------------------------------------------------------
