0

i open a child form from within a parent form

    Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
            Dim custmast As New CustomerMaster
            custmast.MdiParent = Me.MdiParent
            custmast.Show()
        End Sub

now the form customer master has values within a listview. when i doubleclick on a value within the listview i want this form to close and pass the value to a textbox within the parent form. what would the code be? I am relatively new to vb.

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by LearnVBnet
0
    Private Sub Listview_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Listview.DoubleClick
  If Not Listview.SelectedItems.Count = 0 Then
                        With LvList.SelectedItems(0)
ParentForm.Textbox1.Text = Listview.SelectedItems.Item(0).Text
 End With
                    End If

Edited by LearnVBnet

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.