VB Code:
Option Explicit
Private Sub Form_Load()
Dim RegArray() As String
Dim intLoop As Integer
On Error Resume Next ' in case the array returns nothing
' Get sub keys
RegArray = EnumRegKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer")
' RegArray = EnumRegKey(HKEY_CURRENT_USER, ".bmp")
For intLoop = 0 To UBound(RegArray)
List1.AddItem RegArray(intLoop)
Next intLoop
' Get values of key
RegArray = EnumKeyValues(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run")
' RegArray = EnumKeyValues(HKEY_CURRENT_USER, ".bmp")
For intLoop = 0 To UBound(RegArray)
List2.AddItem RegArray(intLoop)
Next intLoop
End Sub