怎样产生[产生什么? -SA]上的按钮单击弹出窗口? [英] How to genrate generate [what? -- SA] on button click popup?

查看:55
本文介绍了怎样产生[产生什么? -SA]上的按钮单击弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows窗体C#中生成按钮单击弹出窗口?

弹出窗口的大小必须与基本表单的大小相同,并且应在1-2秒内自动销毁.

如果有人可以帮助我编写代码,那将是gr8帮助.

How to genrate on button click popup in windows form C#?

Popup must be as same size that of the the base form and it should auto destruct in 1-2 sec..

Please if any body can help me with code then it would be gr8 help.

推荐答案

处理事件Button.Click并使用System.Windows.Forms.Timer. (这是这种计时器有用的罕见情况之一,因为它对开发人员来说很简单,并且其极差的精度也不成问题:1-2秒是其精度的有效指标:-).

这两件事的使用很简单.请参阅:
http://msdn.microsoft.com/en-us/library/system. windows.forms.timer.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. windows.forms.form.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. windows.forms.button.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.click.aspx [ ^ ].

—SA
Handle the event Button.Click and use System.Windows.Forms.Timer. (This is one of the rare cases when this type of timer is useful, due to its simplicity for a developer, and its extremely poor accuracy is not a problem: 1-2 sec is a valid specification for its accuracy :-).)

Using of both things is straightforward. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.button.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.click.aspx[^].

—SA


这篇关于怎样产生[产生什么? -SA]上的按钮单击弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