Click here to Skip to main content
16,018,802 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Working Environment I working on automobile feedback project which work on dual monitor in extended mode. Screen 1(Non Touch) - Customer Care Executive working screen Screen 2(Touch) - Customer feedback software running on this screen, which work only on touch no keyboard input.

Problem When customer click on screen 2 for feedback, cursor position changed from screen 1 to screen 2 which disturb customer care executive.

Proposed Solution
Can i run background timer thread which checks cursor position after 1 or 2 milliseconds if its on screen 2 it will bring it back on by resetting cursor position.

What i want- Is it possible when customer click on screen 2 it perform click operation over there and bring back focus to last active control on screen 1 which can be textbox, window etc.


Questions Regarding above Solution

Will mouse click will be done in 1 or 2 milliseconds time period.
How can i restore focus to last active control on screen 1.
My main motive is not to disturb screen 1 executive working as customer screen will active on mouse click only for few milliseconds.
Posted
Updated 30-Apr-15 21:06pm
v2

1 solution

Take a look into the Screen class. It has properties that allow you to determine the desktop size. In extended mode the desktop size will be the sum of the resolution of the individual monitors.

You can set the cursor posion by the Cursor.Position property.

Note that the Screen and Cursor classes are in the System.Windows.Forms assembly. You have to add it as a reference, if it's a WPF app.

https://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.position.aspx[^]
https://msdn.microsoft.com/en-us/library/system.windows.forms.screen%28v=vs.110%29.aspx[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900