Drawing a Rectangle within a Rectangle RRS feed

  • Question

  • Good day,

    Very simple problem, but a solution I can't seem to wrap my head around:

    I need to similate the MS Paint's Selection tool in which I disallow the user to select anything beyond the "canvas". I've been fighting with this for awhile, but with my inexperience of the drawing library and my uncanny ability to make math fail, it's been a roller coaster. I have no code in which to help, and google hasn't been kind to me in terms of a search result. Just wondering if anyone here has a link from their favorites list that they could share.

    Tuesday, August 18, 2009 1:24 PM


  • Rectangle.Contains function may be helpfull to you.
    Please mark the post as answer if it is helpfull to you because it boosts the members to answer more and more.
    • Marked as answer by AlAccess Tuesday, August 18, 2009 1:47 PM
    Tuesday, August 18, 2009 1:40 PM