形式之間共享屬性,我到二者之間傳遞的屬性forms.in窗體2:我已經創建了財產IsFilterEnabled和formmain在VB
Public Property IsFilterEnabled() As Boolean
Get
Return mIsEnabled
End Get
Set(ByVal Value As Boolean)
mIsEnabled = Value
End Set
End Property
Public Sub FilterButton_Click() Handles FilterButton.Click
Dim currentRow As Data.DataRow
If vessel_NameComboBox.SelectedIndex > -1 Then
mIsEnabled = True
formMain.LoadData()
End If
End Sub
Formmain
Dim frm2 As New Form2
If frm2.IsFilterEnabled = True Then End
數據訪問本在創建form2的新實例時,IsFilterEnabled屬性丟失。如何在formmain中獲取form2的同一實例以訪問該propery
谷歌的標題第一 –
有人能幫助 – Priya