creating about dialog box in C# form application

Looks like you have not been searching for long, here it goes just add one using predefined template:

Add item window

And you could possibly find this link useful:

social.msdn.microsoft.com

Quote from there:

  1. Create a new windows form application
  2. In the "Solution explorer" ,left part of the screen , right click on the name of your windows application.
  3. Choose Add-->New item
  4. From the " Add new item window" choose "AboutBox" , name it "AboutBox1" , click on Add button. Now you have in your applicatoin two forms, "Form1" -- created by default by your project type and "AboutBox1" .
  5. Right click on the "Form1" and choose "Design View".
  6. Double click on the design sourface of form1.
  7. After that you will see this code:

    private void Form1_Load(object sender, EventArgs e)
    {
    
    }
    
  8. Add this code to your application, to look like this:

    private void Form1_Load(object sender, EventArgs e)
    {
        AboutBox1 a = new AboutBox1();
        a.Show();
    }
    
  9. Run the application.


To add a menu to a Windows Form at design time Open the form you wish to add a menu to in the Windows Forms Designer.

  • In the Toolbox, double-click the MenuStrip component.
  • A menu is added to the form (displaying the text "Type Here"), and the MainMenu component is added to the component tray.

Then you can do that as follows using click Event of that particuler subMenu item . Hint:Just click the subMenu item and rightclick->Properties..then you can find the Click Event for subMenuItem.

 private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
 {
    AboutWindow aboutWindow = new AboutWindow();
    aboutWindow.Show();
 }

There is a standard about box in the templates, try Project / Add new item and look for About Box. You can show it like a regular dialog form, e.g. using new AboutBox(this). ShowDialog(); in the menu item click handler.

Tags:

C#

Forms