ListView项目无法进入另一个表单

时间:2014-04-09 06:33:10

标签: vb.net

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是我的Form1lvStates是我的Form1列表视图,现在我在Form2调用Form1 ListView项目来检查哪一个checkBox检查,但在Form2 ListView项目没有得到。

lvStates是一个字符串并且具有Form2列表视图状态,xCnt是for循环中的int,我的意图是检查Form1 ListView的状态checkBox,如果Form2状态等于循环。但主要的是我无法将Form1 ListView项目转换为Form2(在我的代码的第一行),这是主要问题。

0 个答案:

没有答案