For Each li In fHoliday.lvStates.Items
If strState = li.Text Then
If lvHolidays.SelectedItems(xCnt).SubItems(xCnt - 1).Text = "Yes" Then
li.Checked = True
End If
Exit For
End If
Next
fHoliday
是我的Form1
,lvStates
是我的Form1列表视图,现在我在Form2
调用Form1 ListView项目来检查哪一个checkBox
检查,但在Form2 ListView项目没有得到。
lvStates
是一个字符串并且具有Form2列表视图状态,xCnt
是for循环中的int,我的意图是检查Form1 ListView的状态checkBox,如果Form2状态等于循环。但主要的是我无法将Form1 ListView项目转换为Form2(在我的代码的第一行),这是主要问题。