My program is doing a time consuming task, and I would like to display a TImage in the middle of the application window, but it will not stay on top - my VST is always on top. However, when I use a TPanel, it stays on top? How can I make my TImage do that?
In fact, a solution that applies to all controls would be splendid :)
Thanks!
You need a windowed control (that is, a control with a window handle, or a "proper" control) to display your message, because a non-windowed control cannot be visible above a windowed control. The easiest solution is to place the
TImage
in aTPanel
and setImage1.Align := alClient
andPanel1.BorderStyle := bsNone
.If you wish to draw a semi-transparent bitmap on top of your ordinary controls, you can do like I always do:
Sample result http://privat.rejbrand.se/formdraw.png
A TImage does not have a window associated with it and that's the difference between it and the panel.
Add a panel, and put the image inside the panel, i.e. the image's parent is the panel. Then you can bring the image to the front by bringing the panel to the front.
Did you think about hiding your VST?