dann11
Full Member level 3
Hi! I am working on a project.. i want to call formA from formB, where formA also is link with a formC,
FormA
FormB, i tried to call the formA through a button click:
And with these I get an error of:
Project.Actual does not contain a constructor of that takes 1 arguments
How should I declare an argument if it is a form?
FormA
Code:
namespace Project
{
/// <summary>
/// Description of TargetActual.
/// </summary>
public partial class TargetActual : Form
{
MainForm main;
Button ss;
public TargetActual(MainForm m, object s)
{
main = m;
ss = (Button) s;
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
}
FormB, i tried to call the formA through a button click:
Code:
public void getActualsettingForm(object sender, EventArgs e)
{
Actual m = new Actual(sender);
m.ShowDialog();
}
And with these I get an error of:
Project.Actual does not contain a constructor of that takes 1 arguments
How should I declare an argument if it is a form?