Link to home
Start Free TrialLog in
Avatar of webspirit
webspirit

asked on

Set mouse speed in VB.net

Hi,

I am trying to set the mouse speed in VB.net 2008 in Vista. I am using this function.

The problem is it does not seem to work. When I did it throught the control panel, it did work. Any ideas?

Thank you!!!!!!!!!!!

Private Sub btnChangeMouseSpeed_Click(ByVal ns As String)
        ' Open Registry Key
 
        Dim NewKey As RegistryKey = _ 
                Registry.CurrentUser.OpenSubKey("Control Panel\\Mouse", True)
 
        ' Specify & Activate Mouse Speed
 
        NewKey.SetValue("MouseSpeed", ns)
        ' Max (Fastest) = 20
        ' Min (Slowest) = 0
 
    End Sub

Open in new window

Avatar of webspirit
webspirit

ASKER

Perhaps it matters that I run this on a lapton that has a touchpad and a usb mouse??
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It did not work. :(
Use the same code to modify some other registry values to isolate the problem. I think it could be the permissions issue.
I 'll try, thanks!