Why is a maximized Delphi form 8 pixels wider and higher than the GetSystemMetrics values?

前端 未结 2 1645
萌比男神i
萌比男神i 2020-12-11 16:16

If I maximize a Delphi form the width and height values are 8 pixles greater that the corresponding GetSystemMetrics SM_CXSCREEN and SM_CYSCREEN?

For Example

2条回答
  •  -上瘾入骨i
    2020-12-11 17:05

    I wrote simple program, which catches WM_GETMINMAXINFO. This message allows one to modify position and size of maximized window, before the actual maximization takes place. The default values provided by system were:

    Position.x: -8
    Position.y: -8
    Size.x: 1456 (= 8 + width of screen + 8)
    Size.y: 916 (= 8 + height of screen + 8)
    

    The resolution of my screen is 1440x900.

    It seems, that Windows positions the window after the maximization in such way, that the client area covers the most the available space and window's chrome is hidden outside the screen area.

提交回复
热议问题