redtaped / ez-startup

1 stars 1 forks source link

Feat: Custom window size and position #18

Open ASwitchCase opened 11 months ago

ASwitchCase commented 11 months ago

Description

As a user I want to be able to customize the size and the position of the windows that are opened.

Acceptance Criteria

  1. Should be able to specify size and position of each individual window.
  2. Both size and position should be optional.
redtaped commented 11 months ago
DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);

MoveWindow(ApplicationHandle, 600, 600, 600, 600, true);

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-movewindow?redirectedfrom=MSDN