Board index » delphi » D4: frmTest.Show but without taking focus + Always Top Most Window?

D4: frmTest.Show but without taking focus + Always Top Most Window?

Hi,

Delphi 4 Standard

1. Is it possible to use the Show method of a form but without it taking
focus away from the current window?
2. How do you make a form top most/on top.  I.E. the window will remain on
top of all other windows, regardless of if other windows are open.

Cheers

Paul.

 

Re:D4: frmTest.Show but without taking focus + Always Top Most Window?


Quote
"Paul" <nos...@nospam.com> wrote in message

news:38a2ab84_1@newsread3.dircon.co.uk...

Quote
> Hi,

> Delphi 4 Standard

> 1. Is it possible to use the Show method of a form but without it taking
> focus away from the current window?

Don't use Show, use the Windows API ShowWindow

               ShowWindow (RoomPicker.Handle, SW_SHOWNOACTIVATE);

Quote
> 2. How do you make a form top most/on top.  I.E. the window will remain on
> top of all other windows, regardless of if other windows are open.

Set the fomr's FormStyle property to fsStayOnTop.
Quote

> Cheers

> Paul.

Other Threads