ScreenSaverC.cpp 926 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include <tchar.h>
  5. //---------------------------------------------------------------------------
  6. USEFORM("fMain2C.cpp", Form2);
  7. USEFORM("fMain1C.cpp", Form1);
  8. //---------------------------------------------------------------------------
  9. int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
  10. {
  11. try
  12. {
  13. Application->Initialize();
  14. Application->MainFormOnTaskBar = true;
  15. Application->CreateForm(__classid(TForm1), &Form1);
  16. Application->CreateForm(__classid(TForm2), &Form2);
  17. Application->Run();
  18. }
  19. catch (Exception &exception)
  20. {
  21. Application->ShowException(&exception);
  22. }
  23. catch (...)
  24. {
  25. try
  26. {
  27. throw Exception("");
  28. }
  29. catch (Exception &exception)
  30. {
  31. Application->ShowException(&exception);
  32. }
  33. }
  34. return 0;
  35. }
  36. //---------------------------------------------------------------------------