Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindowExtensions.cs, MoveAndResize() #122

Closed
vfib opened this issue May 11, 2023 · 2 comments
Closed

WindowExtensions.cs, MoveAndResize() #122

vfib opened this issue May 11, 2023 · 2 comments

Comments

@vfib
Copy link

vfib commented May 11, 2023

Hello together,
I would like to move my window without resizing it.

SetWindowPositionAndSize(IntPtr hwnd, double x, double y, double width, double height)

So I read the doc of the MoveAndResize in WindowExtensions.cs, which states that for keeping the actual size

Width of the window in device independent pixels, or null if keeping the current size
Height of the window in device independent pixels, or null if keeping the current size

I would have to set a non nullable double to null? Perhaps im just missing something but generally Im curious about this. There is a function named SetWindowSize to only set the size, but no function to only set the position. Is this related to DPI things?
When using SetWindowPos from user32 I can set SWP_NOSIZE, but here its kind of irritating for me.

@dotMorten
Copy link
Owner

Looks like the doc is wrong (I'll get that fixed). The size isn't nullable. You can just pass in the current width and height to avoid resize.

@dotMorten
Copy link
Owner

Now available in v2.3 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants