-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add support for Aero Snapping #223
Conversation
Provides consistent control positioning by referencing client area instead of form area Removed unnecessary WndProc code for resizing due to changes Minimal code cleanup Fixes maximize bug that allowed "drifting" of the window Fixes maximize bug that prevented the form from being maximized on a second monitor Fixes maximize bug that required the program to be maximized prior to snapping maximized
Thank you @VolatilePulse for this great work. |
@VolatilePulse : This PR seems to be root cause of issue #227. |
Yeah, I just noticed that last night but couldn't identify the cause of the issue. This helps me narrow down what's causing it and allow me to work on a solution. Unfortunately, I'll be out of town until next week. Edit: |
It seems to be related with WS_SIZEFRAME. Issue is solved when WS_SIZEFRAME is removed from :
But without WS_SIZEFRAME, aero snap doesn't work ... |
For the time being, this code will suffice for the designer. I'll have to do more investigating once I'm back as information is very limited. protected override CreateParams CreateParams
{
get
{
var par = base.CreateParams;
par.Style |= WS_MINIMIZEBOX | WS.WS_SYSMENU;
if (!DesignMode)
par.Style |= WS_SIZEFRAME;
return par;
}
} Edit: |
Hi @VolatilePulse , Bug mentioned in #243, seems to be a side effect of this PR. |
Provides consistent control positioning by referencing client area instead of form area
Removed unnecessary WndProc code for resizing due to changes
Minimal code cleanup
Fixes maximize bug that allowed "drifting" of the window
Fixes maximize bug that prevented the form from being maximized on a second monitor
Fixes maximize bug that required the program to be maximized prior to snapping maximized