For i1 As Integer = 2 To 3 \'希望只循环2-5页面中的部分
For Each bt As object In tab.TabPages(i1).Children
If Typeof bt Is WinForm.ListView Then \'判断控件是否是目录树
Dim lvw As WinForm.ListView = Forms("通用目录树").Controls(bt.name)
If e.KeyCode = Keys.Up Then
lvw.Position = lvw.Position - 1
e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then
lvw.Position = lvw.Position + 1
e.Cancel = True
ElseIf e.KeyCode = Keys.Enter Then
If lvw.Current IsNot Nothing Then
For i=0 To Parts1.Length-1
Tables(ary(0)).Current(Parts1(i)) = lvw.Current(Parts(i))
Next
End If
End If
End If
Next
Next