What is the best way to “smooth out” the winform background when displaying a dialog?

I would like to implement a function in my application, where the dialog with the user is displayed, and the main form ( similar to what jQuery looks like ). My only idea is to take a screenshot of the form, place it as the background of the panel (with opacity to my liking), and then click the panel above everything on the form. I have to believe that there is a better way to do this, any suggestions?

+6
user-interface c # winforms
source share
3 answers

The Opacity property is what you need to “smooth” the shape. You will need to create an overlay, my code in this thread shows how to do this.

Be careful not to look like your program is prompting for a UAC. Although this may be appropriate in browsers, the user will never have problems recognizing that the window overlaid by the dialog is disabled. The controls draw on their own to make it clear.

+11
source share

Why not just set the opacity to about 50% of the parent window before starting the modal dialog, and then return to 100% when the modal dialog is rejected? This is not exactly what you are asking for, it performs the same function for the end user.

If you want to do something like your jQuery example, you really need to make a cap / supplement / set as the background idea that you described.

+2
source share

I know this is an old thread, but if you are still interested, you can take a look at this project.

Download project

0
source share

All Articles