Recently suffered a mouse hand. More pain, affecting the work. Simply use the mouse on the left hand.
Each time to go to the Control Panel to modify the settings is cumbersome, so decided to write a small tool.
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Runtime.InteropServices;usingSystem.Reflection;namespacevan{classProgram {Static voidMain (string[] args) {Swapbutton (); } [DllImport ("user32.dll")] Public Static extern intSwapmousebutton (intBswap); Public Static voidSwapbutton () {Console.WriteLine ("Please enter L/R to toggle the handedness. (L is the left hand habit, R is the right hand habit!)"); String s=Console.ReadLine (); Switch(S.toupper ()) { Case "L": Swapmousebutton (1); Console.WriteLine ("left-handed habits to modify success! Please press any key to exit ..."); Console.read (); Break; Case "R": Swapmousebutton (0); Console.WriteLine ("right-handed modification success! Please press any key to exit ..."); Console.read (); Break; default: Console.WriteLine ("The format you entered is not correct, please re-enter or exit!"); Swapbutton (); Break; } } }}
Baidu Network Address: Http://pan.baidu.com/s/1dD8NucL
C # Console program for mouse-handedness switch