Jump to content

AltDrag for NT4/2k/XP and Windows 7/8/10 (modified from Stefan Sundin's AltDrag)


RamonUn

Recommended Posts

Stefan Sundin wrote a program named AltDrag that adds the ability to move/resize windows with the 'ALT' key (Linux style) under Windows. I started using his program which is really awesome but encountered some performance problems on my old computer. Because AltDrag Shows the content of the windows while dragging, it is annoying to use on slow hardware, I also prefer, and find visually less disturbing, to have just a rectangle when I move/resize the window. In addition I realized that the program had a lot more features that I needed and was incompatible with Windows NT4 and 2000.

So I made a 'Micro' version that is very simple light and has few features (only the ones I need) for myself.

Now it is time to share.

This program needs at least Windows NT4 service pack 3 or later. This is because it relies on the 'LowLevel Keyboard/Mouse Proc' functions that is only supported by the NT based Windows and from NT4 sp3.

GitHub page: https://github.com/RamonUnch/AltDrag

MEGA Download for AltDrag Micro (no more updated): https://mega.nz/folder/CWoQQICK#iNDhz_M2ytBs0Q22cRdCvw

MEGA Download for fully featured AltDrag: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Original AltDrag from Stefan Sundin: https://stefansundin.github.io/altdrag/

Original Instructions on how to use AltDrag: https://stefansundin.github.io/altdrag/doc/usage.html

Edited by RamonUn
Added GitHub li,k
Link to comment
Share on other sites


Update AltDrag Micro 1.16

* Fixed compleatly opaque blacklist reading procedure, it will be trivial to
  add or remove blacklists from now.
* Removed tray.c, the three functions it contains are now in altdrag.c
+ Added MDIBlacklist: Windows list for which MDI behaviour will be disabled.
* Fixed some drawing problems (not all).
- Minimized calls to GetAncestor and GetClientRect in the case of an MDI
- removed dependancy to advapi32.dll
- removed -elevate stuff (use runas instead if you want)
- removed -quiet option (useless)

Download: https://mega.nz/folder/CWoQQICK#iNDhz_M2ytBs0Q22cRdCvw

Link to comment
Share on other sites

  • 2 weeks later...

Here again I come with the Filly featured AltDrag for NT4+

Download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

== Additions from Original AltDrag ==

== AltDrag 1.20 ==

+ Ability to drag only a square instead of the full windows (beter perf.)
+ Added an option to replace center resizing mode by bottom-right mode.
+ Added MDIs blacklist: Windows list for which MDI behaviour will be disabled.

- No more HookWindows as (unstable and mixing 64 and 32 bit code)
- No more FocusOnTyping (too buggy)

* Fixed cursor performances problems, before the cursor windows used alpha
  blending which is very slow. I just told the windows to do nothing when
  it receave the WM_PAINT or WM_ERASEBKGND messages and that's it, this also
  means proper display for all windows versions instead of being limited to
  Windows 2000+ .

* Now compatible with Windows NT4 sp3+
* Removed dependencies with shlwapi.dll
* Dynamically import PSAPI.DLL in case it is missing (it is not much used)

* Fixed: Now the cursor windows captures the mouse input (prevents some bugs).
* Fixed compleatly opaque blacklist reading procedure, it will be trivial to
  add or remove blacklists from now.
* Fixed some drawing problems (not all).

* Fixed .manifest information for high dpi awareness.
* Refactoring by putting some code into functions
* Use GetPrivateProfileInt instead of the 'String version for all int values.
* Avoid floating point arithmetric. Only int math are used.
* Add -nostdlib flag to gcc to avoid useless bloat to the dll and exe.
* Avoid GUI locking when windows is very slow to resize (with FullWin=0 only)

Link to comment
Share on other sites

  • 2 weeks later...

A very notable feature in this release is Windows 10 invisible borders fix. Now I have a Windows 10 workstation that I can test it on.

Do NOT use FullWin=0 in Vista+ if Aero is enabled or under Windows 8.x/10, this will be very slow because GDI drawing is EXTREMELY slow with DWM.

I will in the future fix this hopefully.

I wonder if I should keep this thread in the old NT topic.

It work fine on NT4 but i have not yet fixed the config dialog box on this latter, this will be hopefully for next version. You can still manually edit the ini file.

There are also some minor bugs remaining under NT4.

== AltDrag 1.22 ==

+ Added options to chose the Aero Snap ratio. You can now chose the position in percentage of screen size, where the AeroSnap corners will meet.
Default is 50%:50% ie:
AeroHoffset=50 ; Horizontal from left
AeroVoffset=50 ; Vertical from top

You could set for example AeroHoffset to 33, this mean that a windows snapped to the left will use only 33% of the screen and a window snapped to the right will use 67%. The same logic applies to AeroVoffset for the vertical direction. This will be appreciated by the widescreen users.

+ Added toggle window title bar and border on/off Action (Igor Bochkariov) I used a different implementation though. If you want to just disable the title bar and keep borders, press shift.

* Fixed Transparency action. Now when setting back the windows to an opaque state, the WS_EX_LAYERED attribute is removed as it should be. This will avoid useless performance issues when using this feature

* Fixed: Now under Windows 10, the DWM api will be used when available to obtain correct window rectangle and avoid gaps between snapping windows

* Fixed: now fullscreen windows that have a system menu will not be automatically blacklisted.

* Now a full screen window will not be restored unless the mouse is moved instead of a simple alt+click as before. It was an annoying behaviour.

* Double click will maximize a normal window and restore a maximized window.

Download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Link to comment
Share on other sites

  • 2 weeks later...

== AltDrag 1.23 ==

+ Add option to disable resizing windows that are not resizable ie: No WS_THICKFRAME. Default is to resize everything.

* Fixed: Now config dialog can be used on NT4.

* Fixed: Now AeroSnap takes into account the taskbar on NT4.

* Fixed: Now when a windows is not responding, move/resize will be disabled.

* Some optimizations were done.

* Fixed: Windows will be moved/resized in an independent thread avoiding any
  mouse delay/lockup when a window is very unresponsive. This is helpful for
  Slow video drivers on Win8/10, and for web browsers windows.

Download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Link to comment
Share on other sites

  • RamonUn changed the title to AltDrag for NT4 (modified from Stefan Sundin's AltDrag)

A new bug fix update.

== AltDrag 1.24 ==

* Fixed Crash in the config dialog.

* Fixed some windows such as mplayer's windows can now be resized again.

* Fixed translations and French and Italian translations in particular.
  More will come on this.

* Fixed Incorrect snapping of windows in an MDI under Windows 10.

* Fixed: Now on a blacklist, an empty title will be considered as a really
  empty title instead of 'any' title. You should use '*|class' to include
  all windows from a given class instead of just |class. This gives a more
  fine control over blacklist to the user.

* Fixed minor drawing problems when using FullWin=0

EDIT: Download 1.25 that fixes a memory leak...

Download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Edited by RamonUn
Link to comment
Share on other sites

  • RamonUn changed the title to AltDrag for NT4/2k/XP and Windows 7/8/10 (modified from Stefan Sundin's AltDrag)
  • 2 weeks later...

== AltDrag 1.27 ==

Very important WIN 10 DPI fix is now a real fix...

+ Added Elevate option to the tray menu as suggested by Loxaan Oxyde.

+ Added Pause Process option, use Alt+Shift+Pause to Pause the process of the windows under your cursor, press Alt+Pause to Resume. The Option AgressivePause must be set to 1 in [Input] config. Use the associated Pause blacklist. This function needs XP or later.

Note 1: This is a very aggressive option use with caution.

Note 2: The windows of the paused process will no longer be drawn leading to screen tearing on the windows itself.

Note 3: If you use WIN as a hotkey, then you can still obtain the WIN+PAUSE System Properties by pointing first the cursor to the taskbar.

+ Now when using Aero Snap, and resizing towards the top, the windows will be maximized vertically when the cursor will touch the top of the screen.
  Same behavior for the left. This behavior is ONLY for the top and left when using respectively the pure top and pure left resize modes.

* Actually fixed DPI scaling under Win10 with the .manifest I made a typo in the first place and never fixed it, because I was not using DPI scaling
  and I thought I was...

* Fixed the toggle borderless action under Windows 10, the window would not be properly refreshed because of buggy DWM.

* Fixed: Now the Transparency action will not ignore blacklists.

* Improved translation handling, now all translations are ini files in the "Lang" sub directory of AltDrag. This will simplify addition of new
  Locals, this also allows anyone with notepad to fix his own language. Finally you can remove languages that you do not need and if you want only
  English you can remove the whole "Lang" directory.

* Updated zh_CN chinese with Zepp Lu's corrections

* More French and Italian corrections.

Download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Link to comment
Share on other sites

Now this fork of AltDrag is on GitHub

https://github.com/RamonUnch/AltDrag

== AltDrag 1.28 ==

+ Added hardening flags for gcc.

+ Added a RefreshRate in the [Performance] section of AltDrag.ini that allows you to set a minimum time in milliseconds between two Windows Redraw when FullWin=1, I recommend a value that corresponds to the refresh rate of your monitor ie: 60Hz => RefreshRate=16.

+ Added Maximize action, it can be used to toggle the maximized state, combine with Shift to minimize. (Thanks to Jim Teunis for suggestion).

+ Added the CenterFraction in the [General] section of AltDrag.ini to adjust The size of the region in percent that is used for the center resizing mode. Default is 24% meaning 38% for the sides. You can, for example set it to 0 to enable a 4 regions mode instead or the 9 default regions. You can also set CenterFraction=100 and combine with the ResizeCenter=0 option in order to have a pure bottom right mode.

+ Added AeroThreshold option in the [Advanced] options. Default value is 5. It corresponds to the threshold distance in pixels at which a window will be snapped automatically to the monitor (aero style). If you do not like windows snapping for a fraction of second when changing monitors, try to set this value to only 2, in such a case it will be necessary to use Ctrl to snap windows between monitors. On the other hand if you want you can increase this value and this will make snapping between monitors easier without Ctrl key...

* Removed dependency to Advapi32.dll from hooks.dll (it was unnecessary).

* Fixed: An Aero-snapped window will now require mouse movement before moving, instead of a simple Alt+Click.

* Fixed when a window is in full screen you will actually need to move the mouse in order to resize it.

* Fixed a remaining Win 10 invisible borders bug that would shrink slightly a window when resizing it from a full screen state.

* Fixed application hang when changing DPI scaling under Win10. Note that for the moment the solution is to restart AltDrag when receiving the WM_DPICHANGED message, I hope to have better solution in the future.

* Fixed bug in Transparency action where the windows transparency could no longer be modified in some cases.

* Misc. cleanup and code refactoring here and there + Fixed all warnings. using gcc -Wall parameter.

* Minor GUI improvement for WinNT4 and Win2000.

GitHub download: https://github.com/RamonUnch/AltDrag/releases/tag/1.28

MEGA download: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Edited by RamonUn
Link to comment
Share on other sites

== AltDrag 1.29 ==

+ Added Maximize scroll action that behaves as expected: wheel up maximizes the pointed window, wheel down restores a maximized window and minimizes to taskbar a normal window. This action was proposed by bluebird11.

+ Now when Aero-snapping with double right-click, the window will be resized to full monitor width when double-clicking on the center of the window while pressing the shift key.

* The cursor is now properly limited to MDI client area when using Ctrl.

* Cleaned up some code by removing useless global variables.

* Lower action will no longer ignore the AutoFocus config flag.

* Minor refactoring, moved some code toward function and fixed some gcc's -Wsign-compare warnings.

* Fixed: Sometime when pressing escape while resizing, it would prevent further window move/resize.

* Rewrote the auto remaximize procedure. It is now much simpler and handier in my opinion. The window is now remaximized when released on the current monitor, if it was maximized when move started AND was dragged to an other monitor. There is no more 1s delay option...
Note: this procedure was not working properly on previous releases.

* Fixed: Position of the mouse cursor relative to the restored windows should be always correct now, this was a stupid bug I introduced...

* Fixed: Desktop window is now properly ignored.

* Fixed: When using Ctrl, the cursor will be properly restricted to the current monitor.

* Removed unused variables and cleaned up some code.

* Remove hard dependency to ole32.dll, it will be loaded only when using the Volume action.

Download GitHub: https://github.com/RamonUnch/AltDrag/releases/tag/1.29

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Link to comment
Share on other sites

== AltDrag 1.30 ==

+ Re-introduced the Aero snap at top to maximize a window. this behavior can be disabled with the AeroTopMaximizes option in the [Advanced] section of AltDrag.ini. The Shift key will also invert the behavior.

+ Now when auto re-maximize option is on, the re-maximizing can be prevented by pressing the shift key before releasing the mouse.

* Fixed overcompensation of Win10 invisible borders in center mode in the case of double click Aero-snapping.

* Fixed horizontal double-click Aero-snapping maximization in the case of MDI windows.

* Fixed: Now the Volume action is not limited to Vista and later. This later will use the WINMM API on NT4/2000/XP to change the waveOut volume.

* Fixed the Scroll inactive windows option, that would prevent scrolling in all metro apps under Win 10. Note that I advise against using this option anyway because Win 10 does it already natively by default.

* Now "Start|Windows.UI.Core.CoreWindow" is in the default blacklist. This will avoid AltDrag interactions with Win10's Start menu.

Download GitHub: https://github.com/RamonUnch/AltDrag/releases/tag/1.30

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg

Link to comment
Share on other sites

== AltDrag 1.31 ==

+ Added option to replace the resize center mode with Move mode. GUI was adjusted accordingly

* Improved the non full windows dragging mode, it will no longer move the window when it snaps but only the transparent square and the window will be moved when click is released as expected.

* Simplified window database and removed useless code.

* Fixed slightly too large window when resizing from a maximized window inside an MDI.

* Fixed some annoying behavior in the in case of unresponsive windows.

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg
Download GitHub: https://github.com/RamonUnch/AltDrag/releases/1.31

Link to comment
Share on other sites

== AltDrag 1.32 ==

+ Added the PearceDBClick option in [Advanced] section of Altdrag.ini. Use 1 to disable the maximize on Alt+double-click. It only applies to the Move action for now, maybe more will come if needed.

+ Added the UseCursor option in the [Advanced] section of AltDrag.ini
  Use 0 to disable any cursor handling (not recommended).
  Use 1 to enable all cursors changes (default).
  Use 2 to disable only the Hand cursor when dragging a window (icyhoty2k).
  Use 3 to always use the default cursor, even when resizing.
  Note that none of those settings is expected to affect performances in any significant way.

+ Now when pressing the SHIFT key while using double click-snapping on the center-top section of the window, this later will be maximized/restored, instead of being snapped to the top. This will be useful when using the Move instead of resize-center option.

* Lower with Middle mouse button option will no longer ignore the window blacklist, this will avoid interactions with taskbar.

* Fixed Scroll inactive windows, hopefully for real this time.

* Avoid some more lockup in the case of very unresponsive windows by using PostMessage instead of SendMessage, when applicable.

* Fixed: Now double-click snapping will respect Aero(H/V)offset settings.

* Fixed some more minor drawing problems when using FullWin=0

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg
Download GitHub: https://github.com/RamonUnch/AltDrag/releases/1.32

Link to comment
Share on other sites

  • 1 month later...

== AltDrag 1.35 ==

* Changed: to simplify the code and avoid bugs, the Ctrl is no longer suggested as a hotkey and if using it (using the ini file) other Ctrl functions will be unavailable (it was buggy in the first place anyway).

* Fixed a typo in the Alt+Tab scroll actions that lead to some bugs.

* Fixed: Ctrl in some cases does not work properly to retain window in current monitor and would be stuck sometime (thanks redactedscribe). To avoid those problems that are specific to Ctrl, the Shift key can now be used to restrict cursor to current monitor when dragging a window.

* Fixed: When adding a monitor, AltDrag needed a restart for Aero Snapping to work properly, this is no longer the case.

* Fixed .manifest file so that proper windows version can be obtained.

* GUI fixed: Now under Windows 10, the 'scroll inactive window' option will be grayed out unless it is activated, so that users do not enable it by mistake and to make it clear that it is useless for Win10.

* GUI Fixed: Now if desktop composition is enabled, it will no longer be possible to disable the Drag Full Window option (GDI Performances problem).

== AltDrag 1.34 ==

+ Added MMBLower in the [Blacklists] section of AltDrag.ini in order to disable the "Lower windows by middle clicking on the title bar" option for any window. use the name|class format.
  Example: MMBLower=*|CASCADIA_HOSTING_WINDOW_CLASS
  if you want to close tabs with middle click on Windows Terminal.

* Fixed: now the Lower action will deselect the lowered window if possible so that it can be reselected easily (thanks redactedscribe).

* Fixed: Now when a windows is snapped normally under windows, it will be restored properly if AltDragging it out. If a window is snapped with AltDrag, however it can only be restored with AltDrag.

* Fixed: Scroll Action was restored to the 1.29 version behavior (kimks3).

== AltDrag 1.33 ==

+ Added a MinAlpha option in the [Advanded] section of AltDrag.ini, in order to adjust from 0 to 255 the minimum opacity of a windows (default is 8).

* Fixed AltDrag freezing when changing DPI scaling or going to sleep mode.

* Fixed Stupid bug that would restart AltDrag wen moving windows between monitors with different DPI scaling.

* Improved English on the snapping windows option (thanks redactedscribe).

* Now settings should be kept when updating AltDrag (thanks FSund).

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg
Download GitHub: https://github.com/RamonUnch/AltDrag/releases/1.35

Link to comment
Share on other sites

  • 2 weeks later...

== AltDrag 1.36 ==

+ Added MMMaximize option in the [General] section of altdrag.ini in order to restore old AltDrag behavior (thanks brian6932):
  Set to 1 to maximize/restore on left+right click (default).
  Set to 2 to restore on a single left click instead of a drag.
  Set to 3 for both (like the original AltDrag).
  Set to 0 to disable any of those.

+ Now the AeroMaxSpeed value can be set to put a speed limit beyond which the moved window will not be Aero-Snapped. This is useful to move windows between monitors without "flicker". You have to set AeroMaxSpeed and AeroSpeedInt in the [Advanced] section of AltDrag.ini. AeroMaxSpeed is in pixels/X frames (from 1-65535) AeroSpeedInt to specifies the number of frames (default 1) from 1-255. To set this value: (i) See the frequency of your mouse and set an AeroSpeedInt to average over 10ms or so, so if you have a 1kHz mouse, set it to 8-10, if you have a ~100Hz mouse (typical) keep it to 1 or 2. (ii) Set AeroMaxSpeed to a "high" value (like 50) and try to move fast a window between two monitors, if it get aero-snapped, decrease the value until it "just" no longers snaps. (iii) Check that the window does snap when you want it to sap, if the window tends to restore when you do not want, increase the AeroMaxSpeed value.

+ Roll/Unroll action was added: It collapses the window in its title bar. It can also be used with the move action (Alt+Shift+DoubleLeftClick). You can also set RollWithTBScroll=1 in the [Input] section of your ini file to enable Alt+Wheel to roll/unroll window when pointing to their title bar. If not pointing to the title bar the normal Scroll action will be performed. If Ctrl is pressed the normal Scroll action will always be performed

+ New: Now when using Alt+Shift+DoubleRightClick, the window will be extended to the corner/border of the monitor according to which area of the window was double clicked. Alt+DoubleRightClick works as before and Aero-snaps the window to the monitor sides/corners. Finally to Maximize a window you can use Alt+Ctrl+DBLeftClick on the center portion of the window (this is useful if you use a single button config with resize center set to "move".

+ New: Now the AlphaDelta and AlphaDeltaShift value can be set into the [Advanced] section of AltDrag.ini to tune from -128 to +127 the step at which the transparency is changed when using the Transparency Action. Default is 64 and 8 with the Shift modifier. You can put negative values if you want to invert wheel Up/Down direction.

* Fixed/New: When Aero-snapping with AltDrag, the window can be restored via the title bar like normal. This is enabled if NormRestore=1 in the [General] section of AltDrag.ini.

* Fixed/New: Now a full screen window will be resized to full screen when moving it to a different monitor. If you want you can set ResizeAll=3 to force move/resize of all full screen window. Keep in mind that some full screen windows are really not resizable (eg Firefox and Edge).

* Fixed: Now if MinAlpha is set to 0, it will be clamped back to 1, because setting to zero the alpha of a window disables any interaction with it. Everyone should also add ",Program Manager|Progman" to their windows blacklist (without the quotes).

* New: Improved the AltDrag.txt file, read it for some basic documentation.

* Fixed: cleaned up some code and corrected potential bugs, moved some more code into functions.

* Fixed: Now the AutoRemaximize option should always work.

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg
Download GitHub: https://github.com/RamonUnch/AltDrag/releases/1.36

Link to comment
Share on other sites

  • 2 weeks later...

== AltDrag 1.37 ==

* Fixed: Now moveable full screen windows should be restored to full screen when changing monitor. This was not working properly in 1.36. Note that many full screen windows are really not moveable anyway. Under Windows 10 the file explorer will behave correctly, not Firefox.

* Fixed: the Scroll list was added in the [Blacklist] section of AltDrag.ini in order to disable the scroll action for any window. In addition the Processes blacklist will apply to scroll action as well.

* Fixed bug when the origin monitor was a NULL pointer in some cases under older windows versions.

* Fixed ini file: the proper name of the two settings about max aero speed are AeroMaxSpeed and AeroSpeedInt.

* Fixed: manifest file now fallback to per monitor dpi awareness version 1 if version 2 is not available ie. Win 8.1 and Win10 before build 1703.

* More code cleanup, some code was moved to functions and potential NULL pointer dereferencing were fixed.

* GUI New: now the Identify window option will show the program image name.

* GUI Fixed: Now the Snaplist has to be edited with the ini file and the Scroll blacklist is visible instead (much more useful). Snapplist is a quite advanced detail anyway.

* GUI Fixed: re-introduction of the Advanced tab in the options with more options that previously required direct ini file edition. This should be helpful for all users. It is not yet translated though.

Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg
Download GitHub: https://github.com/RamonUnch/AltDrag/releases/1.36

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...