阿杰 发表于 2007-6-9 20:06:43

在VB中实现鼠标左右键的交换

<span class="TT1">交换鼠标左右键 <br/>--------------------------------------------------------------------------------<br/> API函数SwapMouseButton可以很简单的实现鼠标左右键的交换.请看下例<br/>&gt;&gt;步骤1----建立新工程,在窗体上放置两个CommandButton按钮.<br/>&gt;&gt;步骤2----添加如下代码:<br/>Private Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Long) As Long <br/><br/>Private Sub Command1_Click()<br/>SwapMouseButton 1<br/>End Sub<br/><br/>Private Sub Command2_Click()<br/>SwapMouseButton 0<br/>End Sub<br/>&gt;&gt;步骤3----编译运行,点击Command1和Command2,看看鼠标键的交换情况</span>
页: [1]
查看完整版本: 在VB中实现鼠标左右键的交换