S
Suma
Hi,
i have a problem with the controls .i have to validate Form1 Radio
button option is checked or Not in the Form2. even after checking the
radio button also in FOrm2 it is always taking as "False" only.
please see the following code where i did wrong.
I ahve created A Visual C# .Net project. for that i ahve added Form2
now my project contains Form1 and Form2.
In Form1 i have placed Control "RadioButton1"
Follwing code i have placed in the FOrm1.
Form2 f2 = new Form2();
private void Form1_Load(object sender, EventArgs e)
{
f2.Show(); (Displays Form2)
}
private void radioButton1_CheckedChanged(object sender,
EventArgs e) (when radio button option ia checked or unchecked Form2
function will be called)
{
f2.function1();
}
In Form2 No controls are avialable.
following function i have implemented in the Form2
public void function()
{
Form1 f1 = new Form1();
MessageBox.Show("came inside"); //To know when the Radio
button is checked or un checked
if (f1.radioButton1.Checked == true)
{
MessageBox.Show("Checked");
}
But in the above My problem is Even After "Checking the radio
button(Enabled) option" ((f2.radioButton1.Checked == true) is always
showing as false when i put the break point.
it is not updating the checkoption valus to "true" even after checking
the radio button.
please help on this. i am not getting solution for this.
Thanks in Advance.
If i have written a silly question plase forgive me. i am new to
development.
Thanks in Advance
Suma
i have a problem with the controls .i have to validate Form1 Radio
button option is checked or Not in the Form2. even after checking the
radio button also in FOrm2 it is always taking as "False" only.
please see the following code where i did wrong.
I ahve created A Visual C# .Net project. for that i ahve added Form2
now my project contains Form1 and Form2.
In Form1 i have placed Control "RadioButton1"
Follwing code i have placed in the FOrm1.
Form2 f2 = new Form2();
private void Form1_Load(object sender, EventArgs e)
{
f2.Show(); (Displays Form2)
}
private void radioButton1_CheckedChanged(object sender,
EventArgs e) (when radio button option ia checked or unchecked Form2
function will be called)
{
f2.function1();
}
In Form2 No controls are avialable.
following function i have implemented in the Form2
public void function()
{
Form1 f1 = new Form1();
MessageBox.Show("came inside"); //To know when the Radio
button is checked or un checked
if (f1.radioButton1.Checked == true)
{
MessageBox.Show("Checked");
}
But in the above My problem is Even After "Checking the radio
button(Enabled) option" ((f2.radioButton1.Checked == true) is always
showing as false when i put the break point.
it is not updating the checkoption valus to "true" even after checking
the radio button.
please help on this. i am not getting solution for this.
Thanks in Advance.
If i have written a silly question plase forgive me. i am new to
development.
Thanks in Advance
Suma