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

Fix Designer resizing form due to the WS_SIZEFRAME style flag #232

Merged
merged 4 commits into from
Oct 12, 2021

Conversation

VolatilePulse
Copy link

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.

@orapps44
Copy link
Collaborator

orapps44 commented Oct 5, 2021

Hi,

Unfortunnately it fix issue only in designer mode but when app is running form size is incorrect.

@orapps44 orapps44 added this to the 2.3.0 milestone Oct 5, 2021
@VolatilePulse
Copy link
Author

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!

@orapps44
Copy link
Collaborator

orapps44 commented Oct 5, 2021

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.

@VolatilePulse
Copy link
Author

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
@VolatilePulse
Copy link
Author

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.

@VolatilePulse
Copy link
Author

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.

@orapps44
Copy link
Collaborator

Hi @VolatilePulse ,

Thanks a lot for your work and time.
I will review your code tonight

@valimaties
Copy link

I don't know if this is important, but look at #227 as there is a strange behavior for MaterialTextBox2 in this branch.

@VolatilePulse
Copy link
Author

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.

@orapps44 orapps44 merged commit 77d82c9 into leocb:master Oct 12, 2021
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

Successfully merging this pull request may close these issues.

Form Designer increase size by 28x28 pixels
3 participants