Changing the Picture property in the TImage control. lazarus / 21-General ---------------------------------------------------------------------- OC DelGuy · 2024-10-23 00:06 How do you change the Picture property during runtime? I tried: Pic : Timage; Pic.Picture := 'AnotherPic.bmp'; But that didn't work. ---------------------------------------------------------------------- domasz · 2024-10-23 00:09 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Pic.Picture.LoadFromFile('AnotherPic.bmp'); ---------------------------------------------------------------------- jamie · 2024-10-23 00:16 Or stream ---------------------------------------------------------------------- OC DelGuy · 2024-10-23 00:31 Quote from: domasz on October 23, 2024, 02:09:20 amCode: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Pic.Picture.LoadFromFile('AnotherPic.bmp'); Got it.  Thanks! ---------------------------------------------------------------------- OC DelGuy · 2024-10-23 00:34 Quote from: jamie on October 23, 2024, 02:16:58 amOr stream  What do you mean? ---------------------------------------------------------------------- Remy Lebeau · 2024-10-23 05:06 Quote from: OC DelGuy on October 23, 2024, 02:34:37 amWhat do you mean? Instead of loading an image from a file using LoadFromFile(), you can also load an image from a TStream using LoadFromStream(). ---------------------------------------------------------------------- domasz · 2024-10-23 07:53 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var Pic : Timage;     F: TFileStream;beginF := TFileStream.Create('AnotherPic.bmp', fmOpenRead or fmShareDenyWrite);Pic.Picture.LoadFromStream(F);F.Free; This is reading from a stream.