tags:

views:

104

answers:

1

I hate it when I try to apply some logic to positioning elements on a form, only to have the rug jerked out from under me because of some bizarre gotcha like the visible area of the Control being affected by a Border which, in effect, creates a 3 pixel margin all around the inner, visible area of the Panel, and completely throws off any size calculations I might want to make, and also offsets the 0,0 point of the control.

Even worse is the Form control itself, which in most cases has a gigantic top-edge margin where the title bar lives, but does not (as I recall) offset the 0,0 point, meaning that controls you place at that point often can't even be seen. And of course, the margin is different when different Windows themes have been applied...

Can you knowledgeable people run me through some of the more "interesting" lies Windows.Forms tells you about form areas and locations and how you've coped with it?

+1  A: 

look at Form.ClientRectangle and Form.ClientSize

Sam Meldrum
Well, I was hoping to promote a discussion, but, hey, if nobody wants to play, nobody wants to play...
Frosty840
Sam Meldrum