DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Checking if an object is inside a frame

  1. #1
    Join Date
    Mar 2008
    Posts
    24

    Checking if an object is inside a frame

    Im making a game with multiple stages, and I'm using frames. Im running into a problem because the shape is reacting with shapes from other frames. How can I test (in an if, then statement) if a shape is inside any given frame?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If Shape1.Parent Is Frame2 Then
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Mar 2008
    Posts
    24
    I guess you pointed me off in the right direction Phil, but this is it
    Code:
    If Shape1.Container = Frame1 Then
    Last edited by Phil Weber; 03-30-2008 at 11:16 AM.

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Sorry, I was thinking in .NET. ;-) Glad you figured it out.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 7
    Last Post: 10-24-2002, 06:33 AM
  2. Replies: 0
    Last Post: 08-08-2002, 05:56 AM
  3. JFrame / JDialog issue
    By Kent in forum Java
    Replies: 8
    Last Post: 05-14-2002, 02:49 AM
  4. Even C++ had this much right...
    By Derek Mooney in forum .NET
    Replies: 94
    Last Post: 10-29-2001, 09:44 PM
  5. Controlling Menu from another frame
    By Moose in forum Java
    Replies: 0
    Last Post: 06-06-2000, 05:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center