Toggle full window dragging

A

Alex Wenzel

Hi,

I want to have full window dragging disabled all the time (can't stand
it), and so I have it turned off in display properties. But I have a
DVB-T tuner that keeps resetting it to "on" every time (besides other
things, like resetting the screensaver to "1 min") and there seems to
be no way to keep this POS from doing that.

If I can't prevent it from switching this setting, I want at least a
way to go back to "off" with one click immediately.
So I created a .reg file that reads:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"DragFullWindows"="0"

But this only works at the next logon. However, both the crappy tuner
program and switching under display properties -> appearance ->
effects to disable it work immediately.

Does anyone know a way to create a workable one-click-solution (well,
double-click, actually)?

OS: XP Pro SP2

TIA
Alex
 
M

Mark V

In said:
Hi,

I want to have full window dragging disabled all the time (can't
stand it), and so I have it turned off in display properties.
But I have a DVB-T tuner that keeps resetting it to "on" every
time (besides other things, like resetting the screensaver to "1
min") and there seems to be no way to keep this POS from doing
that.

If I can't prevent it from switching this setting, I want at
least a way to go back to "off" with one click immediately.
So I created a .reg file that reads:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"DragFullWindows"="0"

But this only works at the next logon. However, both the crappy
tuner program and switching under display properties ->
appearance -> effects to disable it work immediately.

Does anyone know a way to create a workable one-click-solution
(well, double-click, actually)?

OS: XP Pro SP2

You can try "activating" the changes by having the shell reapply
user settings. That should work for this (but not tested).
Write a batch file that includes your registry merge. Then add
this (all one line)

%systemroot%\System32\RUNDLL32.EXE %systemroot%\System32
\user32.dll,UpdatePerUserSystemParameters ,1 ,True

Then make a Desktop Shortcut to the batch file.
(to which you might add a custom Shortcut Key combo if you like)
 
A

Alex Wenzel

Mark said:
You can try "activating" the changes by having the shell reapply
user settings. That should work for this (but not tested).
Write a batch file that includes your registry merge. Then add
this (all one line)

%systemroot%\System32\RUNDLL32.EXE %systemroot%\System32
\user32.dll,UpdatePerUserSystemParameters ,1 ,True

(Sorry for late reply, been away for a while.)
This doesn't seem to work. I made the following batch file:

regedit /s DragFullWindows_off.reg
%systemroot%\System32\RUNDLL32.EXE %systemroot%\System32
\user32.dll,UpdatePerUserSystemParameters ,1 ,True
(%systemroot%...True all in one line)

The batch file changes the registry value, and then it seems to do
something, as I can see the desktop icons flicker, but it doesn't
immediately disable the full windows dragging. It still needs a new
logon.
 
M

Mark V

[ ]
(Sorry for late reply, been away for a while.)
This doesn't seem to work. I made the following batch file:

regedit /s DragFullWindows_off.reg
%systemroot%\System32\RUNDLL32.EXE %systemroot%\System32
\user32.dll,UpdatePerUserSystemParameters ,1 ,True
(%systemroot%...True all in one line)

Unclear above in News formatting.
regedit... is one line
%systemroot%... is one line
The batch file changes the registry value, and then it seems to
do something, as I can see the desktop icons flicker, but it
doesn't immediately disable the full windows dragging. It still
needs a new logon.

I am sorry to hear it does not work. I was not certain that it
would. Perhaps another poster will have a solution.

Just to try it, you might kill the explorer.exe (shell) process and
allow it to restart.

"DVB-T tuner that keeps resetting it to "on"
every time (besides other"

Not ideal, but one might possibly alter the ACLs on the HKCU key in
question such that your account has only Read permissions...?
 
A

Ayush

Replied to [Alex Wenzel]s message :
Hi,

I want to have full window dragging disabled all the time (can't stand
it), and so I have it turned off in display properties. But I have a
DVB-T tuner that keeps resetting it to "on" every time (besides other
things, like resetting the screensaver to "1 min") and there seems to
be no way to keep this POS from doing that.

If I can't prevent it from switching this setting, I want at least a
way to go back to "off" with one click immediately.
So I created a .reg file that reads:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"DragFullWindows"="0"


Use Vbs/Js and send keys method to open display properties, effects, untick, ok, ok :

Set ws = CreateObject("Wscript.Shell")
ws.Run "control desk.cpl ,2"
wait "Display Prop"
ws.SendKeys "%E"
wait "Effects"
ws.SendKeys "%w~"
wait "Display Prope"
ws.SendKeys "~"
Sub wait (title)
Do Until ws.AppActivate(title)
WScript.Sleep 75
Loop
End Sub



This VBS will toggle the window dragging so run it only when window dragging is off
or add a sub that checks the reg value before toggling.
 
A

Alex Wenzel

Ayush said:
Use Vbs/Js and send keys method to open display properties, effects, untick, ok, ok :

Set ws = CreateObject("Wscript.Shell")
ws.Run "control desk.cpl ,2"
wait "Display Prop"
ws.SendKeys "%E"
wait "Effects"
ws.SendKeys "%w~"
wait "Display Prope"
ws.SendKeys "~"
Sub wait (title)
Do Until ws.AppActivate(title)
WScript.Sleep 75
Loop
End Sub
This VBS will toggle the window dragging so run it only when window dragging is off
or add a sub that checks the reg value before toggling.

Ayush, thanks a lot.
Although I don't understand a lot of VBS/JS, it was easy to adapt it to
my localized German version of Windows. This does the job nicely.
I'd really like to know what happens behind the scenes and why Windows
applies it immediately this way, but not with the other proposed
method.

Alex
 
A

Ayush

Replied to [Alex Wenzel]s message :
Ayush, thanks a lot.
Although I don't understand a lot of VBS/JS, it was easy to adapt it to
my localized German version of Windows. This does the job nicely.
I'd really like to know what happens behind the scenes and why Windows
applies it immediately this way, but not with the other proposed
method.


Because it opens the dialog boxes then sets the setting (so it is done by GUI that's
why it works).


Script explanation(line by line):
1: Create the object
2: Open the Display properties dialog box (desk.cpl > 3rd tab(0,1,2 =3))
3: Wait until the window is succesfully activated
4: Send "%E" key (%=Alt so this means Alt+E that opens Effects dialog)
5: Wait until Effects window is open ..
6: Send "%w~" (%=Alt, so %w=Alt+w, ~=Enter key)
7: Wait again..
8: Again send the Enter key
9-13: The sub that is used to wait for dialog boxes

Set ws = CreateObject("Wscript.Shell")
ws.Run "control desk.cpl ,2"
wait "Display Prop"
ws.SendKeys "%E"
wait "Effects"
ws.SendKeys "%w~"
wait "Display Prope"
ws.SendKeys "~"
Sub wait (title)
Do Until ws.AppActivate(title)
WScript.Sleep 75
Loop
End Sub
 
A

Alex Wenzel

Ayush said:
Replied to [Alex Wenzel]s message :
Ayush, thanks a lot.
Although I don't understand a lot of VBS/JS, it was easy to adapt it to
my localized German version of Windows. This does the job nicely.
I'd really like to know what happens behind the scenes and why Windows
applies it immediately this way, but not with the other proposed
method.

Because it opens the dialog boxes then sets the setting (so it is done by GUI that's
why it works).

Script explanation(line by line):
[snip: explanation of script]

Sorry, that's not what I meant with my last remarks.
I can see what it does (and that't why I was able to adapt it), and the
script will probably be also useful for me in other ways as well.
What I meant is why the changes via GUI (with or without the vbs
script) are applied immediately while the method
%systemroot%\System32\RUNDLL32.EXE
%systemroot%\System32\user32.dll,UpdatePerUserSystemParameters ,1 ,True

recommended earlier in this thread is not.
I'm wondering why this cannot be done via the command line.

Alex
 
A

Ayush

Replied to [Alex Wenzel]s message :
What I meant is why the changes via GUI (with or without the vbs
script) are applied immediately while the method


Sorry, I dont know about that ..
 
M

Mark V

Ayush said:
Replied to [Alex Wenzel]s message :
Ayush, thanks a lot.
Although I don't understand a lot of VBS/JS, it was easy to
adapt it to my localized German version of Windows. This does
the job nicely. I'd really like to know what happens behind
the scenes and why Windows applies it immediately this way,
but not with the other proposed method.

Because it opens the dialog boxes then sets the setting (so it
is done by GUI that's why it works).

Script explanation(line by line):
[snip: explanation of script]

Sorry, that's not what I meant with my last remarks.
I can see what it does (and that't why I was able to adapt it),
and the script will probably be also useful for me in other ways

You might at some point be interested in AutoIt3
http://www.autoitscript.com/autoit3/index.php
as well. What I meant is why the changes via GUI (with or
without the vbs script) are applied immediately while the method
%systemroot%\System32\RUNDLL32.EXE
%systemroot%\System32\user32.dll,UpdatePerUserSystemParameters
,1 ,True

recommended earlier in this thread is not.
I'm wondering why this cannot be done via the command line.

I cannot say why exactly, but the "UpdatePerUserSystemParameters"
only works for some reg changes. Others seem to only get applied
when an "Apply" or "OK" and exit from a GUI dialog occurs. (or
logoff/logon or shell restarts). Ask Bill Gates? <G>
 
A

Ayush

Replied to [Mark V]s message :
I cannot say why exactly, but the "UpdatePerUserSystemParameters"
only works for some reg changes.

Can you tell me which settings it updates ?
 
M

Mark V

Replied to [Mark V]s message :
I cannot say why exactly, but the "UpdatePerUserSystemParameters"
only works for some reg changes.

Can you tell me which settings it updates ?

I have no such list, nor have I ever seen one.
"Trial and error".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top