Timage is black lazarus / 13-General ---------------------------------------------------------------------- cov · 2006-11-28 21:23 The following code floods the Image1 with black: Code: [Select]           bmapFile:=TBitmap.Create;           bmapFile.LoadFromFile(OpenDialog1.Filename);           Image1.Canvas.Draw(0,0,bMapFile); It works in Delphi 3. Anyone have any clue? ---------------------------------------------------------------------- cov · 2006-11-29 09:51 Hi. I needed to paint the rect with the background colour: Code: [Select]      Image1.Canvas.Brush.Color:=clWhite;      Image1.Canvas.FillRect(0,0,BMapFile.Width,BMapFile.Height); ---------------------------------------------------------------------- cov · 2006-11-29 10:14 But now another problem. How can I pause my program until the image has been displayed. I want to display the image first. The I want to manipulate pixels in the image so that the process is visible to the user. What's happening now is that the original image doesn't get time to be displayed so that there is no visual indication of what is going on until the process is complete, at which point the final image is displayed. This is what I want: Original Image... pixels processed... Altered Image... more pixels processed... Further Altered Image... ... ... Final Image This is what I'm getting: ..... pixels processed... .... more pixels processed... .... ... ... Final Image ---------------------------------------------------------------------- matthijs · 2006-11-30 07:12 You should give the OS time to update the image. This would be possible by entering statements like Code: [Select]   YourImage.Invalidate;   Application.ProcessMessages; Invalidate well give a message that your Image needs repainting. ProcessMessage will give the OS time to react to those messages.