"Peter Duniho" <(E-Mail Removed)> wrote in message
news

(E-Mail Removed)...
> On Thu, 10 May 2007 14:31:58 -0700, PS <(E-Mail Removed)> wrote:
>
>> Pass custom class as a parameter in your PreferenceForm constructor.
>
> It's a private class. It can't be passed to the PreferenceForm
> constructor, because the PreferenceForm class doesn't have access to it.
You are saying that this will not work?
public class MainForm : Form {
private CustomClass cc;
public MainForm() {
DoSomething()
InitializeComponent();
}
/// Do something more
public void ShowPreference() {
PreferenceForm pf = new PreferenceForm(cc);
pf.sometextbox.text = cc.something;
/// etc
pf.ShwoDialog();
}
}
public class PreferenceForm: Form {
/// another form
public PreferenceForm(CustomClass cc)
{
}
}