my code:
in the form class –
private void myevent(object sender, EventArgs e)
{
controller.changeVis(((System.Windows.Forms.Button)sender));
}
in the controller class –
public void changeVis(System.Windows.Forms.Button buto)
{
form1.buto.Visible = True;
}
error is:
myproj.Form1′ does not contain a definition for ‘buto’ and no extension method ‘buto’ accepting a first argument of type ‘myproj.Form1’ could be found (are you missing a using directive or an assembly reference?)
what to change to avoid this error?
Basically the objective is to use an event in form class to allow changing button visibility from the controller class.
Try,