• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

_ Setting Z-Order Windows ?

Hi. Suppose that there are forms 1, 2 and 3.

If I want to make form1 hide all the screen even the taskbar.

It means that it'll be the top-most window.

But it's not only that, I need that form 2 and 3 show on the top of form1 (always hiding the taskbar and other office stuff or IE4 shortcut bar).

How can I hide the taskbar with a form and make other 2 forms be on top of it ?

Thank you.
0
Wein
Asked:
Wein
1 Solution
 
viktornetCommented:
use SetWindowPos() and include the ZORDER constant...

also to hide everything try using the following code..

function SetDesktopArea(const NewArea: TRect; var OldArea: TRect): boolean;
  var
    CallResult: boolean;
  begin
       CallResult := SystemParametersInfo(SPI_GETWORKAREA, 0, @OldArea, 0);

       if CallResult then
         CallResult := SystemParametersInfo(SPI_SETWORKAREA, 0, @NewArea,
     SPIF_SENDWININICHANGE);
         Result := CallResult;
     end;

then you might wann do this in OnCreate() of the form...

var
  r : trect;
....
SetDesktopArea(rect(0, 0, screen.width, screen.height), r);


and in OnDestroy() of the form..

SetDesktopArea(r, r);

or something like this..

..-=ViKtOr=-..
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now