Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C# calling a form from another form

Status
Not open for further replies.

dann11

Full Member level 3
Full Member level 3
Joined
Oct 22, 2015
Messages
166
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,742
Hi! I am working on a project.. i want to call formA from formB, where formA also is link with a formC,

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?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top