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