Taruh kode berikut di bagian paling atas pada form :
'sebelumnya, declarasiin dulu SwapMouseButton-nya
Private Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Long) As Long
Private Const PENCETAN1 = &H0&
Private Const PENCETAN2 = &H100&
Kemudian buatlah 2 command di form tersebut. Dengan isinya sbb :
'ini coding buat di command1
Private Sub Command1_Click()
SwapMouseButton PENCETAN2
End Sub
'ini coding buat di command2
Private Sub Command2_Click()
SwapMouseButton PENCETAN1
End Sub
No comments:
Post a Comment