I do not know Perl, I just read the list trying to pick it up.
I know that when you are on the mouse property sheet you must hit apply in
order for your changes to take affect.

>From what I have read it looks like you need to set the value, then Query
the value.
This will make the driver query the registry without reload the local user
registry.

These new SPI_XXX values let you programmatically retrieve and set system
options such the mouse speed, whether the active window "tracks" the cursor,
and if menus are animated (that is, they slide open, rather than pop up). 
Where available, Figure 7 includes a short description of what the SPI_XXX
values do. In most other cases, the name itself is usually enough of an
indicator. To let you easily see what all the new SPI_XXX and SM_XXX values
return, I wrote the SystemMetricsParams program listed in Figure 8. 

From
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/1197/nt5dll.htm&nav=
/msj/1197/newnav.htm


Under Windows 98 and 2000 you can control the speed of the mouse. The mouse
speed determines how far the pointer will move based on the distance the
mouse moves. The pvParam parameter must point to an integer that receives a
value which ranges between 1 (slowest) and 20 (fastest). A value of 10 is
the default. The value can be set by an end user using the mouse control
panel application or by an application using the SystemParameterInfo API
function: 

Private Declare Function SystemParametersInfo Lib "user32" Alias _
    "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
    ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Const SPI_SETMOUSESPEED = 113
Const SPI_GETMOUSESPEED = 112

' modify the mouse speed to make it as fast as possible
Dim Speed As Long
Speed = 20
SystemParametersInfo SPI_SETMOUSESPEED, 0, ByVal Speed, 0

You can retrieve the current mouse speed (so that you can later restore it)
using the SPI_GETMOUSESPEED value for the first argument to
SystemParameterInfo: 
Dim Speed As Long
' note that Speed is passed ByRef
SystemParametersInfo SPI_SETMOUSESPEED, 0, Speed, 0
Print "Mouse speed = " & Speed

>From http://www.vb2themax.com/Item.asp?PageID=TipBank&Cat=1450&ID=338


-----Original Message-----
From: Cruickshanks, Darin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 8:57 AM
To: [EMAIL PROTECTED]
Subject: How to programmatically make registry changes take effect


Hi All, 
Does anyone know of a way to make changes to the registry (in particular
HKCU) take effect immediately using Perl?  For instance if you change the
mouse speed by modifying the appropriate keys in HKCU using Perl, the
changes only take effect after you logoff then back on.  A third party
utility that performed this function would be just as useful,
Thanks, 
Darin 
-------------------------------------------- 
Darin Cruickshanks 
Labs Manager, Computing Service 
University of Essex 
[EMAIL PROTECTED] 
01206 873585 
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to