class Program
{
[DllImport("")]
private extern static bool SwapMouseButton(bool fSwap);
//Blog address: http:///bluceyoung
[DllImport("")]
private extern static int GetSystemMetrics(int index);
static void Main(string[] args)
{
int flag = GetSystemMetrics(23);//Get the current mouse setting status
if (flag == 0)//Right-handed habit
{
SwapMouseButton(true);//Set to left hand
}
else//Left hand habit
{
SwapMouseButton(false);//Set as right hand
}
}
}