This question shows research effort; it is useful and clear
-1
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我想知道,如何从另一个表单中清除列表视图项目。例如,我有一个带有 ListView 的 Form A,我想从 Form B 中清除 Form A ListView Items。我尝试的是,在 Form A 中创建一个函数来清除 listView 并从 Form B 调用该函数。但是它不管用。请帮我解决这个问题。
Private Sub btnClearListView_Click(sender As System.Object, e As System.EventArgs) Handles btnClearListView.Click
For Each I In FormA.ListView1.Items
FormA.ListView1.Items.Remove(I)
Next
End Sub