Einzelnen Beitrag anzeigen

technik05

Registriert seit: 16. Mär 2008
51 Beiträge
 
#1

Ich würde gerne mitzählen, wie oft Form1 geöffnet wurde!

  Alt 18. Aug 2008, 16:58
Hallo

Ich würde gerne mitzählen, wie oft Form1 geöffnet wurde!
Auf Form1 sichtbar, geht das ????
Bitte Quelltext einfügen oder beschreiben, habe immer noch keine Ahnung

Delphi-Quellcode:
 Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, ComCtrls, DBTables, StdCtrls, jpeg;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    Label1: TLabel;
    Label2: TLabel;
    ProgressBar1: TProgressBar;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    procedure Timer1Timer(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
ProgressBar1.StepIt;
  if ProgressBar1.Position < 1 then
    Close;
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
 ProgressBar1.Min := 0;
  ProgressBar1.Max := 60;
  ProgressBar1.Position := ProgressBar1.Max;
  ProgressBar1.Step := -1;
end;

end.
  Mit Zitat antworten Zitat