0

How can I get the visible area of a winform?

I tried accessing Height\Width properties but I get the size of the full window (With the minimize, close and enlarge buttons) how can I get only the part that I can manipulate without the tool-buttons in the head of the form?

Adam
  • 464
  • 6
  • 16

1 Answers1

3

I think you mean Form.ClientSize.

The size of the client area of the form is the size of the form excluding the borders and the title bar. The client area of a form is the area within a form where controls can be placed. You can use this property to get the proper dimensions when performing graphics operations or when sizing and positioning controls on the form. To get the size of the entire form, use the Size property or use the individual properties Height and Width.

Zein Makki
  • 29,485
  • 6
  • 52
  • 63