Window.Top with toolbar

Hi,

I’m opening a second windows from my main window. I get the window.top position from my main window to set the second window.top position to the same value. As long as i did not use a toolbar in my first window, all went fine. Now i use a toolbar and my second window opens at lower top position as my main window. It seems that the difference is exactly the height of the toolbar of the main window.

When i debug both window.top values, there are the same.

Sound weird, i know.

We already falled into this trap some month, years ago and I do not recall the solution.

Part of the solution is in the use of Window.Bounds .

A quick search leads me to this entry: Forum: Window.Bounds .

If the solution is not there, continue the search (if you want).

Window11.Top = self.top-(self.top-self.bounds.top)+(Window11.Top-Window11.Bounds.Top)

This works.

Thanks.