Jump to content
Tom F

How can I make a fsStayOnTop form the active form?

Recommended Posts

In VCL, how to make a fsStayOnTop form the active form?

I have a main form and a non-modal subform.

When the Main form is active, if the user enters a specific key associated with a shortcut on the non-modal form, my main form calls a method in the non-modal form.  

But, how can I make the non-modal form the active form when it receives this call?

I've tried to assign Screen.ActiveForm and SuForm.Active, but both are read-only.

Share this post


Link to post

TForm.SetFocus maybe. Otherwise I would think TForm.Show would activate the form - regardless of it being already visible.

Share this post


Link to post

TForm.SetFocus worked from the subform.

Thank you, Anders!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×