|
-
Oct 17th, 2010, 12:02 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Sorting Win32_USBHub Results
The following code retrieves all USB hubs on a PC and adds them to a treeview:
Code:
Dim USBHubsearcher As New ManagementObjectSearcher("SELECT * FROM Win32_USBHub")
For Each queryObj As ManagementObject In USBHubsearcher.Get()
SystemTree.Nodes(0).Nodes("USBHUB").Nodes.Add(queryObj("Description"), queryObj("Description"), 4, 4)
Next
What I want to do is to sort the results by "Description" so that they are listed in alphabetical order. ORDER BY does not work as it is not part of WQL.
Any help on this would be appreciated.
Computerman
It was much easier in VB6, but I am now liking Vb.Net alot more. 
-
Oct 17th, 2010, 12:05 PM
#2
New Member
Re: Sorting Win32_USBHub Results
I've never used treeview before, but it seems to have a Treeview.Sort() method. Did you try that?
-
Oct 17th, 2010, 12:11 PM
#3
Thread Starter
Hyperactive Member
Re: Sorting Win32_USBHub Results
OOPs. Forgot about treeview.sort.
Computerman
It was much easier in VB6, but I am now liking Vb.Net alot more. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|