Hello,

Im trying to open a new windows form by clicking in a menustrip item. Its not the first time I make that but now it doesn't work and I dont know why.
Here it is the code I have:

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox about = new AboutBox();
            about.Show();
        }

        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HelpBox helpbox = new HelpBox();
            helpbox.Show();
        }

About box works perfectly but help box don't. I proceeded the same way. Here it is the Solution Explorer printscreen:
http://i195.photobucket.com/albums/z259/Pongidae/asd.jpg

I donk know if it is important. Now Im using Visual Sudio 2008 but I started this project with Visual C# Express version. I thoght it was a limitation of express version but in visual studio I have the same result.

error CS0246: The type or namespace name 'HelpBox' could not be found (are you missing a using directive or an assembly reference?)


Any suggestions?
Thanks in advance!

Recommended Answers

All 2 Replies

Check the code of HelpBox.cs. Im assuming that the name of the partial class inside that file may not be matching with the filename - HelpBox.cs.
Maybe the name of the form was changed after it was initially created but the class name was not changed.

Thanks Jatin.
I didnt remember that I had changed "default namespace" in project options so every new windows forms was created with the wrong namespace. Now its working!
SOLVED

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.