什么Application.Run()呢? [英] What Application.Run( ) does?

查看:204
本文介绍了什么Application.Run()呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想,是的WinForms类作为其他类。但是从形式的项目让我迷惑。为什么新形式开始Application.Run而发生的这里面有什么样的机制?

I was thinking that WinForms are classes as any other classes. But starting form project get me confuse. Why new Form start with Application.Run and what kind of mechanism happen inside of it ?

推荐答案

,因为它说的<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.application.run.aspx">documentation,它开始运行当前线程上的标准应用程序消息循环。该消息循环处理点击,键盘presses,涂料的要求,再加上许多其他的事情。

As it says in the documentation, it begins running a standard application message loop on the current thread. The message loop handles clicks, keypresses, paint requests, plus many other things.

当一个表单作为参数这也使得这种形式可见所谓

When called with a form as an argument it also makes that form visible.

这篇关于什么Application.Run()呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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