I have added all startup programs to a listbox. How can I open the file when I select the item and click on a button?
Listbox code:
private void readfiles()
{
string startfolder = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
var files = Directory.GetFiles(startfolder).Where(name => !name.EndsWith(".ini"));
foreach (string file in files)
{
startupinfo.Items.Add(System.IO.Path.GetFileName(file));
}
}