Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Pan Peeter
15 discussion posts
Hi

I need a script that expands and center active window

Heigth 1400
Width 1800

Screen is 5400 x 1400 pix

I explect that command

Code

SetSizeAndLocation(IntPtr windowHandle, int x, int y, int width, int height);


can be used, but when I tried DF crashed

Thanks up front!
Jun 7, 2023  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
You can use a custom function to do that, you can find our guide on custom functions here: https://www.displayfusion.com/HelpGuide/CustomFunctions/
Jun 7, 2023  • #2
User Image
Pan Peeter
15 discussion posts
Quote:
You can use a custom function to do that, you can find our guide on custom functions here: https://www.displayfusion.com/HelpGuide/CustomFunctions/


Thanks, I have a running finction that place windows in center of screen, but I want it to have heigth = 1400, and width = 2000, when I try this DP crashes:

//SetSizeAndLocation(IntPtr windowHandle, int x, int y, int width, int height);

Code

SetSizeAndLocation(IntPtr windowHandle, int 1000, int 0, int 2000, int 1400);
Jun 8, 2023  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
You can set the specified width/height in a custom function as well, but if you need it done via a scripted function, you can cut out the variables you're declaring inside the brackets. It should look like this:

Code

BFS.Window.SetSizeAndLocation(windowHandle, 1000, 0, 2000, 1400);


Hope that helps!
Jun 8, 2023  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)