Autor Beitrag
Delphi2009lover
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Do 03.12.09 16:31 
Hi,

das ist mein derzeitiger Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
//Quelltext auf 0 setzen (Standart)
Quelltext := '';

//Max = 100^^ und Visiblen
InfoPB.Max := 100;
InfoPB.Visible := True;
//Das hier ist ein Test...
Add_Btn.Visible := True;

//Den Q-Text laden in Quelltext
Quelltext := IdHTTP1.Get(URLEdit.Text);

//Progress auf 40 setzen
InfoPB.Position := 40;


Quelltext = WideString
InfoPB = TProgressbar
Add_Btn = TSpeedbutton (Flat = True)

Dieser Code funktioniert klasse, das dumme ist nur, dass der Button für ca 1-3 Sekunden verschwindet... Ich hab erst gedacht, das liegt daran, weil ich Progressbar Visible = True setze, deswegen der Test, funktioniert leider nicht...

EDIT: Nochmal getestet, der Button taucht erst wieder auf, nachdem die Progressbar voll ist
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Do 03.12.09 17:18 
Den Download in einen Thread auslagern oder in den IdHttp-Ereignissen (glaub OnWork oder ähnlich) mal ein Application.ProcessMessages; aufrufen.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Do 03.12.09 18:23 
Wenn ich das aber mache, macht er die Position der Progressbar schon auf 40 bevor er mit dem Downloaden fertig ist...
Manfred
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 03.12.09 21:26 
Hallo,
IdHTTP bietet das Ereignis onWork an, welches durchaus dazu genutzt werden kann, um den Bildschirm wieder zu zeichnen. Deine Anwender werden ohnehin denken, die Anwendung sei während des Downloads abgestürzt, wenn sie zwischenzeitig mal die Task wechseln.
Add_Btn.Refresh könnte helfen.

_________________
Computer können schneller rechnen als wir, deshalb machen sie auch mehr Fehler
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Do 03.12.09 21:29 
Und eine IdAntiFreeze Komponente auf der Form bringt auch nichts?
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Fr 04.12.09 07:13 
Vielen Dank ^^ antifreeze , das suchte ich xD vielen Dank an alle