Board logo

标题: [系统相关] 【已解决】如何实现切换鼠标左右键的主次? [打印本页]

作者: mimixi666    时间: 2016-4-7 08:50     标题: 【已解决】如何实现切换鼠标左右键的主次?

本帖最后由 pcl_test 于 2016-4-7 23:33 编辑

如果别人用我的电脑,我可以快速切换回正常的左右键,因为我是左撇子。
作者: codegay    时间: 2016-4-7 09:49

http://www.appinn.com/imouse-switch/
作者: 虫子樱桃    时间: 2016-4-7 13:26

RUNDLL32.EXE USER32.DLL,SwapMouseButton
作者: ivor    时间: 2016-4-7 22:02

本帖最后由 ivor 于 2016-4-8 18:35 编辑

Visual C++,运行一次切换一次
  1. #include <Windows.h>
  2. int _tmain(int argc, _TCHAR* argv[])
  3. {
  4. if (SwapMouseButton(TRUE)){
  5. SwapMouseButton(FALSE);
  6. }
  7. return 0;
  8. }
复制代码
回复 3# 虫子樱桃
作者: pcl_test    时间: 2016-4-7 22:58

本帖最后由 pcl_test 于 2016-4-8 06:30 编辑
  1. /*&cls
  2. @echo off
  3. set "netpath=%systemroot%\Microsoft.NET\Framework"
  4. for /f "delims=" %%a in ('dir /ad /b "%netpath%\v?.*"') do (
  5.     if exist "%netpath%\%%a\csc.exe" (
  6.         set "cscpath=%netpath%\%%a\csc.exe"
  7.         goto :0
  8.     )
  9. )
  10. echo;未安装.Net Framework 2.0及其以上版本组件或相关程序丢失&pause&exit
  11. :0
  12. "%cscpath%" /out:SwapMouseButton.exe "%~f0"
  13. SwapMouseButton.exe
  14. pause&exit
  15. */
  16. using System;
  17. using System.Runtime.InteropServices;
  18. class Program
  19. {
  20.     //http://blog.csdn.net/bluceyoung/article/details/8582160
  21.     [DllImport("user32.dll")]
  22.     private extern static bool SwapMouseButton(bool fSwap);
  23.     static void Main(string[] args)
  24.     {
  25.         if (SwapMouseButton(true))SwapMouseButton(false);
  26.     }
  27. }
复制代码

作者: freesoft00    时间: 2016-4-7 23:53

回复 3# 虫子樱桃

如何切换回来呀
作者: CrLf    时间: 2016-4-8 01:39

回复 4# ivor


    已编译上传:http://www.bathome.net/s/tool/?key=SwapMouseButton




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2