Position mouse in external application

This is a discussion on Position mouse in external application within the C# Programming forums, part of the General Programming Boards category; Hello, I am trying to position the mouse in an external application relative to that application's screen coordinates. I can ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    81

    Position mouse in external application

    Hello, I am trying to position the mouse in an external application relative to that application's screen coordinates.

    I can move the mouse relative to my application's x,y position like this:

    Cursor.Position = this.PointToScreen(new Point(100, 100));


    I have the handle to the external application but I do not know what to do with that handle to get the mouse coordinates relative to that application. Thank you!

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Are you still even receiving mouse events when the cursor is outside of your window? You are not supposed to. Check this out. It may be more what you are wanting to do.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. unresolved external symbols...linking errors in VC++
    By rammohan2b in forum C++ Programming
    Replies: 2
    Last Post: 01-22-2009, 01:19 AM
  2. need Help in Mouse Pointer
    By obaid in forum C++ Programming
    Replies: 3
    Last Post: 12-07-2006, 02:33 AM
  3. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 02:01 PM
  4. Borland CBuilder -> Launch external application
    By stovellp in forum Windows Programming
    Replies: 1
    Last Post: 01-11-2003, 06:25 PM
  5. Replies: 1
    Last Post: 06-06-2002, 04:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21