如何在TreeView控件中加入条目?(急) Private Sub Form_Load()Dim nodex As NodeSet nodex = TreeView1.Nodes.Add() 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 其实,msdn里都有,你看看就知道了 Dim nodex As NodeSet nodex = TreeView1.Nodes.Add()nodex.key=nodex.text= With TreeView1 .Nodes.Clear .Nodes.Add , tvwFirst, "Boot", "树根" '树下面的第一项 .Nodes.Add "Boot", tvwChild, "DFIRST", " 树下面的第一项" .Nodes.Add "DFIRST", tvwChild, "SubKey", "第一个子项" '树下面的第二项 .Nodes.Add "Boot", tvwChild, "DSend", " 树下面的第二项" .Nodes.Add "DSend", tvwChild, "SubKey2", "第二个子项" .Nodes.Add "DSend", tvwChild, "SubKey3", "第三个子项" End With The codes up are very rightjust copy them to your project and run with the button F5you will get the result. 新手新问题 关于VB访问远程SQL数据库安全问题 很简单的, For Each LblFld In LblFlds 这句话是什么意思? 窗口中jpg图片显示不出来!!在线送分!!! msflexgrid,mshflexgrid,datagrid这三个控件里,哪几个有分页的功能呢? 报表问题!在线等待! 关于怎么调用函数 简单问题,才学 vb两个小时的菜鸟请教大家,就当是散分吧! 一个整数,如何拆分高低字节? 如何用vba在word中读取任意行上的字符串·······(就这点分了) XP 样式的控件 100分-怎样用VB访问串口?明天或后天结贴,一定给分!!
Set nodex = TreeView1.Nodes.Add()
nodex.key=
nodex.text=
.Nodes.Clear
.Nodes.Add , tvwFirst, "Boot", "树根"
'树下面的第一项
.Nodes.Add "Boot", tvwChild, "DFIRST", " 树下面的第一项"
.Nodes.Add "DFIRST", tvwChild, "SubKey", "第一个子项"
'树下面的第二项
.Nodes.Add "Boot", tvwChild, "DSend", " 树下面的第二项"
.Nodes.Add "DSend", tvwChild, "SubKey2", "第二个子项"
.Nodes.Add "DSend", tvwChild, "SubKey3", "第三个子项"
End With