How to find out the size of the Start bar?
  • What kind of nonsense, why do you need it? - Niki-Timofe
  • It is necessary to do something like this so that the form does not block the entire screen - cas
  • There is a screen resolution and desktop size. In general, it is still better to provide the distribution of windows on the desktop to windows itself, and not to interfere with this not simple process. - pincher1519

1 answer 1

It is necessary to do something like this so that the form does not block the entire screen.

To define a workspace (without a system taskbar) in Windows there is a property SPI_GETWORKAREA , whose value can be obtained via a call to SystemParametersInfo .

SPI_GETWORKAREA 0x0030
Retrieves the size of the primary display monitor. The taskbar is not obscured by the system taskbar or by application desktop toolbars. It is expressed in virtual screen coordinates.

In the case of the monitor, you can call the function.

  • Using winapi for what can be done by means of .net is usually not required. And if it is required in this case, then it would be nice to explain why. - Qwertiy ♦
  • @Qwertiy, if you can offer an alternative in .net, just do it in your answer. - mega