Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
This example demonstrates how to programmatically select an item in a Windows Forms ListView control. Selecting an item programmatically does not automatically change the focus to the ListView control. For this reason, you will typically want to call the Focus method when selecting an item.
Example
me.ListView1.Focus()
me.ListView1.Items(0).Selected = True
this.listView1.Focus();
this.listView1.Items[0].Selected = true;
Compiling the Code
This example requires:
A ListView control named
listView1that contains at least one item.References to the System and System.Windows.Forms namespaces.