C# "about this program" information screen

mrpddnos

Freshman
Joined
Nov 25, 2008
Location
Wezep, The Netherlands
Hi guys,

I'm writing a small program. The main functionalities are functioning properly. Now I want to add a popup box with information about te program. (Some sort of "about" window. Can anyone help me get started with that?

yours,
bernhard

about.jpg
 

tfowler

Regular
Joined
Aug 16, 2005
Location
Columbus, OH
Are you using Visual Studio.NET? If so, select Project -> Add Windows Form and select the About Box template. If not, you'll have to design your own new form. Then you'll have to instantiate the Form and call WhateverYouNameTheForm.ShowDialog() in the Click event of your "About 5th G" menu item.

Todd
 

mrpddnos

Freshman
Joined
Nov 25, 2008
Location
Wezep, The Netherlands
thanks Todd. I use Visual Studio. There is one small problem. When the "aboutbox" is launched I can press the OK button all I want, nothing happens. How can I use the OK button to close only that form (and not the whole application)?
 

MrPaul

Contributor
Joined
Jun 28, 2006
Location
Hampshire, UK
ShowDialog() not Show()

You need to use the ShowDialog() method to show the About form, not Show():

C#:
AboutForm about = new AboutForm();
about.ShowDialog();

Good luck :cool:
 

mrpddnos

Freshman
Joined
Nov 25, 2008
Location
Wezep, The Netherlands
Re: ShowDialog() not Show()

Thanks paul! You're almost a life-saver! The about box works now. Do you by any chance know how I can have the input from a form be emailed to me? I'm writing a program that about 40 people are going to test for me. One of the forms I use is an questionere that the user may fill in. And then send to me. How can I do this?
 
Top Bottom