C # Console program for mouse-handedness switch

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.