Results 1 to 11 of 11

Thread: All Nodes on TreeView Control Not Showing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2020
    Location
    Florida
    Posts
    93

    All Nodes on TreeView Control Not Showing

    I am currently developing a VB 6.0 Application on an old PC running Windows XP. In it's simplest terms, the Application displays a Hierarchical Family Tree structure in a TreeView Control. The application consists of seven Forms, a Standard Code Module, a TreeView Control which is the main focus of the App, Image List Controls, and some Standard Controls. The App runs perfectly fine in the XP Environment. Using the Package & Deployment Wizard, I created a basic Package to test on Windows 10 PCs. The installation process in Windows 10 is seamless and the Program is executed from within a pre-defined Program Group. The Initial Screen displays some Version Information, credits, etc. The next screen is an introduction to the App and consists of only a couple Images and informational text. The next screen is the pivotal one with a TreeView Control being dynamically populated with static data. This all works well in XP, but in this screen with the TreeView in Windows 10 no Nodes of the TreeView are displayed, no Errors, just a blank TreeView. I tried using regsvr32.exe to manually Register comctl32.ocx to see if this was the problem, but it would not Register. A lot of work went into this Application and the family is looking forward to seeing it, so I sincerely hope one of you guys can point me in the right direction. I thank anyone in advance for offering assistance.

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: All Nodes on TreeView Control Not Showing

    The comctl32.ocx TreeView control works fine on Windows 10.

    Without a small example you can share which reproduces the problem we may not be much help.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2020
    Location
    Florida
    Posts
    93

    Re: All Nodes on TreeView Control Not Showing

    Thank you for your swift Reply. The Image below is what i am seeing, a TreeView with no Nodes being displayed. If it is no comctl32.ocx, do you have any idea as what the problem could be?
    Name:  TreeView.jpg
