{hi Kambiz
I am looking to speed up image display when i click on a drawGrid...
For example if i write a function witch return a bitmap instead of a procedure as you do with :
"RedrawWindow(WindowHandle, @DisplayRect, 0, RDW_INVALIDATE or RDW_UPDATENOW);"
I create a TPicture and i write : form1.image1.picture.Assign(Picshow1.GetImgProgress(value))
This is interesting, profitable or binding?
}
function TCustomPicShow.GetImgProgress(Value: TMaxi) : TBitmap; //(TMaxi ~~ TProgress)
begin
result := nil;
if Busy and not display.empty then begin
EnterCriticalSection(CS);
try fProgress := Value;
UpdateDisplay;
result:= display;
finally LeaveCriticalSection(CS); end;
end;
//my bitmap is formatted but with a TPicture the result is faster of course
//thank you for your opinion