Could you please explain coordinates in FillRectangle()? I understand that x,y are upper-left corner of rectangle? But in this case:
small picture 1
I understand x. But y is = 627, which is even > than main window’s height (137). Still, somehow this works as it supposed to:
small picture 2
(we’re talking about red rectangle here).
I just completely don’t understand this y coordinate.
Thanks.
The gray box’s height is only 137 pixels, but its position on the parent form or container is 510 pixels down.
The coordinates in use here aren’t relative to the gray box, they’re relative to the parent container. This is why you’re seeing numbers that are larger than the size of the box.