VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



turn Mouse button Left to Right Right to Left!

by Shahid Rasool (8 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 18th October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

turn Mouse button Left to Right Right to Left!

API Declarations


Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40

Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long

Public Type DiskInformation
lpSectorsPerCluster As Long
lpBytesPerSector As Long
lpNumberOfFreeClusters As Long
lpTotalNumberOfClusters As Long
End Type


'Code to Swap the Mouse Buttons using API
'Declarations
Public Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Long) As Long
Public Const MB_DEFBUTTON1 = &H0&
Public Const MB_DEFBUTTON2 = &H100&


Type SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type

Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type

Type MEMORYSTATUS
dwLength As Long
dwMemoryLoad As Long
dwTotalPhys As Long
dwAvailPhys As Long
dwTotalPageFile As Long
dwAvailPageFile As Long
dwTotalVirtual As Long
dwAvailVirtual As Long
End Type

Declare Function GetTickCount& Lib "kernel32" ()




Rate turn Mouse button Left to Right Right to Left!



Private Sub Command1_Click()

SwapMouseButton MB_DEFBUTTON2 ' To Change the left click to right
MsgBox ("The Mouse Button is Right")

End Sub

Private Sub Command2_Click()
SwapMouseButton MB_DEFBUTTON1 ' To Change the left click to right
MsgBox ("The Mouse Button is Left")

End Sub

Download this snippet    Add to My Saved Code

turn Mouse button Left to Right Right to Left! Comments

No comments have been posted about turn Mouse button Left to Right Right to Left!. Why not be the first to post a comment about turn Mouse button Left to Right Right to Left!.

Post your comment

Subject:
Message:
0/1000 characters