Ok I am stuck. What I want is to have the file in the listview
box with an icon. I can not seem to get the icon to show.
what am I doing wrong?
box with an icon. I can not seem to get the icon to show.
what am I doing wrong?
Code:
//Set to the front tab for now
tabControl1.SelectedTab = tabPage2;
//Focus on tab page 1 for now
//this.tabControl1.TabPages[1].Select();
string[] CipherFiles = System.IO.Directory.GetFiles(@"C:\Cipher\CipherResult");
//File Info for file we looked at
System.IO.FileInfo fi = new System.IO.FileInfo(CipherFiles[0]);
string FileName = fi.Name;
string FileSize = fi.Length.ToString();
string FileType = fi.Extension;
object FileTypeObj = fi.GetType().BaseType;
string FileFull = fi.FullName;
string DateModifiedStr = fi.CreationTime.ToString();
//Create an array on how the headers will look
string []FormatStr = new string[4]{FileName,FileSize,FileType,DateModifiedStr};
ListViewItem LVHeader = new ListViewItem(FormatStr);
listViewFileOut.Items.Add(LVHeader);
//this is to get th icon
IconHandler GetIcon = new IconHandler();
//this starts a new image list
ImageList imageListLarge = new ImageList();
//Lets do something like adding a bmp
imageListLarge.Images.Add(Bitmap.FromFile(@"C:\Cipher\CipherPic.bmp"));
//This pust in the image
listViewFileOut.LargeImageList = imageListLarge;
Comment