views:

592

answers:

4

Hi All,

One of my programs seems to be changing the Display Properties > Appearance > Effects > Show window contents while dragging setting to off every few hours.

I'm not sure exactly which program, or when it happens. I have a number of programs that seem like likely culprits - wallpaper rotators, software for multiple monitors, multiple virual desktops and switching, and a few others.

I am just thinking to create a little batch script to run periodically and set the setting back to on.

Does anyone know how to do this in windows? I'm using xp pro sp3.

Thanks!

A: 

I suspect it's kept in the registry - maybe [HKEY_CURRENT_USER\Control Panel\Desktop] - "DragFullWindows"?

It would be easy to flip the registry setting back to "1" every hour or so with a batch file.

rwmnau
+3  A: 

You can use RegMon to find the program that keeps changing your settings. Maybe that's a better start than hacking around it.

Thomas
This might work, but given what I mention in my answer (which is that just changing the registry has no effect until you log out and back in), if the culprit is changing the setting programmatically (i.e. NOT changing the registry key directly), monitoring the registry might not report the right thing. It depends on how RegMon works.
Sean Nyman
+1  A: 

It seems the registry setting which controls that preference is HKCU\Control Panel\Desktop\DragFullWindows. You can read more about it here. However, trying it on my own computer does not register the change right away, so a batch script won't do it. You'll probably have to write a program to manipulate it using SystemParametersInfo(). You can pass it the SPI_SETDRAGFULLWINDOWS parameter. Here's a page explaining it more. Here's a page showing how to call it, albeit not for the same parameter.

Sean Nyman
A: 

the best option is to do this programmatically using the supported API. i haven't tested this, but it should do the trick:

SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, 
                     TRUE,
                     NULL,
                     SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)

you can use SPI_GETDRAGFULLWINDOWS to see if the the bit has been flipped to avoid unnecessarily triggering a WM_SETTINGCHANGE.

~jewels

Jewel S