Results 1 to 13 of 13

Thread: [2005] overlapping rectangles

Threaded View

  1. #6
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] overlapping rectangles

    Quote Originally Posted by .paul.
    how can i test for overlapping rectangles?

    for example:

    vb.net Code:
    1. rectangle1 = new rectangle(168,111,10,36)
    2. rectangle2 = new rectangle(160,108,18,18)

    these 2 rectangles overlap. any ideas?

    the rectangles are actually a textbox + a picturebox
    Hi,

    If you I see your code then they overlapping.

    rectangle1 = new rectangle(168= x,111=y,10,36= the size of your rectangle)
    rectangle2 = new rectangle(160=x,111= y,18,18= the size of the other rectangle)

    In code you have then:

    Code:
    rectangle1 = new rectangle(168,111,10,36)
    rectangle2 = new rectangle(168,122,18,18)
    That they will be situated under each other with there own size.

    Or you can have the same size and then you do this:

    Code:
    rectangle1 = new rectangle(168,111,10,36)
    rectangle2 = new rectangle(168,122,10,36)
    Hope it helps,

    sparrow1
    Last edited by sparrow1; Nov 24th, 2007 at 06:55 PM.
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

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