-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Fix Designer resizing form due to the WS_SIZEFRAME style flag #232
Conversation
Hi, Unfortunnately it fix issue only in designer mode but when app is running form size is incorrect. |
I tested this locally last night with all of the latest changes and couldn't reproduce that issue. Can you provide specific steps to reproduce and I'll look again tonight? Thanks! |
You can use that one : https://github.com/orapps44/MaterialSkin-login_test On first opened form we can notice difference between designer mode and debug mode with button distance from from edge. |
I am unsure how I missed this in my testing, but this is definitely a big issue. I looked for some answers to this issue last night and was unable to find a simple solution. I'll update the branch to temporarily remove the aero snapping via the Size Frame style. I will have to work on a proper solution down the road due to my current workload. I'm sorry this wasn't as easy as I first expected. |
This will remove the Aero-Snapping feature until a better total solution can be developed Documentation has been added regarding possible approaches and the reasoning behind disabling the style for the time being
For the time being, I have disabled the WS_SIZEFRAME style from the CreateParams property. I've outlined the potential steps to approach this in the future, but as stated earlier, I do not have enough time to investigate at the moment, but I would like to implement this for not only my use case, but also for others that may want some of the native Windows behavior. |
I finally found a fix for this issue. I've spent probably close to 50 hours researching this. I'll clean up the code and do a bit more testing this evening, but it appears to just work. |
Hi @VolatilePulse , Thanks a lot for your work and time. |
I don't know if this is important, but look at #227 as there is a strange behavior for MaterialTextBox2 in this branch. |
I did see your comment there and I believe it is related to the handling of the WM_NCACTIVATE message. I will take a look at reproducing that this evening and seeing what solution I can come up with. To be clear, this issue should have been present with the initial merged PR and my commit last night should not have affected this. |
This should close #227. I was unable to see the issues I was experiencing the other night on this branch, so this should properly implement Aero Snapping. I will continue exploring with my other branch to reproduce the issue I noticed with the WM_NCCALCSIZE Windows Message.