Einzelnen Beitrag anzeigen

Fallenzer

Registriert seit: 3. Aug 2019
Ort: Wernigerode, Sachsen-Anhalt, DE
29 Beiträge
 
Delphi 10.3 Rio
 
#1

Variante des Typs (null) nicht in Typ (OleStr) konvertierbar

  Alt 23. Feb 2020, 16:25
Hallo und guten Tag,

letztens habe ich versucht, einen Splashscreen zu programmieren.

Code für Splashscreen:

Delphi-Quellcode:
unit Unit5;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TForm5 = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Timer1: TTimer;
    procedure FormShow(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    Completed: Boolean;
  end;

var
  Form5: TForm5;

implementation

{$R *.dfm}

 procedure TForm5.FormShow(Sender: TObject);
begin
  OnShow := nil;
  Completed := False;
  Timer1.Interval := 3000;
  Timer1.Enabled := True;
end;

procedure TForm5.Timer1Timer(Sender: TObject);
begin
  Self.Close; // Letzte Änderung
end;


end.
Code für Projektdatei:

Delphi-Quellcode:
program Project1;

uses
  Vcl.Forms,
  Unit1 in 'Unit1.pas{Form1},
  Unit2 in 'Unit2.pas{Form2},
  Unit3 in 'Unit3.pas{Form3},
  Unit4 in 'Unit4.pas{Form4},
  Vcl.Themes,
  Vcl.Styles,
  Unit5 in 'Unit5.pas{Form5};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.Title := 'Danilos Market Solution [beta v.4,3]';
  Form5 := TForm5.Create(nil) ;

  {  try                    }
  {    Form5.ShowModal;     }
  {  finally                }  // LETZTE ÄNDERUNG
  {    Form5.Free;          }
  {  end;                   }

  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm4, Form4);
  Application.Run;
end.
Copilieren hat nicht funktioniert, erneutes Öffnen des Projekts ebenfalls... -> Fehlermeldung

Ich würde mich auf schnelle Hilfe freuen...
Danilo Bleul (existiert seit 2005)
  Mit Zitat antworten Zitat