Zebra0.com

csharp dialogsC# Windows Forms Programming

C# Windows Forms Programming

Learn C# (C sharp) in FREE step-by-step lessons.

Dialogs in C#

In this lesson we will create the Happy Birthday application shown below:

As you can see in the illustration, this app has a menu, a tool strip, and a staus bar at the bottom.

It will use common dialog controls to select font, color and the picture to display.

You have seen many of the common dialog boxes in other applications.
You have probably seen the dialog box to select a font or color and have probably used the common dialog to open a file and save a file.

Please study the material at each of the links below.

  1. Microsoft Reference Microsoft Reference: C# Dialogs, Common Dialogs and Message Boxes

  2. Happy Birthday Happy Birthday: This is an overview of the app that we will create in this lesson.
    /csharp/videos/csharp-happy-birthday.mp4
  3. Create the menu for the Happy Birthday App Create the menu for the Happy Birthday App: Shows how to build the menu for the Happy Birthday program.
    /csharp/videos/csharp-menu.mp4
  4. Create the tool strip for the Happy Birthday App Create the tool strip for the Happy Birthday App: Shows how to build the toolstrip (at the top of the form), plus two images to download
    /csharp/videos/csharp-toolstrip.mp4
  5. Create the status strip for the Happy Birthday App Create the status strip for the Happy Birthday App: Create the status strip (at the bottom of the form) & add code to display the current time
    /csharp/videos/csharp-statusstrip.mp4
  6. Add the font dialog for the Happy Birthday App Add the font dialog for the Happy Birthday App: The Font Dialog is one of the common dialog controls for selecting fonts and font properties
    /csharp/videos/csharp-fontdialog.mp4
  7. modal: When a dialog is shown modal, nothing else happens until the dialog is closed.

  8. Adds the Open dialog to select a picture Adds the Open dialog to select a picture: Includes setting the filter to select only picture types.
    /csharp/videos/csharp-openfile.mp4
  9. Add the Color dialog to select a background color for the Happy Birthday App Add the Color dialog to select a background color for the Happy Birthday App: Includes a different way to determine if the user clicked cancel
    /csharp/videos/csharp-colordialog.mp4
  10. Add the code for New and Exit: The last of the Happy Birthday App Add the code for New and Exit: The last of the Happy Birthday App: Shows how to save and restore the form settings at start
    /csharp/videos/csharp-new.mp4
  11. A Message Box Example: Explanation of using a message box.

  12. Message Box Buttons and Icons: In addition to OK, and YesNO, other buttons can be shown

GlossaryGlossary for dialogs lesson
Full Glossary