title: ListView.SelectedIndices.Count Is zero for multi-selection
body: <p>I've been pulling my hair out over this C#/.NET problem where a ListView in virtual mode will not return a list of selected indices when more than one item is selected. When one or zero items are selected, everything works as expected.
  I've created the (minimal-ish?) code below to illustrate my problem.
  I'm sure I'm overlooking something really obvious, but I come from a C/C++ background and have very little experience with .Net, especially GUI code.</p>
  
  <pre><code>using System;
  using System.Windows.Forms;
  
  namespace AnotherListViewTest
  {
      public partial class Form1 : Form
      {
          private System.Windows.Forms.ListView listView;
          private System.Windows.Forms.ColumnHeader columnHeader1;
  
          public Form1()
          {
              //InitializeComponent();
              this.listView = new System.Windows.Forms.ListView();
              this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
              this.SuspendLayout();
              // 
              // listView
              // 
              this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
              | System.Windows.Forms.AnchorStyles.Left)
              | System.Windows.Forms.AnchorStyles.Right)));
              this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
              this.columnHeader1});
              this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
              this.listView.Location = new System.Drawing.Point(8, 8);
              this.listView.Name = "listView";
              this.listView.Size = new System.Drawing.Size(676, 451);
              this.listView.TabIndex = 6;
              this.listView.UseCompatibleStateImageBehavior = false;
              this.listView.View = System.Windows.Forms.View.Details;
              this.listView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listView_RetrieveVirtualItem);
              this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
              // 
              // columnHeader1
              // 
              this.columnHeader1.Width = 600;
              // 
              // Form1
              // 
              this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
              this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
              this.ClientSize = new System.Drawing.Size(696, 471);
              this.Controls.Add(this.listView);
              this.Name = "Form1";
              this.Text = "Form1";
              this.Load += new System.EventHandler(this.Form1_Load);
              this.ResumeLayout(false);
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              listView.VirtualMode = true;
              listView.VirtualListSize = 1000;
          }
  
          private void listView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
          {
              e.Item = new ListViewItem(new String[] { e.ItemIndex.ToString() });
          }
  
          private void listView_SelectedIndexChanged(object sender, EventArgs e)
          {
              System.Diagnostics.Debug.WriteLine("Number of selected items: " + listView.SelectedIndices.Count);
          }
      }
  }
  </code></pre>