Imports System.Runtime.InteropServices Imports System.Text Public Partial Class Form1 Private WithEvents ComboBox1 As ComboBox Private WithEvents ListBox1 As ListBox Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Controls.Clear() Padding = New Padding(3) ListBox1 = New ListBox() ListBox1.Dock = DockStyle.Fill ListBox1.Margin = New Padding(4) ListBox1.IntegralHeight = False ListBox1.TabIndex = 1 Controls.Add(ListBox1) ComboBox1 = New ComboBox() ComboBox1.Dock = DockStyle.Top ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList ComboBox1.TabIndex = 0 Controls.Add(ComboBox1) ComboBox1.DataSource = My.Computer.FileSystem.GetFiles(Environment.SystemDirectory, FileIO.SearchOption.SearchTopLevelOnly, "*.cpl").ToArray() ComboBox1.SelectedIndex = -1 End Sub Private Function LoadResString(hInstance As IntPtr, uID As Integer) As String Dim buf As New StringBuilder(4096) Dim size As Integer = LoadString(hInstance, uID, buf, buf.Capacity) Dim dwSize As Integer = Math.Min(size, buf.Length) If dwSize > 0 Then Return buf.ToString(0, dwSize) Else Return "" End If End Function End Class