Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6752129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:00:30+00:00 2026-05-26T13:00:30+00:00

If I wanted to control the mouse cursor, including clicking etc, what API would

  • 0

If I wanted to control the mouse cursor, including clicking etc, what API would I need to use for this? For example, i’m developing an application for the PC using the Kinect, and I wish to control the mouse cursor with this, as opposed to creating my own in-app cursor. What would I need to ‘tap into’ to achieve this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:00:31+00:00Added an answer on May 26, 2026 at 1:00 pm

    See answer from Marcos Placona in: How to simulate Mouse Click in C#?

    Now you only need to add the mouse move events. More info here: http://pinvoke.net/default.aspx/user32.mouse_event

    using System;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    
    public class Form1 : Form
    {
       [DllImport("user32.dll",CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)]
       public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);
    
       private const int MOUSEEVENTF_LEFTDOWN = 0x02;
       private const int MOUSEEVENTF_LEFTUP = 0x04;
       private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
       private const int MOUSEEVENTF_RIGHTUP = 0x10;
    
       public Form1()
       {
       }
    
       public void DoMouseClick()
       {
          //Call the imported function with the cursor's current position
          int X = Cursor.Position.X;
          int Y = Cursor.Position.Y;
          mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0);
       }
    
       //...other code needed for the application
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Asp.Net 4.0 C# application I wanted to use chart control. Is there
I wanted to write a Custom Control that would show a family tree... so
I'm creating a custom control and wanted to make it generic enough to use
I wanted to make a Currency ComboBox (drop down list) control for my application
I wanted a control like the UISlider, but with two thumbs instead of one
I wanted to create a control with a TextBox and to bind TextBox.Text property
If you have a WPF control library which you wanted to license to developers,
I wanted to know how I could find the previous active control on a
I wanted to ask if there is any way to control the volume of
I wanted to create a slanted tab header using the tabitem control in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.