在C#中,activeMdichild是什么?

在C#中,activeMdichild是什么?


largeQ
浏览 1307回答 1
1回答

慕尼黑的夜晚无繁华

.NET Framework 类库Form.ActiveMdiChild 属性获取当前活动的多文档界面 (MDI) 子窗口。命名空间:System.Windows.Forms程序集:System.Windows.Forms(在 system.windows.forms.dll 中)语法:public Form ActiveMdiChild { get; }示例:public void ClearAllChildFormText(){// Obtain a reference to the currently active MDI child form.Form tempChild = this.ActiveMdiChild;// Loop through all controls on the child form.for (int i = 0; i < tempChild.Controls.Count; i++){// Determine if the current control on the child form is a TextBox.if (tempChild.Controls[i] is TextBox){// Clear the contents of the control since it is a TextBox.tempChild.Controls[i].Text = "";}}}
打开App,查看更多内容
随时随地看视频慕课网APP