//---------------------------------------------------------------------------
#include "Unit4.h" //ESTA LINEA LA PUSE YO |Incluir el .h correspondiente al form Splash Screen
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
USEFORM("Unit2.cpp", Form2);
USEFORM("Unit3.cpp", Form3);
USEFORM("Unit4.cpp", SplashScreen);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try{//ESTA LINEA LA PUSE YO | Creen un try
try
{
Application->Initialize();
SplashScreen = new TSplashScreen(NULL);/*ESTA LINEA LA PUSE YO | cambiar SplashScreen x el nombre que le hayan puesto ustedes*/
SplashScreen->Show();//ESTA LINEA LA PUSE YO
SplashScreen->Repaint();//ESTA LINEA LA PUSE YO |
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TForm2), &Form2);
Application->CreateForm(__classid(TForm3), &Form3);
Application->CreateForm(__classid(TSplashScreen), &SplashScreen);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
}//ESTA LINEA LA PUSE YO | cierren aqui el try luego de los catch
__finally{ //ESTA LINEA LA PUSE YO
if(SplashScreen) //ESTA LINEA LA PUSE YO
delete SplashScreen;//ESTA LINEA LA PUSE YO
} //ESTA LINEA LA PUSE YO
return 0;
}
//---------------------------------------------------------------------------