[Lazarus] GetWindowSize misleading documentation or bug?

Luca Olivetti luca at wetron.es
Sat Sep 27 12:23:08 CEST 2014

El 27/09/14 12:09, Luca Olivetti ha escrit:
> I'm puzzled: with a test program I see no difference in the size in both
> cases (right after showing the form and after pressing the button) *and*
> the size is the right one (in FormShow is always 1,1 btw).
> I must be doing something else wrong (though the tiling is the correct
> on under windows, mmmh..).

Found it, nothing wrong on my part: the test program used an auto
created form, the real application creates the form at run time *and*
right after creating the form, after the show GetWindowRect only returns
the client size. I have to introduce a delay for it to return the whole
window's size (and even then, from time to time, it only returns the
client size), so you were correct and this is insane.

Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004  Fax +34 935883007

More information about the Lazarus mailing list