Board index » delphi » Form always on top property - changing at runtime

Form always on top property - changing at runtime

I am using a form that I have set always on top to true, it is not a modal
form. It appears on top of my main form. (Delphi 1.0).

From this form I can open a search dialog, when this dialog is opened I
would like it to appear on top of the form that was set to alwaysontop :=
true;

I have tried changing alwaysontop to false before openeing the search form
but this causes an annoying flash.

Is there any way to do this and avoid the flash, or will I need to write my
own code to manage my opened forms somehow.

Thanks in advance for any help.

Leon Sinagra.

 

Re:Form always on top property - changing at runtime


Quote
>From this form I can open a search dialog, when this dialog is opened I
>would like it to appear on top of the form that was set to alwaysontop :=
>true;

I believe you could set the FormStyle of the search dialog to fsStayOnTop
and it will sit over the calling form.
However, when you close the search form you need to call the forms
BringToFront method to reassert its stayontop property.

Hope that helps.

Other Threads