By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,620 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Close Form Problem

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can you post some of the code that opens the Form where the ListView lives
and the code that closes the form?
"S Shulman" <sm*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #2

P: n/a
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.eShowLi st)

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


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.