For Each nodEach In TreeView1.Nodes
Select Case Left(nodEach.Key, 1)
Case "p", "P"
MsgBox nodEach.Text & " 存到图片库", vbInformation
Case "t", "T"
MsgBox nodEach.Text & " 存到文本库", vbInformation
Case Else
End Select
Next
End Sub
Private Sub Form_Load()
Command1.Caption = "保存"
With Me.TreeView1
.Nodes.Add , , "P1", "图片1"
.Nodes.Add , , "T1", "文本1"