Private Sub btnMaintenance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMaintenance.Click
strDestinationDrive = Nothing
FindThumbDrive()
If strDestinationDrive <> Nothing Then ' A drive letter was assigned.
Try
frmMaintenance.lstBackupFolders.Items.Clear()
' Put the folder names from the thumb drive into the listbox
' prior to showing the maintenance form.
'-----------------------------------------------------------
For Each strFolder As String In _
IO.Directory.GetDirectories(strDestinationDrive)
frmMaintenance.lstBackupFolders.Items.Add(strFolder)
Next
frmMaintenance.ShowDialog()
Catch ex As Exception
' Something went wrong so let the user know about it.
'----------------------------------------------------
MessageBox.Show("Ooooooooops, I couldn't finish. " & vbCrLf & _
"Please get in touch with us so we can help you." & vbCrLf & vbCrLf & _
"Please let us know about this message: " & vbCrLf & vbCrLf & _
ex.Message, "Ooooooooppppppppsssssss. Something Went Wrong", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End If
End Sub