Close Form Problem

  • Thread starter Thread starter S Shulman
  • Start date Start date
S

S Shulman

Hi

I close a form in the DoubleClick event of a list view in one form and the
form that opened this form closes as well the only way I can aoid it is by
making the form not Modal

Thank you
Shmuel
 
Can you post some of the code that opens the Form where the ListView lives
and the code that closes the form?
 
Mike,

View code below

Cheers,
Shmuel


This code opens the form

Private Sub btnSelectClient_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSelectClient.Click

Dim iClientID As Integer

'Create the client search form

Dim frm As New frmSearchClient(frmSearchClient.e_FormMode.eShowList)

frm.StartPosition = FormStartPosition.CenterScreen

frm.ShowDialog()

'Get the ID of the selected client

iClientID = frm.iClientSelectedID

'If selected

If iClientID > 0 Then

eRelType = modEnum.e_RelType.Client

iRelID = iClientID

AddRef()

Else

Exit Sub

End If

End Sub


And this code closes the form
Private Sub LV_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LV.DoubleClick

iClientSelectedID = LV.SelectedItems(0).Tag

Close()

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top