how to show an about box

P

paulotuatail

This should be easy. I have added an about box to my project and named it frmAbout. Having modified it and saved it. I built the project.

I have a menu with about on it and the code is this.

private void about_Click(object sender, EventArgs e)
{
frmAbout MyAbout = new frmAbout();
MyAbout.Show();
}

However when I run this I get microsofts default About box not the one I have in my project. This sounds daft but what is going on?

:(
 
P

paulotuatail

This should be easy. I have added an about box to my project and named it frmAbout. Having modified it and saved it. I built the project.



I have a menu with about on it and the code is this.



private void about_Click(object sender, EventArgs e)

{

frmAbout MyAbout = new frmAbout();

MyAbout.Show();

}



However when I run this I get microsofts default About box not the one I have in my project. This sounds daft but what is going on?



:(

I am using VS2008

I changed the name of the about box in case of a naming conflict to DesmondsfrmAbout

The code automatically changed to

private void about_Click(object sender, EventArgs e)
{
DesmondsfrmAbout ThisBox = new DesmondsfrmAbout();
ThisBox.Show();


Changed the instance also to ThisBox

Intelesense is working and this is definatly recognised in the code and my project. So what is going wrong. This would work in VB.
 
P

paulotuatail

This should be easy. I have added an about box to my project and named it frmAbout. Having modified it and saved it. I built the project.



I have a menu with about on it and the code is this.



private void about_Click(object sender, EventArgs e)

{

frmAbout MyAbout = new frmAbout();

MyAbout.Show();

}



However when I run this I get microsofts default About box not the one I have in my project. This sounds daft but what is going on?



:(

I have added a windows form Desmond1 and this actually WORKS HA!

private void about_Click(object sender, EventArgs e)
{
//DesmondsfrmAbout ThisBox = new DesmondsfrmAbout(); // This is an AboutBox
Desmond1 ThisBox = new Desmond1(); // This is a Windows form and this WORKS :)

ThisBox.Show();
}

Maybe it is a bug in Microsoft. Scrap the AboutBox and customise a form instead.
 
J

Jeff Johnson

I have added a windows form Desmond1 and this actually WORKS HA!

private void about_Click(object sender, EventArgs e)
{
//DesmondsfrmAbout ThisBox = new DesmondsfrmAbout(); // This is an
AboutBox
Desmond1 ThisBox = new Desmond1(); // This is a Windows form and this
WORKS :)

ThisBox.Show();
}

Maybe it is a bug in Microsoft. Scrap the AboutBox and customise a form
instead.


Not that it necessarily fixes your problem, but you should be using
ShowDialog() instead of Show(). Users expect the About box to be modal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top