Here are the code snippeds, form1.cs:
And, here is the Designer error:
If I pass a form object as a parameter into a normal method argument, it works fine this way, no designer & eventhandler error occurs.
However if I use events like RadioButton Checked Changed, then I get this EVENT HANDLER & DESIGNER error.
How do I fix it? I want to use form objects and their events together at the same time here, but there is an error.
CodePudding user response:
Yes, the error is expected. because CheckedChanged declaration is like this
private void radioButton1_CheckedChanged(Object sender,
EventArgs e)
You cannot pass the parameter to it.
and as @Klaus Gütter mentioned in the comment you can use this
if in the same form otherwise, you can create a property for another form and use it if you are in different form.