Page 1 of 1

LoadFromStream

PostPosted: 31 Oct 2015 20:28
by etwoss
Hi

I have a page which shows customer data and an image of the customer

My code:

Code: Select all
  if (FileExists(FFolder + IntToStr(UserSession.SelectedTrajectClient_ID) + '.jpg')) then
  begin
    FS := TMemoryStream.Create;
    FS.LoadFromFile(FFolder + IntToStr(UserSession.SelectedTrajectClient_ID) + '.jpg');
    IWCGJQImage2.Picture.LoadFromStream(FS);
    FS.Free;
  end;


i does not make a difference which user i choose, after the first one all other show the same image as the first one.

Caching?

Eric

Re: LoadFromStream

PostPosted: 01 Nov 2015 09:20
by assapan
hi ,
Just by setting
Code: Select all
IWCGJQImage2.Picture.CacheName:=IntToStr(UserSession.SelectedTrajectClient_ID) ;
should solve your problem

Re: LoadFromStream

PostPosted: 02 Nov 2015 11:23
by Alexander Bulei
Hi Eric,

hi ,
Just by setting
CODE: SELECT ALL
IWCGJQImage2.Picture.CacheName:=IntToStr(UserSession.SelectedTrajectClient_ID) ;
should solve your problem


Or just enable the Picture.UserCache property.

Best Regards.