Advertisement

07.13.2008 at 06:22PM PDT, ID: 23561510
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

VB.NET TreeView Help

Asked by YourReference in Microsoft Visual Basic.Net, .NET Framework 2.x

Tags:

I am trying to build a simple application to enumerate Citrix Published Applications.  I understand how to loop through Application Folders and another loop for Published Applications.  The end state of what I am trying to achieve from this question is the below sample output.

Applicaitons (Folder)
       App1 (Application)
       App2 (Application)
       OpenOffice (Folder)
               App1 (Application)
               App2 (Application)
       MSOffice (Folder)
               App1 (Application)

Sample Code to enumerate Application Folders and Published Applications.  The published applications display with the full path to the folder, but I am not sure how to work it to populate a treeview so I figured the best approach was to do one loop of app folders, the another one of apps and place them in the treenode.  I will provide samples of both.

Question: Help me using VB.NET (2.0 framework) populate a TreeView with something simular to aboveStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
' SAMPLE ENUMERATING APP FOLDER
 
        Dim myFarm As New MetaFrameCOM.MetaFrameFarm
        Dim AppFolder As New MetaFrameCOM.MetaFrameFolder
        Dim RootAppFolder As MetaFrameCOM.MetaFrameFolder
 
        myFarm.Initialize(MetaFrameCOM.MetaFrameObjectType.MetaFrameWinFarmObject)
        RootAppFolder = myFarm.GetRootFolder(MetaFrameCOM.MetaFrameObjectType.MetaFrameAppFolder)
 
        For Each AppFolder In RootAppFolder.SubFolders
            TreeView1.Nodes.Add(AppFolder.FolderName.ToString)
 
            'Sample output Applications
            'Sample output OpenOffice
            'Sample output MSOffice
            ' I would need to do another .SubFolders on each folder and so on :( 
            ' Do I have to do this or can I use the below code to put an application in a folder in a tree view based on the output
        Next
 
' SAMPLE ENUMERATING PUBLISHED APPLICATIONS
' Yes, I understand variables are declaried twice.  This is due to only one "Attach Code Snippet" checkbox
 
        Dim myFarm As New MetaFrameCOM.MetaFrameFarm
        Dim MyApp As New MetaFrameCOM.MetaFrameApplication
 
        myFarm.Initialize(MetaFrameCOM.MetaFrameObjectType.MetaFrameWinFarmObject)
        For Each myApp In myFarm.Applications
 
             TreeView1.Nodes.Add(myApp.DistinguishedName)
 
             'Sample output Applications\App1
             'Sample output Applications\App2
             'Sample output Applications\OpenOffice\App1
 
        Next
[+][-]07.13.2008 at 07:14PM PDT, ID: 21995213

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 08:44PM PDT, ID: 21995520

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:42PM PDT, ID: 22031080

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET Framework 2.x
Tags: Visual Basic.NET, VB.NET
Sign Up Now!
Solution Provided By: YourReference
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628