So if it's toolwindow or a minimizable form, I want to be able to get its height programmatically.
Is this possible? If so how?
Right click on your form and go to properties. Then go to Layout options,see there are a property named Size. Change it as your need as width and length wise.
There's an AutoSize option in the Properties windows; if you turn that off by changing it to False , you will be able to modify the size of your CheckBox .
You can determine titlebar height for both tool-windows and normal forms by using:
Rectangle screenRectangle = this.RectangleToScreen(this.ClientRectangle); int titleHeight = screenRectangle.Top - this.Top;
Where 'this' is your form.
ClientRectangle returns the bounds of the client area of your form. RectangleToScreen converts this to screen coordinates which is the same coordinate system as the Form screen location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With