How to get the client size of a Form when it’s maximized without maximize it?
From example, I want to create a Bitmap with the same size of the maximized Form‘s client size, how can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try
to calculate the size (without taskbar)
then substract the difference between the Forms ClientSize / Size.
Hope that works, haven’t tested it.
Update:
A bit hacky, but I tried it and it works.
Update2:
This is a nicer solution.
I disable painting of the Form, maximize it, get the client area, set it back to normal and return the result. Works well, without flicker or something.