Link to home
Start Free TrialLog in
Avatar of jimy7s
jimy7s

asked on

How to reserve part of the screen over the Taskbar ?

hi experts ,
I have a complicated question and i appreciate any help you will provide
how can i make part of the screen ,lets suppose about 30 pixels is out of count ,i mean when i'm open any folder or program the bottom boundary of the folder or the program does not touch the taskbar and stay over it with 30 pixels heighter ,and also when the icons in the desktop is arranged (autorange ,by type ,by name ,... ,etc)
the icon is arranged in the desktop with same thing over to the taskbar with 30 pixels .
to make the idea more simple when any one streatch the taskbar up did you see what happend to the desktop icons that what i need when i'm putting my program over the taskbar.

Example :
  if the height of the screen is 600 ,and suppose the height of the taskbar is 25 then when any file is opened the height of that file must be " 600 - 25 - 30 " ,and same thing for the desktop icons.
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Call SystemParametersInfo  with SPI_SETWORKAREA as the flag:
Froms MSDN Help:

"SPI_SETWORKAREA
  Sets the size of the work area. The work area is the portion of the screen not obscured by
the system taskbar or by application desktop toolbars. The pvParam parameter is a pointer
to a RECT structure that specifies the new work area rectangle, expressed in virtual screen
coordinates. In a system with multiple display monitors, the function sets the work area of
the monitor that contains the specified rectangle."
Avatar of jimy7s
jimy7s

ASKER

EddieShipman can you give me more details .
i'm using Delphi 6 .
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jimy7s

ASKER

Good ,but how can i get the screen back to the previous state .
Avatar of jimy7s

ASKER

i found it ( dec(R.Bottom, - num); ) isn't it ?
Thanks alot EddieShipman .