Unlike many programming languages Lazarus does not allow splash screens to be called within the Create Event of the Main form. This is because of the way forms are created within the Lazarus IDE. To call a splash screen open the lpr file and add the code to show the splash screen.



  Application.Initialize;

  Application.CreateForm(TfrmMain, frmMain);

  Application.CreateForm(TfrmSplash, frmSplash);

  frmSplash.ShowModal;

  frmSplash.Free;

  frmSplash := nil;

  Application.Run;



The code for the Quick Clock Quizzer can be download on the Tutorial 32 page



Video:  Free Pascal Tutorial 29 - Making A Splash Screen - Quick Clock Quizzer - Lazarus






Previous                   Next