Public Sub FindAndShowWindow(ByVal strFormName As String)
Dim frmManager As System.Windows.Forms.Form = FindWindow("窗口管理")
If frmManager Is Nothing Then
frmManager = New FormsManager()
Dim intTop As Integer
Dim trv As System.Windows.Forms.TreeView = frmManager.controls("TreeView1")
trv.Dock = System.Windows.Forms.DockStyle.None
trv.Anchor = System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Top
intTop = trv.Top
trv.Top = trv.Top + 28
trv.Height = trv.Height - 30
'trv.Bottom=3
Dim txtFilter As New System.Windows.Forms.TextBox
txtFilter.Name = "txtFormFilter"
txtFilter.Top = intTop
txtFilter.Left = trv.Left
txtFilter.Width = 200
frmManager.Controls.Add(txtFilter)
Dim btnFindNext As New System.Windows.Forms.Button
btnFindNext.Name = "btnFindNext"
btnFindNext.Text = "下一个"
btnFindNext.Top = intTop
btnFindNext.Left = txtFilter.Left + txtFilter.Width + 5
AddHandler btnFindNext.Click, AddressOf btnNextForm_Click
frmManager.Controls.Add(btnFindNext)
If strFormName IsNot Nothing AndAlso strFormName.Length > 0 Then
GetNode(strFormName, trv.Nodes)
End If
frmManager.Owner = BaseMainForm
frmManager.ShowDialog()
Else
Dim trv As System.Windows.Forms.TreeView = frmManager.controls("TreeView1")
If strFormName IsNot Nothing AndAlso strFormName.Length > 0 Then
GetNode(strFormName, trv.Nodes)
End If
frmManager.BringToFront
End If
End Sub
2024版本中 这个语法是什么样的呢
没有这种东西。新版窗口管理已经提供了查询功能,不再需要这种东西,全部去掉即可