I think you're confused. You don't put a component in foreground with CopyRect.
Perhaps this is my bad english that leads to misunderstandings.
I didn't think, that I put my TempImage in the foreground,
I am aware, that CopyRect makes a copy from its own Canvas to the Canvas of Form1.
I am painting in the background on TempImage (not visible) while the previous image (canvas) of Form1 is visible.
I don't thing that I need TBitmap, TImage is sufficient, which I saw, when I checked my drawing with a call of
TempBild.Picture.SaveToFile('TempBild.jpg');
The image, I find afterwards on my harddisk is the one I expected.
Doing CopyRight from the canvas of a component that is not visible is not supposed to work.
I have never seen any supporting document, which mention, that it is necessary, that the image must be visible whilst you call CopyRect
Meanwhile I solved the problem of the flickering in my Windows-Version.
When I created my program (in 1993, with Turbo Pascal/Delphi) my memory was running out, so I set
Form1.DoubleBuffered := false
to save some memory space.
Meanwhile I have enough memory, that this is no longer necessary, but I didn't kick out this instruction, because there were no problems till now.
Now I had to put CopyRect within FormPaint (see my posts above), so I generated a flickering image in Windows (not in Linux).
Strangely enough, till these changes my program doesn't react to any keystroke after the first one is processed in the Windows-version, but this is another problem.
I'd like to know, why CopyRect must be done within FormPaint, but it is not vital, so my oroiginal problem is solved.
Thanks to everyone
rebzdu