title: Sorting ListBox Items
body: <p>So I have two ListBoxes. Listbox1 gathers files from a directory and I have an add button to add selected files from Listbox1 over to Listbox2.</p>
  
  <p>Is there a way to manually sort these items? Maybe with an up down buttons?</p>
  
  <p>The reason I'd like to sort/reorder is I'll have a process that will run those selected files and each file will have to produce another file unique to the filename.</p>
  
  <p>A quick example would be process FILE1.txt and produce FILE1.pdf, etc.</p>
  
  <p>Is there an easier way to accomplish the sort/reorder?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here is currently how I'm populating my <code>listbox1</code>, before adding anything to <code>listbox2</code>, which is the ListBox I'd like to have sorted so way or another.</p>
  
  <pre><code>Dim directoryInfo As _
      New System.IO.DirectoryInfo(FolderBrowserDialog1.SelectedPath)
  Dim fileInfos() As System.IO.FileInfo
  
  fileInfos = directoryInfo.GetFiles()
  For Each fileInfo As System.IO.FileInfo In fileInfos
      ListBox1.DataSource = _list
      _list.Add(fileInfo.Name)
      _list.Sort()
  Next
  
  'Refresh Listbox1
  ListBox1.DataSource = Nothing
  ListBox1.DataSource = _list
  </code></pre>