Autor Beitrag
whitef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: So 22.07.07 15:59 
hi,
wollte mal fragen ob jemand weiss wie wam diese JvXPProgressBar laufen lassen kann wie beim windows start?

JvXPProgressBar ist eine JVCL Komponente


also mit .position kann man die festlegen wo die balken erscheinen soll...
aber das wär zu umständlich und sieht nicht toll aus.

wäre nett wenn mir jemand helfen könnte...


mfg
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 22.07.07 16:08 
soweit ich weiß gibts bei den Jedikomponenten immer demos auch. vielleicht helfen die dir weiter oder du kannst dir die Jedi hilfe runterladen.

lg elundril
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: So 22.07.07 16:19 
mh... finde keine hilfe oder ähnliches... kann mir einer n simples beispiel geben?
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 22.07.07 16:23 
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: So 22.07.07 17:34 
ich blick da immer noch net durch, die scheiß progressbar soll nur so 3 balken anzeigen die andauernd wieder durchlaufen von links nach rechts...

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:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, JvTimer, JvExControls, JvLabel, JvSlider, StdCtrls, ExtCtrls, ComCtrls,
  JvExStdCtrls, JvEdit, JvButton, JvTransparentButton, JvListBox, JvLED, winsock,
  IdBaseComponent, IdComponent, IdRawBase, IdRawClient, IdIcmpClient,
  JvComponentBase, JvErrorIndicator, JvProgressBar, JvXPProgressBar;

type
    TForm1 = class(TForm)
    JvLabel1: TJvLabel;
    JvEdit1: TJvEdit;
    JvTransparentButton1: TJvTransparentButton;
    JvTransparentButton2: TJvTransparentButton;
    JvLED1: TJvLED;
    JvListBox1: TJvListBox;
    Timer1: TTimer;
    JvEdit2: TJvEdit;
    JvLabel2: TJvLabel;
    JvLabel3: TJvLabel;
    IdIcmpClient1: TIdIcmpClient;
    JvLabel4: TJvLabel;
    JvLED2: TJvLED;
    JvGradientProgressBar1: TJvGradientProgressBar;
    Timer2: TTimer;
    JvXPProgressBar1: TJvXPProgressBar;
    procedure JvTransparentButton1Click(Sender: TObject);
    procedure JvTransparentButton2Click(Sender: TObject);
    procedure JvEdit1Change(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);


  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;


implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.JvEdit1Change(Sender: TObject);
begin
if JvEdit1.Text = '' then
else
Timer1.Interval := StrToInt(JvEdit1.Text);
end;




 //// PING
procedure TForm1.JvTransparentButton1Click(Sender: TObject);
begin
if JvEdit1.Text = '' then
else
Timer1.Enabled := True;
Timer2.Enabled := True;
JvEdit1.Enabled := False;
JvEdit2.Enabled := False;
end;




 //// STOP
procedure TForm1.JvTransparentButton2Click(Sender: TObject);
begin
Timer1.Enabled := False;
Timer2.Enabled := False;
  JvLED1.ColorOn := clRed;
  JvLED1.ColorOff := clRed;
  JvLED2.ColorOn := clRed;
  JvLED2.ColorOff := clRed;
  JvEdit1.Enabled := True;
  JvEdit2.Enabled := True;
  JvXPProgressBar1.position := 0;
end;


 //// PING - Vorgang (Timer)
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  JvListBox1.ItemIndex := JvListBox1.Items.Count -1;
  IdIcmpClient1.Host := JvEdit2.Text;
  IdIcmpClient1.Ping(JvEdit1.Text);

  if IdIcmpClient1.ReplyStatus.BytesReceived > 0 Then
  begin
  Application.ProcessMessages;
  JvListBox1.Items.add(FormatDateTime('hh:nn:ss', time)+ ' - ' + JvEdit2.Text +' Host erreichbar');
  JvLED1.ColorOn := clLime;
  JvLED1.ColorOff := clLime;
  JvLED2.ColorOn := clLime;
  JvLED2.ColorOff := clLime;
  end
  else
  begin
  JvListBox1.Items.add(FormatDateTime('hh:nn:ss', time)+ ' - ' + JvEdit2.Text +' Host nicht erreichbar');
  JvLED1.ColorOn := clRed;
  JvLED1.ColorOff := clRed;
  JvLED2.ColorOn := clRed;
  JvLED2.ColorOff := clRed;
  end;

end;





