Results 1 to 5 of 5

Thread: How can i trap a moving object in another window?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    6
    The object is moving anywhere. It's position is not fixed.
    How can i get it's xy-coordinate?
    MyRabit
    MCSE+Internet,MCDBA

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    How about Left and Top properties? (Left=x coordinate; Top=y coordinate)

  3. #3
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330

    Cool try this

    to get its coordinates try

    picture1.currentX = X
    picture1.currentY = Y
    I hope I got that right
    Matt

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    6

    I am sorry,mybe i did not state it clearly.

    I mean that the moving object is in an common application window that is not developped by me.So I can
    not use the left and top properties as i deal with vb controls.
    MyRabit
    MCSE+Internet,MCDBA

  5. #5
    Guest
    You mean, put another window inside yours?
    Here is how to put a form inside another form.
    It also works if you find the other window as well, not just forms.

    Code:
    Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal
    hWndNewParent As Long) As Long
    
    SetParent(Me.hWnd, Form1.hWnd)

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