首页 > 其他 > 详细

ShowModal 和 Show 的区别

时间:2014-12-17 18:27:46      阅读:228      评论:0      收藏:0      [点我收藏+]

Show:

Use Show to set the form Visible property to true and to bring the form to the front of other forms on the screen.

ShowModal:
Use ShowModal to show a form as a modal form.  A modal form is one where the application can continue to run until the form is closed. Thus, ShowModal does not return until the form closes. When the form closes, it returns the value of the ModalResult property.

翻译成中文大概意思是:
Show仅仅是让一个窗口显示出来,比如在Form1中让Form2->Show(),那么在Form2显示之后你还可以继续点击Form1的东西。
而ShowModal是把窗口当成模式窗口显示,意味着程序只能在这个窗口关闭以后才继续执行下面的语句,比如在Form1中让Form2->ShowModal();那么在Form2关闭之前,Form1是不可用的。

ShowModal 和 Show 的区别

原文:http://blog.csdn.net/gateway6143/article/details/41984259

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!