Click here to Skip to main content
11,926,805 members (53,813 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# GUI Mouse

I am currently working on a project in which I have to track the mouse cursor on the screen and then get the coordinates of where I left click. I have currently gotten the mouse hook to work which shows the coordinates of where the mouse cursor is within the window but I can't get the mouse click to work. Does anyone know how to accomplish this task?

Thank you,
Posted 28-Mar-13 11:35am
Zoltán Zörgő 28-Mar-13 16:38pm
Are you sure you made a hook? And what means "can't get the mouse click to work"? You are confusing: you need to track mouse activity on the whole screen or only over your application window?
Member 9927463 28-Mar-13 16:47pm
I need to track the mouse movement on my screen only. When I say hook I mean the application right now tracks the mouse movement for the entire screen and displays the X and Y coordinate but I would like to click the mouse and have the X and Y value be stored as INTs

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Sergey Alexandrovich Kryukov 28-Mar-13 17:42pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100