Click here to Skip to main content
15,896,063 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Closing the current form Pin
The ANZAC1-May-07 18:37
The ANZAC1-May-07 18:37 
AnswerRe: Closing the current form Pin
Christian Graus1-May-07 18:55
protectorChristian Graus1-May-07 18:55 
AnswerRe: Closing the current form Pin
Zaegra1-May-07 20:42
Zaegra1-May-07 20:42 
AnswerRe: Closing the current form Pin
Rupesh Kumar Swami1-May-07 21:28
Rupesh Kumar Swami1-May-07 21:28 
QuestionNeed help building a TreeView Pin
ljohns1-May-07 16:45
ljohns1-May-07 16:45 
AnswerRe: Need help building a TreeView Pin
ljohns1-May-07 16:47
ljohns1-May-07 16:47 
GeneralRe: Need help building a TreeView Pin
ChandraRam1-May-07 23:06
ChandraRam1-May-07 23:06 
GeneralRe: Need help building a TreeView Pin
ljohns3-May-07 4:01
ljohns3-May-07 4: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 0:12
ChandraRam4-May-07 0:12 
QuestionHow do I pass a byte array from C++ to VB.NET? Pin
prcarp1-May-07 15:28
prcarp1-May-07 15:28 
AnswerRe: How do I pass a byte array from C++ to VB.NET? Pin
Dave Kreskowiak2-May-07 3:35
mveDave Kreskowiak2-May-07 3:35 
GeneralRe: How do I pass a byte array from C++ to VB.NET? Pin
prcarp2-May-07 8:46
prcarp2-May-07 8:46 
QuestionCreate Object From Type [modified] Pin
Polymorpher1-May-07 14:18
Polymorpher1-May-07 14:18 
QuestionUpdating Table of Access Database Pin
keninfo1-May-07 11:56
keninfo1-May-07 11:56 
AnswerRe: Updating Table of Access Database Pin
Christian Graus1-May-07 12:56
protectorChristian Graus1-May-07 12:56 
GeneralRe: Updating Table of Access Database Pin
keninfo1-May-07 23:57
keninfo1-May-07 23:57 
GeneralRe: Updating Table of Access Database Pin
Christian Graus2-May-07 0:55
protectorChristian Graus2-May-07 0:55 
GeneralRe: Updating Table of Access Database Pin
keninfo2-May-07 3:33
keninfo2-May-07 3:33 
QuestionGlobalization in VB .Net usig SQL server2000 Pin
joby1001-May-07 10:42
joby1001-May-07 10:42 
QuestionSet Custom PaperSize In VB.NET [modified] Pin
AmirAlilou1-May-07 8:12
AmirAlilou1-May-07 8:12 
Questionusing tab control to show datagrid Pin
detective_girl1-May-07 8:12
detective_girl1-May-07 8:12 
AnswerRe: using tab control to show datagrid Pin
Christian Graus1-May-07 10:31
protectorChristian Graus1-May-07 10:31 
GeneralRe: using tab control to show datagrid Pin
detective_girl1-May-07 19:35
detective_girl1-May-07 19:35 
QuestionRe: using tab control to show datagrid Pin
detective_girl1-May-07 20:15
detective_girl1-May-07 20:15 
GeneralRe: using tab control to show datagrid Pin
Christian Graus1-May-07 23:31
protectorChristian Graus1-May-07 23: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.