J
John Salerno
What I want to do, just for an experiment, is make a menu item called
"About" and when the user clicks on it, a separate About window pops up.
I see how to add the About form in the designer, but I don't see how to
reference it in the menu item Click event handler. I tried
AboutBox1.ShowDialog(), but I got a compile error saying that
ShowDialog() needed an instance. I know I could write something like
Form AboutBox1 = new Form();
to avoid this error, but the box that ends up being shown when I click
the menu item isn't the same as the one I added.
So basically, how do you reference other forms that you've added to your
project?
Thanks.
"About" and when the user clicks on it, a separate About window pops up.
I see how to add the About form in the designer, but I don't see how to
reference it in the menu item Click event handler. I tried
AboutBox1.ShowDialog(), but I got a compile error saying that
ShowDialog() needed an instance. I know I could write something like
Form AboutBox1 = new Form();
to avoid this error, but the box that ends up being shown when I click
the menu item isn't the same as the one I added.
So basically, how do you reference other forms that you've added to your
project?
Thanks.