size of windows form

  • Thread starter Thread starter Franz
  • Start date Start date
F

Franz

does the size of the windows form include the width of the form border?
thanks.
 
Hi Franz,

If you are talking about Form.Size property then: Yes.
It includes everything.

The same results you get if you use: Control.Height and Control.Width or
Control.Bounds. All those properties can be used to get the size of the form
in screen coordinates.

If you want to get the form size in desktop coordinates you can use
Form.DesktopBounds.

If you want to get the size of the client area unly use Form.ClientSize or
Control.ClientRectangle.
 
Stoitcho Goutsev (100) said:
Hi Franz,

If you are talking about Form.Size property then: Yes.
It includes everything.

The same results you get if you use: Control.Height and Control.Width or
Control.Bounds. All those properties can be used to get the size of the form
in screen coordinates.

If you want to get the form size in desktop coordinates you can use
Form.DesktopBounds.

If you want to get the size of the client area unly use Form.ClientSize or
Control.ClientRectangle.

I got it. Thanks.
--
HTH
B\rgds
100 [C# MVP]

Franz said:
does the size of the windows form include the width of the form border?
thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top