merk dir wie viele Stellen der Barcode hatte. Dann umwandeln, erhöhen und dann mit Format und führenden 0en zurückwandeln.
Delphi-Quellcode:
function IncCode(Code: String): String;
var len: Integer;
Val: Integer;
begin
len := Length(Code);
Val := StrToInt(Code);
inc(Val);
Result := Format('%.'+IntToStr(Len)+'d',[Val]);
end;
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."