Pan Peeter
16 discussion posts
Hi. This worked, center window, se picture
Now I want to use the function :Center Window Ignoring Splits (run again to restore position)
using System;
using System.Drawing;
// Moves active window to center of monitor, ignoring splits
// when run again (for same window) restores original position
// position is stored per window, so any number of windows may be centered and then moved back to original position
// set targetWidth to change window's width when centered (width is also restored when restoring position)
// ***
// TIP - set targetWidth to 1920 to emulate the width of a borderless FULL-HD window (very useful for ultra wides)
// ***
public static class DisplayFusionFunction
{
In this function i wold like to take active window, center and fit 1560, 0,2000,1392
WHen runn Center Window Ignoring Splits (run again to restore position) again then it goes back to previous size:
Is that an option?
•
Attachment: 1.png [21,302 bytes]
1.png
Jun 17, 2024 (modified Jun 17, 2024)
•
#5
I've attached a script below that should do this. You can import it via the DisplayFusion Settings > Functions > Scripted Function > Import Scripted Function.