这个代码是实现用PictureBox做容器来显示窗体的,具体的你的TreeView的应用, 你得自己去添加实现了Option Explicit'api Private Declare Function SetParent Lib "user32" (ByVal hWandchild As Long, ByVal hWndnewParent As Long) As Long Private Sub Form_Load() Form2.Show Form2.Move 0, 0, 5000, 3500 SetParent Form2.hWnd, Picture1.hWnd End Sub
可以先放一个picturebox,再把treeview放在这个容器里。
先放一个PictureBox控件,然后在PictureBox控件上放一个TreeView控件
在TreeView控件的NodeClick事件中进行处理.
你得自己去添加实现了Option Explicit'api
Private Declare Function SetParent Lib "user32" (ByVal hWandchild As Long, ByVal hWndnewParent As Long) As Long
Private Sub Form_Load()
Form2.Show
Form2.Move 0, 0, 5000, 3500
SetParent Form2.hWnd, Picture1.hWnd
End Sub
然后在PICTUREBOX控件中放置TREEVIEW控件!