Adding the List View to Display Albums

You're going to use a list view to display albums. The reason that you'll use a list view instead of a regular list box is that list view controls allow you to display pictures and multiple columns—both of which you'll be doing.

Follow these steps to add the list view to your form:

1.
Add a new List View control to the form and set its properties as follows:
PropertyValue
NamelvwAlbums
AnchorTop, Bottom, Left, Right
FullRowSelectTrue
HideSelectionFalse
Location6,32
MultiSelectFalse
Size277,224
SmallImageListimgMain
SortingAscending
ViewDetails
2.
Add the following three columns to the Columns collection of the List View control: Column 1:
PropertyValue
NamecolAlbumName
TextAlbum
Width160
Column 2:
PropertyValue
Name

Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.