Is there a way to expand the window size when in windowed or windowed-borderless but at a lower than monitor native resolution? Reason is, endgame really slowed down in fastest mode on my 4K monitor and even with high-end PC it is too slow for comfortable playing.
This is what I have tried so far with C#:
Nothing worked yet. MoveWindow is able to move the window with X and Y but not set size.
This is what I have tried so far with C#:
Code:
//Definition for Window Placement Structure
[StructLayout(LayoutKind.Sequential)]
private struct WINDOWPLACEMENT
{
public int length;
public int flags;
public int showCmd;
public System.Drawing.Point ptMinPosition;
public System.Drawing.Point ptMaxPosition;
public System.Drawing.Rectangle rcNormalPosition;
}
Code:
[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll")]
private static extern bool SetWindowPlacement(IntPtr hWnd, [In] ref WINDOWPLACEMENT lpwndpl);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
Code:
foreach (Process proc in Process.GetProcessesByName("stellaris")) {
WINDOWPLACEMENT wp = new WINDOWPLACEMENT();
GetWindowPlacement(proc.MainWindowHandle, ref wp);
wp.showCmd = 3; //SW_SHOWMAXIMIZED = 3
SetWindowPlacement(proc.MainWindowHandle, ref wp);
ShowWindowAsync(proc.MainWindowHandle, 3);
MoveWindow(proc.MainWindowHandle, 0, 0, 3840, 2160, true);
}
Nothing worked yet. MoveWindow is able to move the window with X and Y but not set size.