Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
ry4n
14 discussion posts
anyone else noticing issues with windows snap feature on win 10 build 10074? works fine when displayfusion is not running...
May 1, 2015  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've just tested this out here on my machine with Win 10 10074 and it seems to work fine for me. Do the windows not snap at all? Or do they snap, but not show the quick snap window in the other half?
May 1, 2015  • #2
User Image
ry4n
14 discussion posts
its weird, for example nothing happens when i hit win + right or win + left.... but then i use a pre-made function in displayfusion (i.e. ctrl+win+w or ctrl+win+w) to move the window and then magically the windows snap (win + right and win + left ) will start working.... but only for one or two snaps left/right and then stops working again...

if anyone can tell me what adjustment i need to make to the better win+ left script below to make it instead better win+ right script would be huge help and might fix this issue.

Better Win+Left

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//check to see if there was an error, if there was, exit function
if (windowHandle == IntPtr.Zero)
return;

//get the position of the window in the monitor, and the current monitor
Rectangle windowRect = BFS.Window.GetBounds(windowHandle);
Rectangle monitorRect = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);

//get the space on the right side of the window
int rightSpace = monitorRect.Width - (windowRect.X - monitorRect.X) - windowRect.Width;

//if the window has any space on the right, snap the window to the right of the current monitor
if (rightSpace > 0)
{
BFS.Window.MoveToRightMonitorHalf(windowHandle);
return;
}

//if we got this far then the window is on the right
//move the window to the next monitor
BFS.Window.MoveToNextMonitor(windowHandle);

//move the window to the left side
BFS.Window.MoveToLeftMonitorHalf(windowHandle);
}
}


possible better win+right but not working correctly

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
     public static void Run(IntPtr windowHandle)
     {         
          //check to see if there was an error, if there was, exit function
          if (windowHandle == IntPtr.Zero)
               return;
              
          //get the position of the window in the monitor, and the current monitor
          Rectangle windowRect = BFS.Window.GetBounds(windowHandle);
          Rectangle monitorRect = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);
         
          //get the space on the right side of the window
          int leftSpace = monitorRect.Width - (windowRect.X - monitorRect.X) - windowRect.Width;         
         
          //if the window has any space on the right, snap the window to the right of the current monitor
          if (leftSpace > 0)
          {
               BFS.Window.MoveToLeftMonitorHalf(windowHandle);
               return;
          }
         
          //if we got this far then the window is on the right         
          //move the window to the next monitor
          BFS.Window.MoveToPreviousMonitor(windowHandle);
         
          //move the window to the left side
          BFS.Window.MoveToRightMonitorHalf(windowHandle);
     }
}
May 2, 2015 (modified May 2, 2015)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've just tested out the Better Win+Left script, and it seems that it maybe has the wrong name. It actually seems to be more of a Better Win+Right. Did you try that one yet?
May 5, 2015  • #4
User Image
ry4n
14 discussion posts
must have gotten mixed up, better win + left isn't working as relablity as better win + Right. sometimes it doesn't move windows. also, my keyboard Win + Right/left still don't work when display fusion is on... everythingworked fine in win 10 buiild 64...

better win+ right

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//check to see if there was an error, if there was, exit function
if (windowHandle == IntPtr.Zero)
return;

//get the position of the window in the monitor, and the current monitor
Rectangle windowRect = BFS.Window.GetBounds(windowHandle);
Rectangle monitorRect = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);

//get the space on the right side of the window
int rightSpace = monitorRect.Width - (windowRect.X - monitorRect.X) - windowRect.Width;

//if the window has any space on the right, snap the window to the right of the current monitor
if (rightSpace > 0)
{
BFS.Window.MoveToRightMonitorHalf(windowHandle);
return;
}

//if we got this far then the window is on the right
//move the window to the next monitor
BFS.Window.MoveToNextMonitor(windowHandle);

//move the window to the left side
BFS.Window.MoveToLeftMonitorHalf(windowHandle);
}
}

better win + left

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
     public static void Run(IntPtr windowHandle)
     {         
          //check to see if there was an error, if there was, exit function
          if (windowHandle == IntPtr.Zero)
               return;
              
          //get the position of the window in the monitor, and the current monitor
          Rectangle windowRect = BFS.Window.GetBounds(windowHandle);
          Rectangle monitorRect = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);
         
          //get the space on the right side of the window
          int leftSpace = monitorRect.Width - (windowRect.X - monitorRect.X) - windowRect.Width;         
         
          //if the window has any space on the right, snap the window to the right of the current monitor
          if (leftSpace > 0)
          {
               BFS.Window.MoveToLeftMonitorHalf(windowHandle);
               return;
          }
         
          //if we got this far then the window is on the right         
          //move the window to the next monitor
          BFS.Window.MoveToPreviousMonitor(windowHandle);
         
          //move the window to the left side
          BFS.Window.MoveToRightMonitorHalf(windowHandle);
     }
}
May 5, 2015 (modified May 5, 2015)  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Yeah, sorry, I just realized that you were looking for two functions :)

I've fixed up the name on the Better Win + Right function, and have also uploaded a proper Better Win + Left to the repository. Let me know if those still don't work for you.

Regarding Win + Left not working while DF is running, I'm not sure what would be causing that. Do other WinKey shortcuts (Win + E, Win + D, etc) work correctly?
May 5, 2015  • #6
User Image
ry4n
14 discussion posts
just tried better win + left and works a lot better ... thank you , really appreciate help! ... as for win + right/left, yes other win shortcuts are working properly just one of win + right/left/up/down... thanks again
May 5, 2015  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok awesome! I'm running Win 10 10074 here, so I'll keep testing the normal Win + Left/Right hotkeys and hopefully I'll be able to reproduce it at some point for further troubleshooting :)

Thanks!
May 5, 2015  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)