logo       

Form.Owner: msg#00395

windows.devel.dotnet.winforms

Subject: Form.Owner

Hi. Is it standard practice for dialog boxes to reference their caller using
Form.Owner, or is it better to explicitly add a reference to the caller in
the dialog's constructor (eg shown below).

private frmMain _caller;

public MyDialog(frmMain Caller)
{
this._caller=Caller;
}

I need access to the caller to access the calling form's property getters,
and I'm not sure what the pitfalls of using Form.Owner are. The only
downside I can see is having to cast Form.Owner to the calling forms type,
but this is no show stopper.

Thanks

Kevin Hector

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise