Results 1 to 4 of 4

Thread: how to change mouse speed?

  1. #1

    Thread Starter
    Banned
    Join Date
    Jan 2009
    Posts
    138

    how to change mouse speed?

    Change mouse speed from setting the value in a textbox (textbox1), then clicking a button to change it (set it).

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: how to change mouse speed?

    Add this to the form:
    Code:
    Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
        (ByVal uAction As Integer, ByVal uParam As Integer, ByRef lpvParam As Object, ByVal fuWinIni As Integer) As Integer
        Const SPI_SETMOUSESPEED As Integer = 113
    and put this in the button's Click sub:
    Code:
            SystemParametersInfo(SPI_SETMOUSESPEED, 0, Integer.Parse(TextBox1.Text), 0)
    The maximum value for the speed is 20.

    cheers, BB

  3. #3
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: how to change mouse speed?

    I'd be very careful about changing system-wide settings like the mouse speed unless your program is specifically designed to do that.

    Nothing a user hates more than a program that messes around with their windows settings if they don't realise thats whats happening.

  4. #4
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: how to change mouse speed?

    Point taken. Thanks, Paul. BB

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width