MDI 表单问题 VB:NET [英] MDI Form issue VB:NET
问题描述
今天我在面板控件和 MDI 子窗体方面遇到了一些问题,我的问题是我无法将面板控件设置到子窗体的后面.想解决这个问题,我的脑子里一片空白.
Hy today i have some problems with the Panel Control and MDI Child Forms, My problem is that I can not set the panel control to back of child forms. My head is spinning trying to solve this problem.
推荐答案
看起来您已将 Panel 添加到您的 ParentForm 中,这样做将保持领先.您需要将其分配给 ChildForm.您的其他选择之一是创建一个可停靠面板并将其停靠在您父母的一侧.
It looks like you added your Panel to your ParentForm, doing so will keep on top. You need to Assign it to a ChildForm. One of your other options would be to create a dockable panel and dock it on the side of your parent.
看看这些文章
- http://bytes.com/topic/visual-basic-net/answers/382474-how-do-you-bring-mdi-child-windows-front-if-mdi-父母有控制
- http://social.msdn.microsoft.com/Forums/en-AU/winforms/thread/a9682277-d612-41e8-b5c0-44434b0bcb22
<小时>
根据您的评论,您可以使用设置为 100 毫秒的计时器来执行此类操作
Based on your comment you can do something like this with a Timer set for 100ms
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Panel1.Visible = CheckForMDIChildren()
End Sub
Private Function CheckForMDIChildren() As Boolean
If Me.MdiChildren.Count > 0 Then
For Each frm As Form In Me.MdiChildren
If frm.Visible Then Return False
Next
End If
Return True
End Function
这篇关于MDI 表单问题 VB:NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!