小编ath*_*gta的帖子

如何显示进度条?

我创建了一个隐写术(在位图中隐藏文本)应用程序,我想添加一个进度条来显示该过程的工作时间.

procedure TForm1.Button2Click(Sender: TObject);
var
   x,y,i,currentBit,bitInChar,currentChar,currentPixel,newPixelValue,pixelsToSkip,skippedPixels: integer;
   pixels: PByteArray;
   bmp: TBitmap;
   stringToHide: string;
begin
if Image1.Picture.Bitmap=nil then
showmessage('gambar belum dipilih')
else
   memo1.lines.clear;
   stringToHide := AntiKeyLoggerMemo1.text;

   stringToHide:= stringToHide + chr(terminator); // add terminator to indicate end of text
   Image2.Picture.Assign(Image1.Picture.Bitmap);
   bmp := Image2.Picture.Bitmap;
   x := 0;
   y := 0;
   pixels := bmp.ScanLine[y];

   // iterate over the chars in the string we want to hide
   for i := 1 to length(stringToHide) do
   begin
      currentChar := ord(stringToHide[i]);
      memo1.lines.append('');
      memo1.lines.append('Sembunyikan ' + stringToHide[i] + ' …
Run Code Online (Sandbox Code Playgroud)

delphi delphi-7 progress-bar

1
推荐指数
1
解决办法
1945
查看次数

标签 统计

delphi ×1

delphi-7 ×1

progress-bar ×1