Question:
I have a Delphi app that displays a bitmap, and I control drawing on the canvas object as one might on a paper roadmap. This works fine. When I minimize the app down to the Win95 bar and thenactivate the program again, I want to gain controlto refresh the drawing, since it is not part of the BMP file. I have tried all of the Tform eventprocessing (for example, OnActivate
) but without success .
Answer:
You can get a form to redraw itself by calling its Invalidate method. Thiswill force a repaint of all the form’s controls.