D
Dan
Hi. I'm trying to launch a second form from code in a first, but it doesn't
seem to working.
Originally I tried to write the code as follows (Form2 has a public method
called AttachDataSet):
Application.Run(new Form2());
Form2.AttachDataSet(ds);
Form2.Show();
However, Intellisense couldn't find the AttachDataSet method using that
code. So I changed it to:
Form2 fm2 = new Form2();
Application.Run(fm2);
fm2.AttachDataSet(ds);
fm2.Show();
But when the code runs, nothing seems to happen. Further, if I put a break
point at fm2.Show, I never get there.
Anybody know (a) what's going on in my current code, and (b) how to do what
I want?
Thanks...
Dan
seem to working.
Originally I tried to write the code as follows (Form2 has a public method
called AttachDataSet):
Application.Run(new Form2());
Form2.AttachDataSet(ds);
Form2.Show();
However, Intellisense couldn't find the AttachDataSet method using that
code. So I changed it to:
Form2 fm2 = new Form2();
Application.Run(fm2);
fm2.AttachDataSet(ds);
fm2.Show();
But when the code runs, nothing seems to happen. Further, if I put a break
point at fm2.Show, I never get there.
Anybody know (a) what's going on in my current code, and (b) how to do what
I want?
Thanks...
Dan