问题描述
谁能告诉我如何区分它们?
Can any body please tell me how to distinguish among them?
我很难理解顶级子窗口与对话框/非对话框窗口的区别因素是什么?顶层窗口可以是对话/非对话窗口吗?子窗口可以是对话/非对话窗口吗?
I have difficulty in understanding what are the distinguishing factors for top level child windows vs dialog/non-dialog window?Can the top level window be dialog/non-dialog window?Can the child window be dialog/non-dialog window?
推荐答案
顶级表单归桌面所有,而子表单属于另一个表单;这意味着关闭或最小化拥有的表单也会影响子表单.
Top-level forms are owned by the desktop, whereas child forms belong to another form; this means that closing or minimising the owning form will also affect the child form.
模态表单/对话框会阻塞调用线程直到表单关闭,而无模式表单允许您在显示时与应用程序中的其他表单进行交互.任何表单都可以是模态/非模态的,无论它是顶级表单还是子表单——但是模态对话框的默认行为是由导致它们显示的表单拥有.
Modal forms/dialogs block the calling thread until the form is closed, whereas modeless forms allow you to interact with other forms in the application while shown. Any form can be modal/modeless, regardless of whether it is a top-level or child form - however the default behaviour for modal dialogs is to be owned by the form that caused them to be shown.
这篇关于顶层窗口、子窗口、对话框(模态)窗口和非对话框(非模态)窗口有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!