我的程序中有一个表单组件。
程序必须测试:
如果加载的图像显示在屏幕上。此图像的大小有时可以轻松超过 2 个月。
测试图片是否加载:
if Not (Image1.Picture.Graphic.Empty) then
... 但是当图片很大时,它需要几秒钟才能出现。
我想等待图像的显示,然后对该图像进行处理。
请问如何等待图片显示在屏幕上?
提前谢谢你
最佳答案
您可以为 TImage.OnProgress 编写事件处理程序
TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; PercentDone: Byte; RedrawNow: boolean; const R: TRect; const Msg: string) of object;
检查 Stage = psEnding
关于德尔福 : Timage: Wait for an image to be displayed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48833304/