问题描述
如何弹出一个子窗体,当我点击的按钮。我想孩子WinForm的是在屏幕的中心和整个背景屏幕应该模糊。和一个小的关闭按钮应该是在窗体的右下角可见。我已经在网上搜索,但一无所获。
How to popup a child form when I click the button. I want to child winform to be in the centre of the screen and the whole background screen should be blurred. and a small close button should be visible in the right corner of the form. I have searched the web but found nothing.
使用的WinForms。
Using Winforms.
推荐答案
创建一个新的Windows窗体。它在默认情况下关闭按钮。将它设置为默认位置,中心屏幕。然后你按一下按钮。
Make a new windows form. it has a close button by default. Set it default position to center screen. Then on your button click.
比方说你的新形式是窗体2
Lets say your new form is Form2
Form2 frm = new Form2();
frm.ShowDialog();
它不会使画面模糊的其余部分,但用户将无法用它做任何事情。
it will not make the rest of screen blurred but user will not be able to do anything with it.
有关模糊效果的解决办法已经发布的
For blurry effect a workaround has been posted here
这篇关于在C#.NET弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!