S
sghff110
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.BitBtn1Click(Sender: TObject);var i:integer; sourcebmp:Tbitmap; begin sourcebmp:=Tbitmap.Create; sourcebmp.LoadFromFile('e:/sunrise.bmp'); try for i:=0 to sourcebmp.Height do begin stretchblt(image1.Canvas.Handle ,0,0, image1.Width ,i, sourcebmp.Canvas.Handle,0,0, sourcebmp.Width,i,srccopy);// image1.Refresh ; sleep(3); Application.ProcessMessages; end; finally sourcebmp.Free ; end;end;上述代码实现了图像的下伸效果。能否在它尚未完成特效显示时点击button2让其即刻终止并退出?