重複の可能性:
プログレスバーを表示するには?
steganalisys アプリケーションを作成しました。進行状況バーを追加して、プロセスの進行時間を示したいと考えています。
procedure TForm2.Button2Click(Sender: TObject);
var
q,x,y,leastSigBit,currentPixel,newPixelValue: integer;
pixels: PByteArray;
bmp: TBitmap;
begin
memo1.lines.clear;
Image2.Picture.Assign(Image1.Picture.Bitmap);
bmp := Image2.Picture.Bitmap;
for y := 0 to bmp.Height-1 do
begin
pixels := bmp.ScanLine[y];
for x := 0 to bmp.Width-1 do
begin
currentPixel := pixels[x];
leastSigBit := getBit(currentPixel, 0);
newPixelValue:=setBit(newPixelValue ,7,leastSigBit);
newPixelValue:=setBit(newPixelValue ,6,leastSigBit);
newPixelValue:=setBit(newPixelValue ,5,leastSigBit);
newPixelValue:=setBit(newPixelValue ,4,leastSigBit);
newPixelValue:=setBit(newPixelValue ,3,leastSigBit);
newPixelValue:=setBit(newPixelValue ,2,leastSigBit);
newPixelValue:=setBit(newPixelValue ,1,leastSigBit);
newPixelValue:=setBit(newPixelValue ,0,leastSigBit);
end;
pixels[x] := newPixelValue;
memo1.lines.append('pixel ke ' + inttostr(x) + ',' + inttostr(y) + ' desimal ' + inttostr(currentPixel) + ' (biner ' + toBinary(currentPixel) + ') ' +
' desimal baru ' + inttostr(newPixelValue) + ' (biner ' + toBinary(newPixelValue) + ')');
end;
end;
memo1.lines.append('All done!');
Button4.Enabled:=True;
Button2.Enabled:=False;
Button1.Enabled:=False;
Button5.Enabled:=True;
end;
プロセスの進行状況バーを作成するにはどうすればよいですか? コマンドの進行状況バーをどこに配置する必要がありますか?