在论坛找到一个案例,其中代码帮助上没有介绍。求大神详解
项目事件
AfterOpenProject
BaseMainform.IsMdiContainer = True
BaseMainForm.Controls("MainPages").Visible = False
计划管理
表事件
窗口表事件
窗口与控件事件
系统导航_Click
Forms(e.Sender.Name).Open
Forms(e.Sender.Name).BaseForm.MdiParent = BaseMainform
自定义函数
全局代码
菜单事件
_Click
If e.Sender.Name Like "??管理" Then
Forms(e.Sender.Name).Open
Forms(e.Sender.Name).BaseForm.MdiParent = BaseMainform
End If
If e.Sender.Name Like "Window_*" Then
Forms(e.Sender.Name.Replace("Window_","")).BaseForm.Select
End If
Select Case e.Sender.Name
Case "层叠"
BaseMainform.LayoutMdi(Windows.Forms.MdiLayout.Cascade)
Case "垂直平铺"
BaseMainform.LayoutMdi(Windows.Forms.MdiLayout.TileVertical)
Case "水平平铺"
BaseMainform.LayoutMdi(Windows.Forms.MdiLayout.TileHorizontal)
Case "全部关闭"
For Each ChildForm As Windows.Forms.Form In BaseMainform.MdiChildren
ChildForm.Close()
Next
Case Else
Return
End Select
_DropDown
If e.Sender.Name = "窗口" Then
For i As Integer = e.Sender.Items.Count - 1 To 5 Step -1
e.Sender.Items.RemoveAt(i)
Next
For Each Frm As WinForm.Form In Forms
If Frm.Opened And Frm.FormStyle = 2 Then
Dim BtnItem As New RibbonMenu.ToggleButton("Window_" & Frm.Name)
BtnItem.Text = Frm.Name
If Frm.BaseForm.Handle = BaseMainform.ActiveMdiChild.Handle Then BtnItem.Pressed = True
e.Sender.Items.Add(BtnItem)
End If
Next
End If
求BaseMainform的属性 ,方法
[此贴子已经被作者于2013-9-3 8:41:30编辑过]