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

[Feature Request]: Use KryptonForm 'Blur' facilities when displaying a messagebox #56

Closed
Wagnerp opened this issue Mar 27, 2021 · 16 comments
Labels
answered This question has been adequately answered. enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. wontfix This will not be worked on

Comments

@Wagnerp
Copy link
Contributor

Wagnerp commented Mar 27, 2021

As title states.

@Wagnerp Wagnerp added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. labels Mar 27, 2021
@Smurf-IV
Copy link
Member

I'm confused..
The "Owner Form" (With BlurValues.EnableBlur = true;) initially does blur for

  • a normal Winform.MessageBox and then appears clear once the box is stable
  • Is blurred for a KryptonMessageBox (But is mashed up on Windows 10 with dpi scaling)
    • Does not remain blurred if then using a tool like "Snip'n'sketch to capture the image!

@Wagnerp
So "As the title states" is on which OS and under what circumstances ?
And / or is it referring to the "Does not remained blurred" as above ?

@Smurf-IV
Copy link
Member

Smurf-IV commented Mar 27, 2021

PR with test modifications:
Krypton-Suite/Standard-Toolkit-Demos#5

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

The window behind the messagebox needs to be blurred to attract the user's attention, but go back to 'normal' once the messagebox goes away.

But this should be optional in the arguments to give the developer freedom based on his/her needs.

@Smurf-IV
Copy link
Member

TheDisappearingBlur

@Smurf-IV
Copy link
Member

I disagree about it being an option in the MessageBox params, as this is set in the Owner form.
And.. If the messageBox does not have an owner passed through, then it would not be able to adjust the blur functionality as it was shown anyway !

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

Is it possible to 'feed' the blur values to a KryptonForm in a messagebox, as I don't think EnableBlur is enabled by default?

@Smurf-IV
Copy link
Member

It is not "Enabled by default", but if the Developer knows they are calling a Messagebox and wants to blur just for that occasion, then - as per the code snippet behind the gif above - they can just set it for the duration of the MessageBox call.

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

I was thinking for the duration that the messagebox is shown, as the owner would have lost its focus until the messagebox is dismissed.

@Smurf-IV Smurf-IV self-assigned this Mar 27, 2021
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label Mar 27, 2021
@Smurf-IV
Copy link
Member

            if (chkUseBlurring.Checked)
            {
                BlurValues.EnableBlur = true;
                BlurValues.BlurWhenFocusLost = true;
            }
            else
            {
                ResetBlurValues();
            }

@Smurf-IV
Copy link
Member

Smurf-IV commented Mar 27, 2021

During the testing of this feature "turned on for for messageBox", I found 3 other bugs

  1. When Blurring on Windows 10 with a large screen, the offset of the blur overlay is wrong
  2. The MessageBox display clears the blur underneath (Due to the code thinking it has lost focus, even when the messageBox is owned)
  3. If the BlurWhenFocusLost is set and the app is underneath another, then it will still have the blur overlay topmost (i.e. on top of the other app which is currently fullscreen!)

These will need to be raised,and related back to this.
And, This one set to "Will not fix", and requires a FAQ doc update on how to use it for this scenario.

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

Hold on, with the BlurValues are they only applied to an individual KryptonForm or is there a way to set a global preference for these values?

Dpi scaling is really... really bad on Windows, especially in 4k!

@Smurf-IV
Copy link
Member

Hold on, with the BlurValues are they only applied to an individual KryptonForm or is there a way to set a global preference for these values?

Individual Form values:
image

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

Hold on, with the BlurValues are they only applied to an individual KryptonForm or is there a way to set a global preference for these values?

Individual Form values:
image

So... could there be a way to 'set and forget' these values in a application? (i.e. values can be adopted by every single KryptonForm based on a few calls)

@Smurf-IV
Copy link
Member

Smurf-IV commented Mar 27, 2021

So... could there be a way to 'set and forget' these values in a application?

It would have to be at the KManager / Theme level,
and for the code to go and check that each time the "VisualForm is created"
And then for it to be a Only Set if true, otherwise use local value - Documenting that would be "Strange"
And is not really the scope of this "Feature Request"

Also if it is a KryptonMessageBox (Or alert or other pop-up style based of VisualForm) then what settings would they have ?

@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

So... could there be a way to 'set and forget' these values in a application?

It would have to be at the KManager / Theme level,
and for the code to go and check that each time the "VisualForm is created"
And then for it to be a Only Set if true, otherwise use local value - Documenting that would be "Strange"
And is not really the scope of this "Feature Request"

Also if it is a KryptonMessageBox (Or alert or other pop-up style based of VisualForm) then what settings would they have ?

Going to start a new thread to discuss this idea, but might have an idea for 'special cases'

@Smurf-IV Smurf-IV removed their assignment Mar 27, 2021
@Smurf-IV Smurf-IV added answered This question has been adequately answered. wontfix This will not be worked on and removed under investigation This bug/issue is currently under investigation. labels Mar 27, 2021
@Wagnerp
Copy link
Contributor Author

Wagnerp commented Mar 27, 2021

Issue closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered This question has been adequately answered. enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants