Hi, I am trying to set it up so that when the user wants to, he can add an Icon image to a ListView.
Right now nothing is happening when I try to test it, it compiles fine, but no icons show up.
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
OpenFileDialog shortcut = new OpenFileDialog();
shortcut.Title = "Add Shortcut";
shortcut.InitialDirectory = "C:\\";
ImageList image = new ImageList();
image.ImageSize = new Size(16, 16);
if (radioButton1.Checked == true)
{
shortcut.ShowDialog();
Icon icon = System.Drawing.Icon.ExtractAssociatedIcon(shortcut.FileName);
image.Images.Add(icon);
DesktopItemsLV.SmallImageList = image;
radioButton1.Checked = false;
}
else
{
return;
}
}
Any Ideas? Thanks