Hi John,
I don't believe there's an obligation for the calling Form to call
ShowDilaog. It can call the secondary Form and ask it to show <itself>.
This, then, provides a method on the secondary Form that allows you to
pass everything and its dog to the dialogue. It also allows the Dialogue Form
to return results.
Class DlgForm
Public Function ShowYourself _
(ItsDog As Dog) As SomeResultType
'Do something with ItsDog... (Save or use)
Me.ShowDialog 'This calls DlgForm_Load
'Package up the results and send them back.
Dim oResult As SomeResultType
oResult.This = SomeValue
oResult.That = SomeOtherValue
Return oResult
End Sub
In FormMain
Dim frmDlg As new DlgForm
Dim oResult As SomeResultType _
= frmDlg.ShowYourself ("Hello")
'oResult now contains juicy goodies.
Regards,
Fergus