vb listview 选中某一行

引用:http://topic.csdn.net/u/20070416/13/27894186-2b5f-4489-a10b-305067891d07.html

前提,不能放在Form_Load 中实现,因为当时窗口还没有加载完,所以不能获取窗口上某一控件的焦点

If ListViewForNow.ListItems.Count <> 0 Then

ListViewForNow.SelectedItem = ListViewForNow.ListItems(ListViewForNow.ListItems.Count)

ListViewForNow.SelectedItem.EnsureVisible

ListViewForNow.SetFocus

End If