In wich way can i modify the speed of the mouse under windows?
I tryied the program in the code archives, but its only read the current speed and doesn't set the new speed.
Const SPI_GETMOUSESPEED = 112
Const SPI_SETMOUSESPEED = 113
Const SPIF_SENDWININICHANGE = 2
Function GetMouseSpeed%()
Local TempSpeed%, Speed%
TempSpeed% = CreateBank(4)
api_SystemParametersInfo(SPI_GETMOUSESPEED, 0, TempSpeed%, 0)
Speed% = PeekInt(TempSpeed%, 0)
FreeBank TempSpeed%
Return Speed%
End Function
Function SetMouseSpeed(Speed%)
Local TempSpeed%, Flags%
TempSpeed% = CreateBank(4)
PokeInt TempSpeed%, 0, Speed%
Flags% = SPIF_SENDWININICHANGE
api_SystemParametersInfo(SPI_SETMOUSESPEED, 0, TempSpeed%, Flags)
FreeBank TempSpeed%
End Function
Print GetMouseSpeed()
waitkey()
SetMouseSpeed(4)
Print GetMouseSpeed()
I tryied the program in the code archives, but its only read the current speed and doesn't set the new speed.
Const SPI_GETMOUSESPEED = 112
Const SPI_SETMOUSESPEED = 113
Const SPIF_SENDWININICHANGE = 2
Function GetMouseSpeed%()
Local TempSpeed%, Speed%
TempSpeed% = CreateBank(4)
api_SystemParametersInfo(SPI_GETMOUSESPEED, 0, TempSpeed%, 0)
Speed% = PeekInt(TempSpeed%, 0)
FreeBank TempSpeed%
Return Speed%
End Function
Function SetMouseSpeed(Speed%)
Local TempSpeed%, Flags%
TempSpeed% = CreateBank(4)
PokeInt TempSpeed%, 0, Speed%
Flags% = SPIF_SENDWININICHANGE
api_SystemParametersInfo(SPI_SETMOUSESPEED, 0, TempSpeed%, Flags)
FreeBank TempSpeed%
End Function
Print GetMouseSpeed()
waitkey()
SetMouseSpeed(4)
Print GetMouseSpeed()