Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 04.04.05 12:29 
Hi Leutz wie kann ich machen das bei meinem Countdown in Prozent anzeigt wird wie weit der Coutdown schon Abgelaufen ist.
Falls es geht soll dies noch Grafisch Dargestellt werden.

Sorry bin ja ein Nob brauche es ganz genau beschrieben.
DHX ;)
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 04.04.05 12:32 
user profile iconDelphiDelphin hat folgendes geschrieben:
Hi Leutz wie kann ich machen das bei meinem Countdown in Prozent anzeigt wird wie weit der Coutdown schon Abgelaufen ist.

Wie wäre es mit einfacher Mathematik? Wann war Prozentrechnung dran? :gruebel:

Zitat:
Falls es geht soll dies noch Grafisch Dargestellt werden.

Suche in: Delphi-Forum, Delphi-Library "PROGRESSBAR", als ein Beispiel. Es gibt sogar noch den alten Win3.1-Progressbar, der nicht nur den Fortschritt, sondern auch gleich den Prozentwert anzeigt.
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 04.04.05 14:00 
Habs Fast Geschafft wen ich nur wüste was daran falsch ist??


ausblenden Delphi-Quelltext
1:
Progressbar1.Max := (Edit1.Text);					
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 04.04.05 14:21 
strtoint
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 04.04.05 14:22 
DHX ;)
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 04.04.05 19:41 
Hi ich hab geschafft das es Grafisch dargestellt wir aber ich komme einfach nicht weiter dass es 1% dan 2% usw anzeigt brauche Hilfe.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 04.04.05 20:00 
Wie wäre es mit etwas Quellcode?
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Di 05.04.05 11:49 
Wie der herr es wünsche :D

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, XPMan, ExtCtrls;

type
  TForm3 = class(TForm)
    ProgressBar1: TProgressBar;
    Button1: TButton;
    Label1: TLabel;
    Timer1: TTimer;
    Panel1: TPanel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Label4: TLabel;
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);

    procedure Button1Click(Sender: TObject);
  private
   h:Integer;
   i:Integer;
   l:extended;
   d:extended;
  public
    { Public-Deklarationen }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.Button1Click(Sender: TObject);
begin
begin
i:= Strtoint(Edit1.Text);
h:= 0;
Progressbar1.Max:= Strtoint(Edit1.Text);
Timer1.Enabled:= True;
end;
end;


procedure TForm3.FormCreate(Sender: TObject);
begin
Timer1.Enabled:= False;
end;

procedure TForm3.Timer1Timer(Sender: TObject);
begin
begin
inc(h);
Progressbar1.Position:= (h);
Panel1.Caption:= Inttostr (i-h);
if i = h then
begin
Timer1.Enabled:= False;
Showmessage  ('Countdown Abgelaufen');
Progressbar1.position:= 0;

end;
end;
end;

end.