[RESOLVED] Form sharing problem
Form2 is not passing over information to Form1...
Code for Form2:
VB Code:
Private m_myVar As String
Public Property listItem() As String
Get
Return Me.m_myVar
End Get
Set(ByVal Value As String)
Me.m_myVar = Value
End Set
End Property
Private Sub Button1_Click(ByVal sender as System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lv As ListViewItem = ListView1.SelectedItems(0)
Me.m_myVar = lv.SubItems(2).Text
Me.listItem = lv.SubItems(2).Text
Me.Close
End Sub
And for Form1 I have this:
VB Code:
Dim myForm As New Form2
myForm.ShowDialogue()
MessageBox.Show(myForm.listItem)
on Form2 I get the correct text.
on Form1 (which is loaded after Form2), I get a blank field.
Any ideas?
Cheers. :)