Set Form's ClientSize.

S

Sin Jeong-hun

I need to set the form's client rectangle to a specific size. But
Form's Size property seems to include non-client area. Since non-client
area size varies depending on yours system, I need another way. Form's
ClientRectangle is readonly. How can I set the client rectangle size?
Theoretically, if I could get height and width of non-client area, then
I will be able add those margins when I set the form's Size. But I
don't know if this is the correct way. What is the recommended way?
Thank you.
 
L

Larry Lard

Sin said:
I need to set the form's client rectangle to a specific size. But
Form's Size property seems to include non-client area. Since non-client
area size varies depending on yours system, I need another way. Form's
ClientRectangle is readonly. How can I set the client rectangle size?

ClientRectangle might be read only, but ClientSize isn't.
 

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

Top