C# and the .NET Framework: Tying It All Together (Part 2: Adding menu bars, event handlers, and application logic)

This is the second in a series of articles that build an application using C# and the .NET Framework. Our model application is the Windows Notepad.

What We’ve Done

In the first article (.NETDJ, Vol. 2, issue 1), we built the framework of our application as follows:

  • We built the NetpadForm class – a Windows Form class that will ultimately encompass most of the functionality of Netpad.
  • We added a TextBox object to the form to provide our text editing interface.
  • We added a menu bar, the File menu, and the File/Exit menu item to the form, and added an event handler to the File/Exit menu item.

Where We’re Going

In this article, we’re going expand Netpad by adding clipboard commands (Undo, Cut, Copy, Paste, Delete, and Select All), an Insert Time/Date command, and a Word Wrap command. These commands will be added to two new top-level menus, Edit and Format.

Read the full article at http://dotnet.sys-con.com/node/44868.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>