Program Mouse(Cursor)
-
Hi, I am currently working on a project named "motion detection to control pc". It is a project which can assist paralysed patient to access the pc using facial movement. I have a webcam capturing movement of head and translate it to mouse(cursor) movement. Do anyone have any idea on how to use codes to control/ program the mouse(cursor) movement? Thanks~
-
Hi, I am currently working on a project named "motion detection to control pc". It is a project which can assist paralysed patient to access the pc using facial movement. I have a webcam capturing movement of head and translate it to mouse(cursor) movement. Do anyone have any idea on how to use codes to control/ program the mouse(cursor) movement? Thanks~
In Windows Forms, the mouse cursor's location can be set via the static Cursor.Position property. :josh: My WPF Blog[^]
-
In Windows Forms, the mouse cursor's location can be set via the static Cursor.Position property. :josh: My WPF Blog[^]
Hi, I am a newbie towards c#, not very sure whether i did the correct way. Can you assist me? I have write a simple coding using Cursor.Position: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void MoveCursor() { if(!this.Cursor.Equals(Cursors.Default)) { this.Cursor = new Cursor(Cursor.Current.Handle); Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y - 50); MessageBox.Show(Cursor.Position.X.ToString); } } private void Form1_Load(object sender, System.EventArgs e) { MoveCursor(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I actually wanna do a simple codes which can read the current mouse position and write a new mouse position to it. However, the above codes cause an error: "Method 'int.ToString(string)' referenced without parentheses" which i do not the cause of this error.