Just as a matter of interest though, why doesn't this work:
'from within the dialog code
Me.Parent.funtionInCallingForm()
where funtionInCallingForm() is the function in the form where the dialog is
created. That is, as the parent of the dialog is that form, I thought this
might work - it doesn't :(
Can anybody explain why it doesn't work?
Geoff
"Geoff Jones" <no********@email.com> wrote in message
news:41***********************@news.dial.pipex.com ...
As Mr Burns from the Simpsons would say...."Excellent"!!!
Thanks a lot Herfried
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... "Geoff Jones" <no********@email.com> schrieb: Could you give an example of this technique?
In your dialog form:
\\\
Private m_ResultForm As MainForm
Public Property ResultForm() As MainForm
Get
Return m_ResultForm
End Get
Set(ByVal Value As MainForm)
m_ResultForm = Value
End Set
End Property
.
.
.
Me.ResultForm.Label1.Text = "Hello World!"
///
In the main form:
\\\
Dim f As New DialogForm()
f.ResultForm = Me
f.ShowDialog()
f.Dispose()
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>