Autor Beitrag
Arne Danikowski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194



BeitragVerfasst: Do 18.01.07 14:58 
Kann mir einer sagen, warum meine ProgressBar nicht funktioniert? es werden keine Werte angezeigt.

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:
procedure TForm1.Button3Click(Sender: TObject);
var iCnt: integer;
    iMax: integer
begin

ProgressBar1.Max := iMax;
  ProgressBar1.Position := 0;
  iCnt := 0;
  while (iCnt < iMax) do
  ProgressBar1.Position := ProgressBar1.Position + 1;
  Application.ProcessMessages; // damit die Anzeige upgedatet wird...
  inc(iCnt);


// Array für Prüfung
for i := 0 to 8 do // Array initialisieren
 Check[i] := False;
if Application.MessageBox(

       'Sollen die Dateien für das Setup mit den Hersteller Daten kopiert werden? Der Vorgang dauert ca. 30 Sekunden!',
       'Soll der Kopiervorgang gestartet werden?',
        MB_OKCANCEL + MB_DEFBUTTON1) <> IDOK then
        Listbox1.Items.add('Abbruch duch Anwender')
        else

        begin
        Check[0] := copyfile('N:\El70_m\lager\hersteller\hersteller.dbf','N:\El70_m\lager\hersteller.dbf',FALSE);
        Check[1] := copyfile('N:\El70_m\lager\hersteller\hersteller.cdx','N:\El70_m\lager\hersteller.cdx',FALSE);
        Check[2] := copyfile('N:\El70_m\lager\hersteller\katalog.cdx','N:\El70_m\lager\katalog.cdx',FALSE);
        Check[3] := copyfile('N:\El70_m\lager\hersteller\katalog.dbf','N:\El70_m\lager\katalog.dbf',FALSE);



       if (Check[0] = True) AND (Check[1] = True) AND (Check[2] = True)  AND (Check[3] = True)
       then
       begin
       Listbox1.Items.add('Alls Hersteller Daten wurden ohne Fehler kopiert');
       Listbox1.Items.add('Setup-Erstellung wird gestartet');
       Laufwerk := 'N:\El70_m';
       chdir(Laufwerk);
       shellexecute (Application.handle, 'open', 'N:\El70_m\msetup.exe', 'N:\El70_m', '', SW_NORMAL);
       end

       else
       Listbox1.Items.add('Achtung Fehler beim Kopieren der Hersteller Daten');
       end

end;


Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Arne Danikowski Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194



BeitragVerfasst: Do 18.01.07 15:03 
Oh dickes Sorry,,

war nur zu dämlich

muss die ja auch mal hin und wieder abfragen :D :D :D
Dragonclaw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 196

Windows Vista
Delphi 7 Prof.
BeitragVerfasst: Do 18.01.07 15:04 
Hallo,

1. benutze bitte die Delphi Tags, das geht mit "" und "".

zum Problem:

aus dem Bauch heraus würde ich den Fehler bei dieser Zeile sehen:

ausblenden Delphi-Quelltext
1:
ProgressBar1.Max := iMax;					


Dort wird ja Der Max-Wert von der Progressbar gleich der Variable iMax gesetzt. Probiers mal anders herum.

ausblenden Delphi-Quelltext
1:
iMax := ProgressBar1.Max;