Unit Unit1;
Interface
Uses Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;
Type TForm1 =
Class(TForm)
Timer1: TTimer;
OpenDialog1: TOpenDialog;
Procedure FormCreate(Sender: TObject);
Procedure FormDestroy(Sender: TObject);
Procedure Timer1Timer(Sender: TObject);
End;
Var Form1: TForm1;
Nachricht:
String;
Canv: TCanvas;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate(Sender: TObject);
Begin
Canv := TCanvas.Create;
Canv.Handle := GetWindowDC(WindowHandle);
OpenDialog1.Execute;
Nachricht := ExtractFileName(OpenDialog1.FileName);
With Canv
do Begin
Font.
Name := '
Arial';
Font.Size := 24;
Brush.Style := bsClear;
End;
{Timer1.Interval := Anzeigeintervall;}
{Timer1.Tag := 0;}
{Timer1.Enabled := True;}
End;
Procedure TForm1.FormDestroy(Sender: TObject);
Begin
Canv.Free;
End;
Procedure TForm1.Timer1Timer(Sender: TObject);
Begin
(* Text zeichnen *)
Font.Color := clBlack;
Canv.TextOut(Screen.Width
div 2 - Canv.TextWidth(Nachricht)
div 2,
Screen.Height
div 2 - Canv.TextHeight(Nachricht)
div 2, Nachricht);
Sleep(1);
(* Text löschen *)
Font.Color := clWhite;
Canv.TextOut(Screen.Width
div 2 - Canv.TextWidth(Nachricht)
div 2,
Screen.Height
div 2 - Canv.TextHeight(Nachricht)
div 2, Nachricht);
End;
End.