Click here to Skip to main content
15,301,414 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing an user control. It requires its location to pop up a small window. This user control may be placed on a form, may be in a container control, may be on a form which is mdi child form. The absolute location depends on where is is placed. find out the location I need the height of the window's title bar height. There are many help available on net. but is there any ready made function available which will give me the title bar height in pixel. If any body can help, please.

I am saying it is window, but actually it is a Mdi parent form whose title bar height is required.

What I have tried:

No, I have not tried any thing so far.
Updated 18-Jan-21 0:12am

For Windows Forms, use SystemInformation.CaptionHeight:
Gets the height, in pixels, of the standard title bar area of a window.
Create 2 windows; one without a title, and one with. Compare the differences. - Show or hide a title bar on demand - Stack Overflow[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900