Hi!
Can anyone tell me how can I make option dialog form. Like save file dialog. I have main form and another form with some checkbokses, numeric Up-Down controls and so on. Question is how can I get information from options form to main then I close it with button "OK"?
Thanks!
Options form
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Mike GoldRank #50 · 30.6K pointsPosted Mar 14, 2006, 5:17 PM EST
e.g.
public partial class Options : Form
{
public Options()
{
InitializeComponent();
chkOption1.DataBindings.Add("Checked", this, "Option1");
}
private bool _option1 = false;
public bool Option1
{
get
{
return _option1;
}
set
{
_option1 = value;
}
}
private void btnOK_Click(object sender, EventArgs e)
{
MessageBox.Show(String.Format("Checked = {0}", Option1));
}
}
-Mike G.
Victor Baleishis8 pointsPosted Mar 15, 2006, 1:55 AM EST
I from frmMain run frmOptions, then make some corrections in frmOptions, for example, change the color of frmMain. And then I press btnOK in frmOptions, it closes and frmMain is changing color, defined in frmOptions...