This example requires that you have added the code to a Form and call the method created in the example from the constructor or another method on the form. The example also requires that images named MySmallImage1, MySmallImage2, MyLargeImage1, and MyLargeImage2 are located in the root directory of drive C.

Remarks

The GridLines property has no effect unless the View property of the ListView control is set to Details. The GridLines property allows you to display lines to identify the rows and columns that are displayed in the ListView control when it displays items and their subitems. The grid lines that are displayed do not provide the ability to resize rows and columns as an application such as Microsoft Excel does. Only columns can be resized, if column headers are displayed, by moving the mouse pointer to the right side of the column to resize and then clicking and dragging until the column is the size you want. The grid lines feature is used to provide the user of the control with visible boundaries around items and subitems.