PDA

View Full Version : راهنمایی برای تبدیل کد vb6 من به vb.net



mdshmdsh
شنبه 11 بهمن 1393, 13:18 عصر
دوستان کسی می تونه 3 قطعه کد زیر را به vb.net تبدیل کنه؟

Node.Index + 1.Nodes.Add("", "Node")


curIndex = Form1.Tree.Nodes(index).Child.index 'getting its childs index


For f = 1 To Form1.Tree.Nodes(index).Children ' for all children
PrintNode((curIndex)) 'call the above function
If f<>Form1.Tree.Nodes(index).Children Then curIndex = Form1.Tree.Nodes(curIndex)'Next. : index() ' if we are not at the last child then goto next child
Next

Hossis
یک شنبه 12 بهمن 1393, 17:40 عصر
این کد رو به طور دستی تغییر دادم ولی باید بدونید که ساختار درخت واره TV در وی بی دات نت با وی بی 6 فرق می کنه لذا شاید جواب نده


Node.nextnode.Nodes.Add("", "Node")


curIndex = Form1.Tree.Nodes(index).firstnode.index 'getting its childs index


For f = 1 To Form1.Tree.Nodes(index).nodes.count ' for all children
PrintNode((curIndex)) 'call the above function
If f<>Form1.Tree.Nodes(index).nodes.count Then curIndex = Form1.Tree.Nodes(curIndex)'Next. : index() ' if we are not at the last child then goto next child
Next