Results 1 to 5 of 5

Thread: clicking on 1 specified coördinate

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    8

    clicking on 1 specified coördinate

    hi all!

    i am new on this forum, so i thought, maybe you guys can help me

    I am from Holland, and not programming vb6 for a long time. But, i like it very much, and learn something new every day

    But now, i encountered a problem. On e remote computer, i give my program the command to take a screenshot of the whole screen, and put it on an ftp server. Then, i click on a remote program on a certain location of that screenshot, and it sends the coordinates back to the system that made the screenhot.

    Lets say i clicked on (400,600), and the screenshot is (1024,768), the size of my screen. Now i want the program that gets the location (400,600) to click on that coordinate of its screen.

    Is that possible? and how? i use vb6

    many thanx, Dennis Priester

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: clicking on 1 specified coördinate

    You can use the attached class to move the mouse cursor around and also to click or double click at the current position. The usage is very simple:
    VB Code:
    1. Dim mouse As CMouse
    2. Set mouse = New CMouse
    3. mouse.MoveTo 400, 600
    4. mouse.Click ' or Call mouse.Click(vbRightButton) if you want to click with the right button
    The coordinates of the MoveTo method must be in pixels.
    Attached Files Attached Files

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    8

    Re: clicking on 1 specified coördinate

    what is a class?

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    8

    Re: clicking on 1 specified coördinate

    ah i see so i just have to add your class in the project explorer? many thanx!

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: clicking on 1 specified coördinate

    Yes, you can simply add the class to your project, it will then be compiled together with the rest of your source into the same EXE file. Another option is to add it to an ActiveX DLL project (in which case you must change the Instancing property to 5-MultiUse for the class) and compile it to a DLL which you set a reference to in your main project.

    But for this simple class I would just add it to your project directly.

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