Ok, so this is teh code I have
Which I had added strings to each section. I got the error after many reboots. And you can see the error I get. Again, I cannot get it in the .NET studio. I am also having issue son that as well as I cannot test it in the studio as it conflicts with the application running on my current desktop. But thats another thread, lolCode:Private Sub tvFolders_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvFolders.AfterSelect curNode = e.Node Dim root1 As Boolean = False Dim ErrorStr As String = Nothing Try ErrorStr = "start" If curNode.Text = "Jackson County" Then root1 = True ErrorStr = ErrorStr & Chr(13) & "Root=true" ElseIf curNode.Text = "Personal" Then MnuFDelete.Enabled = False ErrorStr = ErrorStr & Chr(13) & "Personal=true" lvFiles.Items.Clear() Exit Sub Else curNode.Tag = appPath & curNode.Text & "\" End If If curNode.Tag.ToString.Length < 1 Then MsgBox("appPath empty") End If If curNode.Level = 0 Then curNode.ImageIndex = 2 curNode.SelectedImageIndex = 2 ErrorStr = ErrorStr & Chr(13) & "level=0" Else curNode.ImageIndex = 0 curNode.SelectedImageIndex = 1 ErrorStr = ErrorStr & Chr(13) & "level > 0" End If If Not curNode.Text = "Personal" Then ' Find all the files in the currentlty selected directory ErrorStr = ErrorStr & Chr(13) & "Get list folders= " & curNode.Tag objFS.ListFoldersFiles(curNode.Tag, lvFiles, ImageList2) End If If My.Settings.Favorites.Contains(curNode.Text) Then MnuFDelete.Enabled = True ErrorStr = ErrorStr & Chr(13) & "node set in favorites" If lvFiles.Items.Count < 1 Then lvFiles.Items.Clear() End If Else MnuFDelete.Enabled = False ErrorStr = ErrorStr & Chr(13) & "node not in favorites" End If lvFiles.Sort() lvFiles.Columns(0).AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent) lvFiles.Columns(2).AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent) Catch ex As Exception Debug.WriteLine(ex.Message) MsgBox("Select Failed" & Chr(13) & Chr(13) & ex.Message & Chr(13) & ErrorStr, vbOKOnly, "Failed To Select") End Try End Sub




Reply With Quote