• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

Count form size from client size

I need to count window size, having size of client area. In Win32 programming this is done using AdjustWindowRectEx function. What is .NET way to do this?
0
AlexFM
Asked:
AlexFM
  • 3
  • 2
1 Solution
 
Fahad MukhtarDistinguished EngineerCommented:
this.ClientRectangle.Size
this.Size
0
 
Fahad MukhtarDistinguished EngineerCommented:
OR
this.ClientSize
is what you are lookin for
?
0
 
AlexFMAuthor Commented:
Suppose I want to create window with client size 200*300. What window width and height should I use - it should be something like 210*320. I need .NET function (if exists), which allows to count this.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
vo1dCommented:
do this:
this.ClientSize = new Size(200, 300);
0
 
AlexFMAuthor Commented:
Great. I didn't think that this is so simple.
0
 
Fahad MukhtarDistinguished EngineerCommented:
i wasnt aat seat... i wonder alexFm asked this:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now