Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-06

Bringing a form to the foreground

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Is there a portable way of bringing an application to the foreground, specifically so that its "Do you really want to quit?" dialogue is immediately visible?

The scenario here is that when running under KDE if you click on an app's frame's close button or <Right Click><Close> on its taskbar button it doesn't bring the app to the foreground, so the dialogue is hidden.

I know that arbitrary focus changes are deprecated, but this is one of a small number of cases where it's justified.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 11 lines
Is there a portable way of bringing an application to the foreground, specifically so that its "Do you really want to quit?" dialogue is immediately visible? The scenario here is that when running under KDE if you click on an app's frame's close button or <Right Click><Close> on its taskbar button it doesn't bring the app to the foreground, so the dialogue is hidden. I know that arbitrary focus changes are deprecated, but this is one of a small number of cases where it's justified.

Have you tried Form1.ShowOnTop?

Mattias

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd: Is there a portable way of bringing an application to the foreground, specifically so…
Mattias Gaertner wrote 6 lines
Mark Morgan Lloyd wrote: > Is there a portable way of bringing an application to the foreground, > specifically so that its "Do you really want to quit?" dialogue is > immediately visible? Have you tried Form1.ShowOnTop?

That does the trick nicely. Apologies for taking so long to say thanks but an over-zealous spam filter had cut me off from the list.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email