The diagram below:
CodePudding user response:
You want to add pictures added to the ImageList,Then bind ListView. ColumnHeaderIcons properties, such as:
ListView1. ColumnHeaders. Clear
ListView1. ColumnHeaderIcons=Nothing
ListView1. View=lvwReport
ImageList1. ListImages. Clear
1 icon ImageList1. ListImages. Add, "column", LoadPicture (" F: \ \ \ icon resources tools icon image resources \ 001. Ico ")
2 icon ImageList1. ListImages. Add, "column", LoadPicture (" F: \ \ \ icon resources tools icon image resources \ 002. Ico ")
ListView1. ColumnHeaderIcons=ImageList1
ListView1. ColumnHeaders. Add, "1", "1", 1200, 0, ImageList1. ListImages. Item (" column 1 icon "). The Index
ListView1. ColumnHeaders. Add, "column 2", "2", 1200, 0, ImageList1. ListImages. Item (" column 2 icon "). The Index
ListView1. ColumnHeaders. Add, "3", "3", 1200, 0, ImageList1. ListImages. Item (" column 1 icon "). The Index
ListView1. Refresh