|
-
Nov 8th, 2013, 09:27 AM
#1
Thread Starter
Hyperactive Member
Need help choosing the right control
Hi guys, i am trying to make a program which stores selected programs by user selection, and it will later store them in a database. What control would be best suited to list these programs? The user will need to select many items. I was going to use a listbox but its really limited, as you cant use tickboxes or anything like that on it. I don't want to waste time playing with this, so what control would be best recommended to achieve this?
I also need to be able to get more items from the registry about the installed programs, such as; address to each programs .exe location, and each programs icon. But I am unsure of the best location to get them or where to start with this. Here is what I got so far...
Code:
Private Sub SrcAppsBtn_Click(sender As Object, e As EventArgs) Handles SrcAppsBtn.Click
ListBoxPrograms.Items.Clear()
Dim regkey, subkey As Microsoft.Win32.RegistryKey
Dim value As String
Dim regpath As String = "Software\Microsoft\Windows\CurrentVersion\Uninstall"
regkey = My.Computer.Registry.LocalMachine.OpenSubKey(regpath)
Dim subkeys() As String = regkey.GetSubKeyNames
Dim includes As Boolean
For Each subk As String In subkeys
subkey = regkey.OpenSubKey(subk)
value = subkey.GetValue("DisplayName", "")
If value <> "" Then
includes = True
If value.IndexOf("Hotfix") <> -1 Then includes = False
If value.IndexOf("Security Update") <> -1 Then includes = False
If value.IndexOf("Update for") <> -1 Then includes = False
If includes = True Then ListBoxPrograms.Items.Add(value)
End If
Next
End Sub
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|