Unless you are smarter than me, doing the thing in P.P first statement is not
that easy. I learned to do a similar thing from a response that I received
from HKW. Question was submitted on 10-16-04. To see full question search
that date for my screen name. His response is shown below. The reference
provided by HKW did the trick.
My resulting code looked like the following:
Private Sub priOpenPreviewForm()
Dim frmPreview As New frmPreview
AddHandler frmPreview.Closed, AddressOf frmPreviewClosed
frmPreview.Show()
Debug.WriteLine("This code executes immediately")
End Sub
Private Sub frmPreviewClosed(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim sMsg As String = "The instance of frmPreview just closed." & vbCrLf
sMsg &= "You may want to use the Closing event if you need to query the form"
sMsg &= " for any changed properties."
Debug.WriteLine(sMsg)
End Sub
=========================
"genojoe" <ge*****@discussions.microsoft.com> schrieb:
My thinking is that I need to create an Event in parent that
fires when MyChild closes.
You need to add a handler to the form's 'Closed' event to get notified when
the form closes:
<URL:http://groups.google.de/groups?selm=2ocnd6F8vepdU2%40uni-berlin.de>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>