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
JessicaCelone
1 discussion post
Hi! Quick question about setting window positions with DisplayFusion. I'm using it on an ultrawide monitor, so I've set a rule that snaps the windows into thirds instead of just half, and it was fantastic and easy and took probably 4 minutes in total. I would like to be able to do this without losing "corner snapping" functionality though, in total that would be 9 positions; full, top, bottom, in left, center, right. A bit unweildly to have separate hotkeys for,

As far as I can tell, theres no way to create a custom function that preserves X position, and changes y position. Apparently only one main key can be used, (so no ALT+C+UP), So I'm going to dive into scripting

I guess my question is; Is there an argument to change only Y position? Or should I enter all 9 positions, and basically have it say "If Left, cycle through LeftTop, LeftCentre, LeftBottom"

Any insights as to how to go about this?
Apr 28, 2016  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You could create a script that does this, for sure. If you want to only change the Y position, you just need to get the current X position, then use that as the X value in the function, like this:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// set the X value to the current value
int windowX = BFS.Window.GetBounds(windowHandle).X;

// set the Y value to whatever you'd like it to be
int windowY = 400;

// move the window
BFS.Window.SetLocation(windowHandle, windowX, windowY);
}
}


Hope that helps!
Apr 29, 2016  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)