Einzelnen Beitrag anzeigen

axelf98

Registriert seit: 27. Aug 2003
Ort: Ennepetal
440 Beiträge
 
Delphi 2005 Personal
 
#5

Re: Kompatiblität mit Windows98-System!

  Alt 18. Sep 2003, 14:27
Zitat von Luckie:
Nutzt du irgenwelche NT/XP speziofischen API-Funktionen? Macht dein Programm irgendwas besonderes?
Nein... Ein ganz normales Programm mit Delphi-Komponenten!

Der Code an dem es liegen könnte:
Delphi-Quellcode:

  // Das Richedit wird natürlich vorher gelöscht...

    procedure TForm2.FormatIndexed(Start,Laenge:integer);
    begin
     with RichEdit1.SelAttributes do
      begin
      richedit1.SelStart:= start;
      richedit1.Sellength:= Laenge;
      size := 8;
     end;
    end;

    procedure TForm2.FormatBlau(Start,Laenge:integer);
    begin
     with RichEdit1.SelAttributes do
      begin
      richedit1.SelStart:= start;
      richedit1.Sellength:= Laenge;
      color := clblue;
     end;
    end;

procedure TForm2.FormatSolution(ed,pr:tstringlist;X:TLoesung); //TLoesung = Array of Extended
  var pos,i,j,tmp: integer;
      s : string;
  begin
   pos := 0; // Farbe
   for i := 0 to ed.Count-1 do
   begin
    if X[i] <> 0 then
    begin
     if x[i] <> 1 then
     begin
     tmp:=length(floattostr(X[i]));
     self.FormatBlau(pos,tmp);
     inc(pos,tmp+4+length(ed[i]));
     end ELSE
     begin
     inc(pos,3+length(ed[i]));
     end;
    end;
   end;
   inc(pos,1);
   for i := 0 to pr.Count-1 do
   begin
    if X[i+ed.count] <> 0 then
    begin
     if x[i+ed.count] <> 1 then
     begin
     tmp:=length(floattostr(X[i+ed.count]));
     self.FormatBlau(pos,tmp);
     inc(pos,tmp+4+length(pr[i]));
     end ELSE
     begin
     inc(pos,3+length(pr[i]));
     end;
    end;
   end;

   pos := 0;
                         // Indexed
   for i := 0 to ed.Count-1 do
   begin
     if (x[i]<>0) then
     begin
     if x[i]<>1 then inc(pos,length(floattostr(X[i]))+1);
      s := ed[i];
       for j := 0 to length(s) do
      begin
       if istzahl(s[j]) then FormatIndexed(pos+j-1,1);
      end;
      inc(pos,3+length(s));
     end;
   end;

   pos := (AnsiPos('->',richedit1.Lines.Strings[0])+2); // Mitte finden

   for i := 0 to pr.Count-1 do
   begin
     if (x[i+ed.count]<>0) then
      begin
      if x[i+ed.count]<>1 then inc(pos,length(floattostr(X[i+ed.count]))+1);
      s := pr[i];
       for j := 0 to length(s) do
      begin
       if istzahl(s[j]) then FormatIndexed(pos+j-1,1);
      end;
      inc(pos,3+length(s));
      end;
   end;

  end;
Ich hab leider keine Möglichkeit zu Hause unter 98 zu testen.. Das ist schon ärgerlich, wenn sowas kommt!
  Mit Zitat antworten Zitat