Click here to Skip to main content
14,699,428 members
Home » Discussions » Visual Basic
   

Visual Basic

 
AnswerRe: Closing the current form Pin
The ANZAC1-May-07 19:37
MemberThe ANZAC1-May-07 19:37 
AnswerRe: Closing the current form Pin
Christian Graus1-May-07 19:55
mveChristian Graus1-May-07 19:55 
AnswerRe: Closing the current form Pin
Zaegra1-May-07 21:42
MemberZaegra1-May-07 21:42 
AnswerRe: Closing the current form Pin
Rupesh Kumar Swami1-May-07 22:28
MemberRupesh Kumar Swami1-May-07 22:28 
QuestionNeed help building a TreeView Pin
ljohns1-May-07 17:45
Memberljohns1-May-07 17:45 
AnswerRe: Need help building a TreeView Pin
ljohns1-May-07 17:47
Memberljohns1-May-07 17:47 
GeneralRe: Need help building a TreeView Pin
ChandraRam2-May-07 0:06
MemberChandraRam2-May-07 0:06 
GeneralRe: Need help building a TreeView Pin
ljohns3-May-07 5:01
Memberljohns3-May-07 5:01 
Here is my code snipet.
Private Sub mnuTableTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuTableTest.Click
'********************************************************************
' Start - mnuTableTest_Click
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: mnuTableTest_Click")

Dim xlist As String

'TODO remove hard coded file names
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(sMyFileRoot + myFileName)
Try
xlist = sr.ReadToEnd()
'remove specials
xlist = xlist.Replace(Chr(10), "")
RTrim(LTrim(xlist))
iAdvancementCounter = 0
currentendingpoint = xlist.Length
currentstartingpoint = 0
ProcessBracket(xlist)
rootnode = 0
Finally
sr.Close()
End Try


Debug.WriteLine("end: mnuTableTest_Click")
Debug.WriteLine("**********************")
'********************************************************************
' end - mnuTableTest_Click
'********************************************************************

End Sub

Public Sub ProcessBracket(ByVal mystuff As String)
'********************************************************************
' Start - ProcessBracket
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: ProcessBracket")


Dim i As Integer
Dim xi As Integer
Dim ix As String
Dim suchis As String
Dim NodeName As String
NodeName = ""
suchis = ""
ix = ""
i = 0
xi = 0
'ok.. need to find all the first brackets
'until we find it.. we build node names Smile | :)
'global vars to keep track of file position

Do While currentstartingpoint < currentendingpoint
ix = ""
ix = ix + mystuff(currentstartingpoint)
If iAdvancementCounter = 1 Then
'reset nodename
Debug.WriteLine("NODE: " + NodeName)
AddClassSub(NodeName, rootnode)
NodeName = ""
iAdvancementCounter = 0

End If
If (ix = "{") Then
Debug.WriteLine("Start Root Node: " + Str(rootnode))
rootnode = rootnode + 1
currentstartingpoint = currentstartingpoint + 2
ProcessBracket(mystuff)
End If

If (ix = "}") Then
Debug.WriteLine("End Root Node: " + Str(rootnode))
rootnode = rootnode - 1
iAdvancementCounter = 1
currentstartingpoint = currentstartingpoint + 2
Exit Do
End If
If currentstartingpoint >= currentendingpoint Then Exit Do
NodeName = NodeName + mystuff(currentstartingpoint)
currentstartingpoint = currentstartingpoint + 1
Loop


Debug.WriteLine("end: ProcessBracket")
Debug.WriteLine("**********************")
'********************************************************************
' end - ProcessBracket
'********************************************************************

End Sub


Public Sub AddClassSub(ByVal NodeName As String, ByVal NodeNumber As Integer)
'********************************************************************
' Start - AddClassSub
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: AddClassSub")

Me.tvClass.Nodes.Add(NodeName, NodeName + Str(NodeNumber))

Debug.WriteLine("end: AddClassSub")
Debug.WriteLine("**********************")
'********************************************************************
' end - ProcessBracket
'********************************************************************
End Sub
GeneralRe: Need help building a TreeView Pin
ChandraRam4-May-07 1:12
MemberChandraRam4-May-07 1:12 
QuestionHow do I pass a byte array from C++ to VB.NET? Pin
prcarp1-May-07 16:28
Memberprcarp1-May-07 16:28 
AnswerRe: How do I pass a byte array from C++ to VB.NET? Pin
Dave Kreskowiak2-May-07 4:35
mveDave Kreskowiak2-May-07 4:35 
GeneralRe: How do I pass a byte array from C++ to VB.NET? Pin
prcarp2-May-07 9:46
Memberprcarp2-May-07 9:46 
QuestionCreate Object From Type [modified] Pin
Polymorpher1-May-07 15:18
MemberPolymorpher1-May-07 15:18 
QuestionUpdating Table of Access Database Pin
keninfo1-May-07 12:56
Memberkeninfo1-May-07 12:56 
AnswerRe: Updating Table of Access Database Pin
Christian Graus1-May-07 13:56
mveChristian Graus1-May-07 13:56 
GeneralRe: Updating Table of Access Database Pin
keninfo2-May-07 0:57
Memberkeninfo2-May-07 0:57 
GeneralRe: Updating Table of Access Database Pin
Christian Graus2-May-07 1:55
mveChristian Graus2-May-07 1:55 
GeneralRe: Updating Table of Access Database Pin
keninfo2-May-07 4:33
Memberkeninfo2-May-07 4:33 
QuestionGlobalization in VB .Net usig SQL server2000 Pin
joby1001-May-07 11:42
Memberjoby1001-May-07 11:42 
QuestionSet Custom PaperSize In VB.NET [modified] Pin
AmirAlilou1-May-07 9:12
MemberAmirAlilou1-May-07 9:12 
Questionusing tab control to show datagrid Pin
detective_girl1-May-07 9:12
Memberdetective_girl1-May-07 9:12 
AnswerRe: using tab control to show datagrid Pin
Christian Graus1-May-07 11:31
mveChristian Graus1-May-07 11:31 
GeneralRe: using tab control to show datagrid Pin
detective_girl1-May-07 20:35
Memberdetective_girl1-May-07 20:35 
QuestionRe: using tab control to show datagrid Pin
detective_girl1-May-07 21:15
Memberdetective_girl1-May-07 21:15 
GeneralRe: using tab control to show datagrid Pin
Christian Graus2-May-07 0:31
mveChristian Graus2-May-07 0:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.