questo è un programma per me dato che voglio espandere le funzionalità del mouse che ho rifacendomi ad una shotcurt per poter modificare i profili di velocita senza accedere al pannello
la lettura funziona correttamente grazie per la scrittura del valore ho usato il mio vecchio codice riportato di seguito
codice:
Dim Speed As Integer
Speed = SPI.MouseSpeed
MsgBox("ciao" & Speed)
Speed = 20
SystemParametersInfo(SPI_SETMOUSESPEED, 0, Speed, 0)
MsgBox("Velocita del mouse:" & Speed)
End Sub
codice:
Module SPI
Public Declare Ansi Function SystemParametersInfoVal Lib "user32.dll" Alias "SystemParametersInfoA" (ByVal uiAction As Integer, ByVal uiParam As Integer, ByVal pvParam As Integer, ByVal WinIni As Integer) As Boolean
Public Declare Auto Function SystemParametersInfo Lib "user32.dll" (ByVal uiAction As Integer, ByVal uiParam As Integer, ByVal pvParam As IntPtr, ByVal WinIni As Integer) As Boolean
Public Declare Ansi Function SystemParametersInfoRef Lib "user32.dll" Alias "SystemParametersInfoA" (ByVal uiAction As Integer, ByVal uiParam As Integer, ByRef pvParam As Integer, ByVal WinIni As Integer) As Boolean
Public Const SPI_GETMOUSESPEED = &H70
Public Const SPI_SETMOUSESPEED = 113
Public Property MouseSpeed() As Integer
Get
Dim ret As Integer
If Not SystemParametersInfoRef(SPI_GETMOUSESPEED, 0, ret, 0) Then
Throw New System.ComponentModel.Win32Exception("SystemParametersInfo failed.")
End If
Return ret
End Get
Set(ByVal Value As Integer)
If Not SystemParametersInfoVal(SPI_GETMOUSESPEED, 0, Value, 0) Then
Throw New System.ComponentModel.Win32Exception("SystemParametersInfo failed.")
End If
End Set
End Property
End Module
Ciao scusami un altra domanda sto da scamattina a girare su msdn e bla bla bla dove posso reperire informazioni come queste dato che in nessun manuale le ho trovate grazie caro per la risposta