Views: 2499
Size:  17.2 KB

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: All Nodes on TreeView Control Not Showing

    Well, appears nodes are being created based on the scrollbar.

    1. Are you using On Error Resume Next in the routine that populates the nodes?
    2. Are you using v5 or v6 of the controls (as shown in the toolbox)?
    3. Can you post the portion of code that is populating the nodes?

    Oh, where is the location of the static data, what folder? App.Path? And what medium (file, database, other)?
    Last edited by LaVolpe; Jul 3rd, 2020 at 01:03 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: All Nodes on TreeView Control Not Showing

    He said comctl32 so of course it is v. 5, but the v. 6 controls also work as well on Windows 10 as anywhere. I just tested both. Again.

    For all we know there is a High DPI issue at play here.

    Good catch on the scrollbar.

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: All Nodes on TreeView Control Not Showing

    Quote Originally Posted by dilettante View Post
    He said comctl32 so of course it is v. 5, but the v. 6 controls also work as well on Windows 10 as anywhere. I just tested both. Again.
    I didn't want to make that assumption. Someone can say comctl32 but using v6 instead. Or having both in the same project. Just wanted a bit of clarification.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: All Nodes on TreeView Control Not Showing

    Since we have no details I presume there is no manifest. So there is also the fickle finger of appcompat in the pie here.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jun 2020
    Location
    Florida
    Posts
    93

    Re: All Nodes on TreeView Control Not Showing

    Thanks for your replies. Here is a partial segment of the Code that loads the TreeView in the Load() Event of the Form. Again, works great in XP. I also download the newer Versions of the Common Controls (2005 vs 1998) and Registered them via regsvr32, OK. The Package installs in Windows 10 and the TreeView is visible on the Form, but no Nodes are. Using VB 6.0. I have also included an Image of what a partial view of the TreeView looks like in XP.
    Code:
    Private Sub Form_Load()
    On Error GoTo Err_Form1_Load
    Dim nodX As Node, Msg As String
    
    With TreeView1
      .Top = 120
      .Left = 120
      .ImageList = ImageList1    '32 X 32 Icons
    
        '1-Relative, tvwChild-Relationship, "g"-Key, "George"-Text
        Set nodX = .Nodes.Add(, , , "Camillo (d) and Concetta Falo Dezii (d)", 1)
        
        Set nodX = .Nodes.Add(1, tvwChild, "A", "Arsilio (Al) (d) & Josephine (Josie) Cocuzza (d)", 2, 2)
          Set nodX = .Nodes.Add("A", tvwChild, "VB", "Vivian Dezii Boyd", 3, 4)
            Set nodX = .Nodes.Add("VB", tvwChild, , "YaDa-YaDa", 3, 4)   'Test Grand-Grand Child
          
        Set nodX = .Nodes.Add(1, tvwChild, "C", "Anna Cini Aruffo & John Ruffo (d)", 2, 2)
          Set nodX = .Nodes.Add("C", tvwChild, , "Dolores Cini Lockwood (d)", 3, 4)
          Set nodX = .Nodes.Add("C", tvwChild, , "Bobby Cini", 3, 4)
          Set nodX = .Nodes.Add("C", tvwChild, , "John Aruffo", 3, 4)
          
        Set nodX = .Nodes.Add(1, tvwChild, "l", "Malvina (Lena) Muscella (d)", 2, 2)
          Set nodX = .Nodes.Add("l", tvwChild, , "Theresa", 3, 4)
          Set nodX = .Nodes.Add("l", tvwChild, , "Philip", 3, 4)
          Set nodX = .Nodes.Add("l", tvwChild, , "William", 3, 4)
          Set nodX = .Nodes.Add("l", tvwChild, , "Unknown Child Name", 3, 4)
          
        Set nodX = .Nodes.Add(1, tvwChild, "L", "Leopoldo (Paul) (d) & Anna Boccuti (d)", 2, 2)
          Set nodX = .Nodes.Add("L", tvwChild, , "Paul", 3, 4)
          Set nodX = .Nodes.Add("L", tvwChild, , "Concetta (Connie) Dezii Spinnato", 3, 4)
        
        Set nodX = .Nodes.Add(1, tvwChild, , "Amelia (d)", 2, 2)
        
        Set nodX = .Nodes.Add(1, tvwChild, "V", "Vittorio (Victor) (d) and Domenica (Minnie) (d) Falgiatore", 2, 2)
          Set nodX = .Nodes.Add("V", tvwChild, , "Dolores Dezii Kreal", 3, 4)
          Set nodX = .Nodes.Add("V", tvwChild, , "Susan Dezii Sansone", 3, 4)
        
        Set nodX = .Nodes.Add(1, tvwChild, "Cap", "Amelia (Millie) (d) and Joseph Capuano (d)", 2, 2)
          Set nodX = .Nodes.Add("Cap", tvwChild, , "Alfonso (Al)", 3, 4)
          Set nodX = .Nodes.Add("Cap", tvwChild, , "Joseph", 3, 4)
          Set nodX = .Nodes.Add("Cap", tvwChild, , "Dennis", 3, 4)
          Set nodX = .Nodes.Add("Cap", tvwChild, , "Renee Capuano Candelori", 3, 4)
          
         .Nodes(TreeView1.Nodes.Count).EnsureVisible
         .Nodes(1).Selected = True
    
         For Each nodX In TreeView1.Nodes
           nodX.Sorted = True
         Next
    End With
    Exit_Form1_Load:
      Exit Sub
    
    Err_Form1_Load:
      Msg = "Error Number: " & Err.Number & vbCrLf
      Msg = Msg & "Error Description: " & Err.Description
        MsgBox Msg, vbCritical, "ERROR in Form1 Load Procedure"
          Resume Exit_Form1_Load
    End Sub
    Name:  Tree.jpg
Views: 2500
Size:  36.2 KB
    Last edited by ADezii; Jul 3rd, 2020 at 03:51 PM.

  9. #9
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: All Nodes on TreeView Control Not Showing

    Nothing jumps out at me. Do you have service pack 6 installed?

    Didn't answer one of my questions. You don't have both versions of the treeview in your project do you? Just the one which states v5 vs. v6? or the other way around?

    May also want to look at the properties of the app's exe, on Win10, and play with some of the compatibility options?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  10. #10
    Hyperactive Member gilman's Avatar
    Join Date
    Jan 2017
    Location
    Bilbao
    Posts
    273

    Re: All Nodes on TreeView Control Not Showing

    If you are using the v5 of the common controls, try with the v6

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Jun 2020
    Location
    Florida
    Posts
    93

    Re: All Nodes on TreeView Control Not Showing

    First and foremost, I would like to thank everyone who assisted me on this Thread, especially LaVolpe. After many hours, I finally was able to get the Code to work on Windows 10. The problem was that two Versions of the Microsoft Windows Common Controls (ie. TreeView) were checked, namely: 5.0 (SP2) and 6.0 (SP6). Although XP graciously accepted this, Windows 10 did not. I also had to Upgrade the Common Controls from the 1998 Version to 2005 and Re-register them which had it's own set of problems. In any event, all appears to be back on track and thanks again for your assistance.
    Didn't answer one of my questions. You don't have both versions of the treeview in your project do you? Just the one which states v5 vs. v6? or the other way around?
    This was the clincher!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width