Apply Your Knowledge

Exercises

1.1. Responding to Keyboard Input

The Windows forms libraries provide controls such as TextBox and RichTextBox that you can use to process keyboard input from users. But sometimes you might want to program the keyboard yourself. In this exercise you will learn how to capture keyboard events and respond to them. You will design a very basic text editor named NEN (Not Even Notepad) that will let you type on a form surface and also let you edit the text by using the Backspace key.

Estimated time: 20 minutes

1.
Create a new Visual C# .NET Windows application in the Visual Studio .NET IDE.
2.
Add a new form to the Visual C# .NET project. Change the Text property of the form to Not Even Notepad and change the BackColor ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.