procedure TForm1.Timer2Timer(Sender: TObject);
begin
repeat
JvXPProgressBar1.position := 0;
JvXPProgressBar1.position := 1;
JvXPProgressBar1.position := 2;
JvXPProgressBar1.position := 3;
JvXPProgressBar1.position := 4;
JvXPProgressBar1.position := 5;
JvXPProgressBar1.position := 6;
JvXPProgressBar1.position := 7;
JvXPProgressBar1.position := 8;
JvXPProgressBar1.position := 9;
JvXPProgressBar1.position := 10;
JvXPProgressBar1.position := 11;
JvXPProgressBar1.position := 12;
JvXPProgressBar1.position := 13;
JvXPProgressBar1.position := 14;
JvXPProgressBar1.position := 15;
JvXPProgressBar1.position := 16;
JvXPProgressBar1.position := 17;
JvXPProgressBar1.position := 18;
JvXPProgressBar1.position := 19;
JvXPProgressBar1.position := 20;
JvXPProgressBar1.position := 21;
JvXPProgressBar1.position := 22;
JvXPProgressBar1.position := 23;
JvXPProgressBar1.position := 24;
JvXPProgressBar1.position := 25;
JvXPProgressBar1.position := 26;
JvXPProgressBar1.position := 27;
JvXPProgressBar1.position := 28;
JvXPProgressBar1.position := 29;
JvXPProgressBar1.position := 30;
JvXPProgressBar1.position := 31;
JvXPProgressBar1.position := 32;
JvXPProgressBar1.position := 33;
JvXPProgressBar1.position := 34;
JvXPProgressBar1.position := 35;
JvXPProgressBar1.position := 36;
JvXPProgressBar1.position := 37;
JvXPProgressBar1.position := 38;
JvXPProgressBar1.position := 39;
JvXPProgressBar1.position := 40;
JvXPProgressBar1.position := 41;
JvXPProgressBar1.position := 42;
JvXPProgressBar1.position := 43;
JvXPProgressBar1.position := 44;
JvXPProgressBar1.position := 45;
JvXPProgressBar1.position := 46;
JvXPProgressBar1.position := 47;
JvXPProgressBar1.position := 48;
JvXPProgressBar1.position := 49;
JvXPProgressBar1.position := 50;
JvXPProgressBar1.position := 51;
JvXPProgressBar1.position := 52;
JvXPProgressBar1.position := 53;
JvXPProgressBar1.position := 54;
JvXPProgressBar1.position := 55;
JvXPProgressBar1.position := 56;
JvXPProgressBar1.position := 57;
JvXPProgressBar1.position := 58;
JvXPProgressBar1.position := 59;
JvXPProgressBar1.position := 60;
JvXPProgressBar1.position := 61;
JvXPProgressBar1.position := 62;
JvXPProgressBar1.position := 63;
JvXPProgressBar1.position := 64;
JvXPProgressBar1.position := 65;
JvXPProgressBar1.position := 66;
JvXPProgressBar1.position := 67;
JvXPProgressBar1.position := 68;
JvXPProgressBar1.position := 69;
JvXPProgressBar1.position := 70;
JvXPProgressBar1.position := 71;
JvXPProgressBar1.position := 72;
JvXPProgressBar1.position := 73;
JvXPProgressBar1.position := 74;
JvXPProgressBar1.position := 75;
JvXPProgressBar1.position := 76;
JvXPProgressBar1.position := 77;
JvXPProgressBar1.position := 78;
JvXPProgressBar1.position := 79;
JvXPProgressBar1.position := 80;
JvXPProgressBar1.position := 81;
JvXPProgressBar1.position := 82;
JvXPProgressBar1.position := 83;
JvXPProgressBar1.position := 84;
JvXPProgressBar1.position := 85;
JvXPProgressBar1.position := 86;
JvXPProgressBar1.position := 87;
JvXPProgressBar1.position := 88;
JvXPProgressBar1.position := 89;
JvXPProgressBar1.position := 90;
JvXPProgressBar1.position := 91;
JvXPProgressBar1.position := 92;
JvXPProgressBar1.position := 93;
JvXPProgressBar1.position := 94;
JvXPProgressBar1.position := 95;
JvXPProgressBar1.position := 96;
JvXPProgressBar1.position := 97;
JvXPProgressBar1.position := 98;
JvXPProgressBar1.position := 99;
JvXPProgressBar1.position := 100;
until JvEdit1.Enabled = True;
end;

end.
Tendl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 117



BeitragVerfasst: Do 26.07.07 11:30 
Auf dem ersten Blick würde ich sagen, Du darfst mit dem Timerevent die Postion nur ein wenig verändern:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Timer2Timer(Sender: TObject);  
begin  
JvXPProgressBar1.position := JvXPProgressBar1.position + 1; 
if  JvXPProgressBar1.position = 101 then JvXPProgressBar1.position :=0;
end;


Ich hoffe das hilft weiter.
Thomas
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: So 28.10.07 22:21 
das war net schlecht, nur musste die 101 auf 100 abgeändert werden.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Timer2Timer(Sender: TObject);  
begin  
JvXPProgressBar1.position := JvXPProgressBar1.position + 1; 
if  JvXPProgressBar1.position = 101 then JvXPProgressBar1.position :=0;
end;


mein problem geht noch weiter:

hab ein edit-feld und ein timer. im editfeld wird eine zahl eingegeben (milisekunden).
Diese Progressbar soll bei dem wert im editfeld immer wieder neu starten.

Also wenn da 1000 drin steht, soll das ding 1 sekunde lang durchrattern, danach dann wieder leer sein... und das immer wieder.

So siehts jetzt aus, klappt halt dementsprechend auch net wie gewünscht...
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
var
zahll: integer;

begin
Zahll := StrToInt(JvEdit1.Text);
Timer2.Interval := zahll;

JvXPProgressBar1.position := JvXPProgressBar1.position + 1;
JvXPProgressBar2.position := JvXPProgressBar2.position + 1;

if  JvXPProgressBar1.position = 100 then JvXPProgressBar1.position :=0;
if  JvXPProgressBar2.position = 100 then JvXPProgressBar2.position :=0;


ich müsste denke ich mal, anstatt "+ 1" sowas nehmen: zahll / 100
Ich habe aber keinen schimmer wie ich mathematische formeln verarbeite...
:D

Weiß jemand Rat?

mfg