Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

multiple forms

Feb 13, 2007 1:17PM PST

namespace x
{
public partial class Form1 : Form
{
public static Form1 frm1 = null;
Form2 frm2 = new Form2();
Form3 frm3 = new Form3();

//form2
namespace x
{
public partial class Form2 : Form
{
public static Form2 frm2 = null;

//form3
namespace x
{
public partial class Form3 : Form
{
public static Form3 frm3 = null;

--I cant get to form 2 from form 3 or vice versa. does that mean i have to make a splash sceen and load all the forms by doing something like(form1-form2-form1-form3-form1) in the background before showing the first form?? that way all forms will be initialized...?

Discussion is locked

- Collapse -
oh no wonder
Feb 15, 2007 8:41AM PST

i just needed to do a try statement to check for initializing...

- Collapse -
another problem
Feb 17, 2007 5:28AM PST

now i have to have the second form, or at least one of the buttons from the second form to be instanced so i can reference it(as soon as form 1 is loading!)

private void Form1_Load(object sender, EventArgs e)
{
//instance form 2 or at least a button from form 2...

}