CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    159

    Form's useable width and height

    Hi all,

    i know how to get a form's width and height,

    but how do I get the dimensions/offsets of what I would like to draw on, the usually grey area. I mean what is the height of the title bar, is it always the same? And what about the borders.

    This way I can set my graphicsobject to these bounds for easier drawing.

    Kind regards,

    Jef

  2. #2
    Join Date
    Oct 2005
    Location
    Islamabad, Pakistan
    Posts
    1,277

    Re: Form's useable width and height

    u can use System.Windows.Forms.SystemInformation properties to get this information, properties like CaptionHeight, FrameBorderSize

  3. #3
    Join Date
    Dec 2003
    Location
    http://map.search.ch/zuerich.en.html
    Posts
    1,074

    Re: Form's useable width and height

    Each control has a ClientRectangle property that gives you the bounds that you are after.
    Useful? Then click on (Rate This Post) at the top of this post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured